mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-03-26 07:04:05 +08:00
Kill RCTWebViewExecutor
Summary: public The WebView executor has no benefits compared to the JSC executor (slower, no extra debugging tools...), and it's pretty hacky (since it injects the code in a script tag we have to check for tags in the comments and etc...). Reviewed By: nicklockwood, javache Differential Revision: D2636465 fb-gh-sync-id: 0d0f8a59e2c12fe7905b02060b3938c894d2802b
This commit is contained in:
committed by
facebook-github-bot-3
parent
2eb8068cf1
commit
0764e4ef29
@@ -415,13 +415,6 @@ RCT_EXPORT_MODULE()
|
||||
}]];
|
||||
}
|
||||
|
||||
Class safariExecutorClass = NSClassFromString(@"RCTWebViewExecutor");
|
||||
BOOL isDebuggingInSafari = _executorClass && _executorClass == safariExecutorClass;
|
||||
NSString *debugTitleSafari = isDebuggingInSafari ? @"Disable Safari Debugging" : @"Debug in Safari";
|
||||
[items addObject:[RCTDevMenuItem buttonItemWithTitle:debugTitleSafari handler:^{
|
||||
weakSelf.executorClass = isDebuggingInSafari ? Nil : safariExecutorClass;
|
||||
}]];
|
||||
|
||||
if (_liveReloadURL) {
|
||||
NSString *liveReloadTitle = _liveReloadEnabled ? @"Disable Live Reload" : @"Enable Live Reload";
|
||||
[items addObject:[RCTDevMenuItem buttonItemWithTitle:liveReloadTitle handler:^{
|
||||
@@ -552,8 +545,7 @@ RCT_EXPORT_METHOD(reload)
|
||||
// needed to prevent overriding a custom executor with the default if a
|
||||
// custom executor has been set directly on the bridge
|
||||
if (executorClass == Nil &&
|
||||
(_bridge.executorClass != NSClassFromString(@"RCTWebSocketExecutor") &&
|
||||
_bridge.executorClass != NSClassFromString(@"RCTWebViewExecutor"))) {
|
||||
_bridge.executorClass != NSClassFromString(@"RCTWebSocketExecutor")) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user