Reviewed By: michalgr

Differential Revision: D3514778

fbshipit-source-id: 29dc12ad0a701fd08262be3aa81ae990d4fc63a9
This commit is contained in:
Alexey Lang 2016-07-04 09:14:49 -07:00 коммит произвёл Facebook Github Bot 5
Родитель e1497ce2b6
Коммит 85983d0ae4
2 изменённых файлов: 2 добавлений и 4 удалений

Просмотреть файл

@ -345,8 +345,7 @@ static void RCTInstallJSCProfiler(RCTBridge *bridge, JSContextRef context)
NSString *cachesPath = [NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES) firstObject];
RCTAssert(cachesPath != nil, @"cachesPath should not be nil");
if (cachesPath) {
std::string path = std::string([cachesPath UTF8String]);
strongSelf->_jscWrapper->configureJSContextForIOS(strongSelf.context.ctx, path);
strongSelf->_jscWrapper->configureJSContextForIOS(strongSelf.context.ctx, [cachesPath UTF8String]);
}
}];

Просмотреть файл

@ -10,7 +10,6 @@
#import <JavaScriptCore/JavaScriptCore.h>
#import "RCTDefines.h"
#import <string>
typedef JSStringRef (*JSValueToStringCopyFuncType)(JSContextRef, JSValueRef, JSValueRef *);
typedef JSStringRef (*JSStringCreateWithCFStringFuncType)(CFStringRef);
@ -29,7 +28,7 @@ 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 std::string &cacheDir);
typedef void (*configureJSContextForIOSFuncType)(JSContextRef ctx, const char *cacheDir);
typedef struct RCTJSCWrapper {
JSValueToStringCopyFuncType JSValueToStringCopy;