Skip to content

Commit 85983d0

Browse files
alexeylangFacebook Github Bot 5
authored andcommitted
Change API for iOS
Reviewed By: michalgr Differential Revision: D3514778 fbshipit-source-id: 29dc12ad0a701fd08262be3aa81ae990d4fc63a9
1 parent e1497ce commit 85983d0

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

React/Executors/RCTJSCExecutor.mm

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -345,8 +345,7 @@ - (void)setUp
345345
NSString *cachesPath = [NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES) firstObject];
346346
RCTAssert(cachesPath != nil, @"cachesPath should not be nil");
347347
if (cachesPath) {
348-
std::string path = std::string([cachesPath UTF8String]);
349-
strongSelf->_jscWrapper->configureJSContextForIOS(strongSelf.context.ctx, path);
348+
strongSelf->_jscWrapper->configureJSContextForIOS(strongSelf.context.ctx, [cachesPath UTF8String]);
350349
}
351350
}];
352351

React/Executors/RCTJSCWrapper.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
#import <JavaScriptCore/JavaScriptCore.h>
1111

1212
#import "RCTDefines.h"
13-
#import <string>
1413

1514
typedef JSStringRef (*JSValueToStringCopyFuncType)(JSContextRef, JSValueRef, JSValueRef *);
1615
typedef JSStringRef (*JSStringCreateWithCFStringFuncType)(CFStringRef);
@@ -29,7 +28,7 @@ typedef JSStringRef (*JSValueCreateJSONStringFuncType)(JSContextRef, JSValueRef,
2928
typedef bool (*JSValueIsUndefinedFuncType)(JSContextRef, JSValueRef);
3029
typedef bool (*JSValueIsNullFuncType)(JSContextRef, JSValueRef);
3130
typedef JSValueRef (*JSEvaluateScriptFuncType)(JSContextRef, JSStringRef, JSObjectRef, JSStringRef, int, JSValueRef *);
32-
typedef void (*configureJSContextForIOSFuncType)(JSContextRef ctx, const std::string &cacheDir);
31+
typedef void (*configureJSContextForIOSFuncType)(JSContextRef ctx, const char *cacheDir);
3332

3433
typedef struct RCTJSCWrapper {
3534
JSValueToStringCopyFuncType JSValueToStringCopy;

0 commit comments

Comments
 (0)