From 85983d0ae4fac0fc22048bd0d729cdc3ca755d91 Mon Sep 17 00:00:00 2001 From: Alexey Lang Date: Mon, 4 Jul 2016 09:14:49 -0700 Subject: [PATCH] Change API for iOS Reviewed By: michalgr Differential Revision: D3514778 fbshipit-source-id: 29dc12ad0a701fd08262be3aa81ae990d4fc63a9 --- React/Executors/RCTJSCExecutor.mm | 3 +-- React/Executors/RCTJSCWrapper.h | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/React/Executors/RCTJSCExecutor.mm b/React/Executors/RCTJSCExecutor.mm index 198469358..4da25b030 100644 --- a/React/Executors/RCTJSCExecutor.mm +++ b/React/Executors/RCTJSCExecutor.mm @@ -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]); } }]; diff --git a/React/Executors/RCTJSCWrapper.h b/React/Executors/RCTJSCWrapper.h index fc0ca29a3..612b45777 100644 --- a/React/Executors/RCTJSCWrapper.h +++ b/React/Executors/RCTJSCWrapper.h @@ -10,7 +10,6 @@ #import #import "RCTDefines.h" -#import 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;