pr fixes
This commit is contained in:
parent
5b29f09e7a
commit
bcd8c2a3d3
|
@ -72,6 +72,7 @@ JSGlobalContextRef RealmReactGetJSGlobalContextForExecutor(id executor, bool cre
|
||||||
|
|
||||||
Ivar executorIvar = class_getInstanceVariable([bridge class], "_javaScriptExecutor");
|
Ivar executorIvar = class_getInstanceVariable([bridge class], "_javaScriptExecutor");
|
||||||
id executor = object_getIvar(bridge, executorIvar);
|
id executor = object_getIvar(bridge, executorIvar);
|
||||||
|
bool chromeDebugMode = [executor isMemberOfClass:NSClassFromString(@"RCTWebSocketExecutor")];
|
||||||
|
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
static GCDWebServer *s_webServer;
|
static GCDWebServer *s_webServer;
|
||||||
|
@ -86,8 +87,7 @@ JSGlobalContextRef RealmReactGetJSGlobalContextForExecutor(id executor, bool cre
|
||||||
}
|
}
|
||||||
|
|
||||||
// The executor could be a RCTWebSocketExecutor, in which case it won't have a JS context.
|
// The executor could be a RCTWebSocketExecutor, in which case it won't have a JS context.
|
||||||
|
if (chromeDebugMode) {
|
||||||
if ([executor isMemberOfClass:NSClassFromString(@"RCTWebSocketExecutor")]) {
|
|
||||||
[GCDWebServer setLogLevel:3];
|
[GCDWebServer setLogLevel:3];
|
||||||
GCDWebServer *webServer = [[GCDWebServer alloc] init];
|
GCDWebServer *webServer = [[GCDWebServer alloc] init];
|
||||||
rpcServer = new realm_js::RPCServer();
|
rpcServer = new realm_js::RPCServer();
|
||||||
|
@ -125,6 +125,10 @@ JSGlobalContextRef RealmReactGetJSGlobalContextForExecutor(id executor, bool cre
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
if (chromeDebugMode) {
|
||||||
|
@throw [NSException exceptionWithName:@"Invalid Executor" reason:@"Chrome debug mode not supported in Release builds" userInfo:nil];
|
||||||
|
}
|
||||||
|
|
||||||
[executor executeBlockOnJavaScriptQueue:^{
|
[executor executeBlockOnJavaScriptQueue:^{
|
||||||
JSGlobalContextRef ctx = RealmReactGetJSGlobalContextForExecutor(executor, true);
|
JSGlobalContextRef ctx = RealmReactGetJSGlobalContextForExecutor(executor, true);
|
||||||
RJSInitializeInContext(ctx);
|
RJSInitializeInContext(ctx);
|
||||||
|
|
|
@ -693,6 +693,7 @@
|
||||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||||
DYLIB_CURRENT_VERSION = 1;
|
DYLIB_CURRENT_VERSION = 1;
|
||||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||||
|
EXCLUDED_SOURCE_FILE_NAMES = "";
|
||||||
FRAMEWORK_SEARCH_PATHS = (
|
FRAMEWORK_SEARCH_PATHS = (
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"$(PROJECT_DIR)",
|
"$(PROJECT_DIR)",
|
||||||
|
@ -736,6 +737,7 @@
|
||||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||||
DYLIB_CURRENT_VERSION = 1;
|
DYLIB_CURRENT_VERSION = 1;
|
||||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||||
|
EXCLUDED_SOURCE_FILE_NAMES = "";
|
||||||
FRAMEWORK_SEARCH_PATHS = (
|
FRAMEWORK_SEARCH_PATHS = (
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"$(PROJECT_DIR)",
|
"$(PROJECT_DIR)",
|
||||||
|
@ -772,6 +774,7 @@
|
||||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||||
DYLIB_CURRENT_VERSION = 1;
|
DYLIB_CURRENT_VERSION = 1;
|
||||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||||
|
EXCLUDED_SOURCE_FILE_NAMES = GCDWebServers.framework;
|
||||||
FRAMEWORK_SEARCH_PATHS = (
|
FRAMEWORK_SEARCH_PATHS = (
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"$(PROJECT_DIR)",
|
"$(PROJECT_DIR)",
|
||||||
|
|
|
@ -63,7 +63,7 @@
|
||||||
</AdditionalOptions>
|
</AdditionalOptions>
|
||||||
</TestAction>
|
</TestAction>
|
||||||
<LaunchAction
|
<LaunchAction
|
||||||
buildConfiguration = "Debug"
|
buildConfiguration = "Release"
|
||||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||||
launchStyle = "0"
|
launchStyle = "0"
|
||||||
|
|
Loading…
Reference in New Issue