mirror of
https://github.com/electron/electron.git
synced 2026-01-28 00:38:35 -05:00
Some blink::WebSecurityPolicy methods should be invoked before other render threads are created
This commit is contained in:
@@ -113,6 +113,10 @@ void RendererClientBase::RenderThreadStarted() {
|
||||
blink::SchemeRegistry::RegisterURLSchemeAsSecure(
|
||||
WTF::String::FromUTF8(scheme.data(), scheme.length()));
|
||||
|
||||
// Allow file scheme to handle service worker by default.
|
||||
// FIXME(zcbenz): Can this be moved elsewhere?
|
||||
blink::WebSecurityPolicy::RegisterURLSchemeAsAllowingServiceWorkers("file");
|
||||
|
||||
preferences_manager_.reset(new PreferencesManager);
|
||||
|
||||
#if defined(OS_WIN)
|
||||
@@ -145,10 +149,6 @@ void RendererClientBase::RenderFrameCreated(
|
||||
new ContentSettingsObserver(render_frame);
|
||||
new printing::PrintWebViewHelper(render_frame);
|
||||
|
||||
// Allow file scheme to handle service worker by default.
|
||||
// FIXME(zcbenz): Can this be moved elsewhere?
|
||||
blink::WebSecurityPolicy::RegisterURLSchemeAsAllowingServiceWorkers("file");
|
||||
|
||||
// This is required for widevine plugin detection provided during runtime.
|
||||
blink::ResetPluginCache();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user