mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
fix: make preload calculation identical between sandbox & non-sandboxed (#34585)
* fix: make preload calculation identical between sandbox & non-sandboxed * fix test * split IPCs * fix ipc constant * fix unneeded async function * remove unused preloads blink preferences * fix typings Co-authored-by: Jeremy Rose <japthorp@slack-corp.com>
This commit is contained in:
@@ -496,9 +496,7 @@ class WebFrameRenderer : public gin::Wrappable<WebFrameRenderer>,
|
||||
|
||||
const auto& prefs = render_frame->GetBlinkPreferences();
|
||||
|
||||
if (pref_name == options::kPreloadScripts) {
|
||||
return gin::ConvertToV8(isolate, prefs.preloads);
|
||||
} else if (pref_name == "isWebView") {
|
||||
if (pref_name == "isWebView") {
|
||||
// FIXME(zcbenz): For child windows opened with window.open('') from
|
||||
// webview, the WebPreferences is inherited from webview and the value
|
||||
// of |is_webview| is wrong.
|
||||
@@ -513,8 +511,6 @@ class WebFrameRenderer : public gin::Wrappable<WebFrameRenderer>,
|
||||
return gin::ConvertToV8(isolate, prefs.hidden_page);
|
||||
} else if (pref_name == options::kOffscreen) {
|
||||
return gin::ConvertToV8(isolate, prefs.offscreen);
|
||||
} else if (pref_name == options::kPreloadScript) {
|
||||
return gin::ConvertToV8(isolate, prefs.preload.value());
|
||||
} else if (pref_name == options::kNodeIntegration) {
|
||||
return gin::ConvertToV8(isolate, prefs.node_integration);
|
||||
} else if (pref_name == options::kNodeIntegrationInWorker) {
|
||||
|
||||
Reference in New Issue
Block a user