diff --git a/React/Executors/RCTJSCExecutor.mm b/React/Executors/RCTJSCExecutor.mm index 91fd6a47a..db5cea01d 100644 --- a/React/Executors/RCTJSCExecutor.mm +++ b/React/Executors/RCTJSCExecutor.mm @@ -344,7 +344,6 @@ static NSThread *newJavaScriptThread(void) [[NSNotificationCenter defaultCenter] postNotificationName:RCTJavaScriptContextCreatedNotification object:context]; - configureCacheOnContext(context, self->_jscWrapper); installBasicSynchronousHooksOnContext(context); } @@ -434,18 +433,6 @@ static NSThread *newJavaScriptThread(void) }]; } -/** If configureJSContextForIOS is available on jscWrapper, calls it with the correct parameters. */ -static void configureCacheOnContext(JSContext *context, RCTJSCWrapper *jscWrapper) -{ - if (jscWrapper->configureJSContextForIOS != NULL) { - NSString *cachesPath = [NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES) firstObject]; - RCTAssert(cachesPath != nil, @"cachesPath should not be nil"); - if (cachesPath) { - jscWrapper->configureJSContextForIOS(context.JSGlobalContextRef, [cachesPath UTF8String]); - } - } -} - /** Installs synchronous hooks that don't require a weak reference back to the RCTJSCExecutor. */ static void installBasicSynchronousHooksOnContext(JSContext *context) { @@ -964,7 +951,6 @@ RCT_EXPORT_METHOD(setContextName:(nonnull NSString *)name) { _jscWrapper = RCTJSCWrapperCreate(_useCustomJSCLibrary); _context = [_jscWrapper->JSContext new]; - configureCacheOnContext(_context, _jscWrapper); installBasicSynchronousHooksOnContext(_context); dispatch_semaphore_signal(_semaphore); } diff --git a/React/Executors/RCTJSCWrapper.h b/React/Executors/RCTJSCWrapper.h index 20560800e..51c1faeb4 100644 --- a/React/Executors/RCTJSCWrapper.h +++ b/React/Executors/RCTJSCWrapper.h @@ -25,7 +25,6 @@ typedef JSStringRef (*JSValueCreateJSONStringFuncType)(JSContextRef, JSValueRef, typedef bool (*JSValueIsUndefinedFuncType)(JSContextRef, JSValueRef); typedef bool (*JSValueIsNullFuncType)(JSContextRef, JSValueRef); typedef JSValueRef (*JSEvaluateScriptFuncType)(JSContextRef, JSStringRef, JSObjectRef, JSStringRef, int, JSValueRef *); -typedef void (*configureJSContextForIOSFuncType)(JSContextRef ctx, const char *cacheDir); typedef struct RCTJSCWrapper { JSStringCreateWithCFStringFuncType JSStringCreateWithCFString; @@ -44,7 +43,6 @@ typedef struct RCTJSCWrapper { JSEvaluateScriptFuncType JSEvaluateScript; Class JSContext; Class JSValue; - configureJSContextForIOSFuncType configureJSContextForIOS; } RCTJSCWrapper; RCT_EXTERN RCTJSCWrapper *RCTJSCWrapperCreate(BOOL useCustomJSC); diff --git a/React/Executors/RCTJSCWrapper.mm b/React/Executors/RCTJSCWrapper.mm index 6a6c03536..2c012c04d 100644 --- a/React/Executors/RCTJSCWrapper.mm +++ b/React/Executors/RCTJSCWrapper.mm @@ -59,7 +59,6 @@ static void RCTSetUpSystemLibraryPointers(RCTJSCWrapper *wrapper) wrapper->JSEvaluateScript = JSEvaluateScript; wrapper->JSContext = [JSContext class]; wrapper->JSValue = [JSValue class]; - wrapper->configureJSContextForIOS = NULL; } static void RCTSetUpCustomLibraryPointers(RCTJSCWrapper *wrapper) @@ -86,7 +85,6 @@ static void RCTSetUpCustomLibraryPointers(RCTJSCWrapper *wrapper) wrapper->JSEvaluateScript = (JSEvaluateScriptFuncType)dlsym(libraryHandle, "JSEvaluateScript"); wrapper->JSContext = (__bridge Class)dlsym(libraryHandle, "OBJC_CLASS_$_JSContext"); wrapper->JSValue = (__bridge Class)dlsym(libraryHandle, "OBJC_CLASS_$_JSValue"); - wrapper->configureJSContextForIOS = NULL; static dispatch_once_t once; dispatch_once(&once, ^{