refactor: remove more dead code post render process reuse (#28983)

* Overrides for window.history.*
* Node environment cleanup / creation logic
* Options and switches that are now static values
This commit is contained in:
Samuel Attard 2021-05-04 11:30:29 -07:00 committed by GitHub
parent 38c877e9d3
commit e5e8ab4eea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 10 additions and 92 deletions

View file

@ -73,15 +73,10 @@ void ElectronRenderFrameObserver::DidInstallConditionalFeatures(
// DidCreateScriptContext();
bool is_main_world = IsMainWorld(world_id);
bool is_main_frame = render_frame_->IsMainFrame();
bool reuse_renderer_processes_enabled =
prefs.disable_electron_site_instance_overrides;
bool is_not_opened = !render_frame_->GetWebFrame()->Opener() ||
prefs.node_leakage_in_renderers;
bool allow_node_in_sub_frames = prefs.node_integration_in_sub_frames;
bool should_create_isolated_context =
use_context_isolation && is_main_world &&
(is_main_frame || allow_node_in_sub_frames) &&
(is_not_opened || reuse_renderer_processes_enabled);
(is_main_frame || allow_node_in_sub_frames);
if (should_create_isolated_context) {
CreateIsolatedWorldContext();