fix(extensions): set lowest isolated world id (#22212)
* fix(extensions): set lowest isolated world id * refactor: move world IDs into separate header file Several files are including electron_render_frame_observer.h just for the world IDs.
This commit is contained in:
parent
68c6d53156
commit
8cc0435d9c
7 changed files with 45 additions and 33 deletions
|
@ -24,11 +24,11 @@
|
|||
#include "shell/common/color_util.h"
|
||||
#include "shell/common/gin_helper/dictionary.h"
|
||||
#include "shell/common/options_switches.h"
|
||||
#include "shell/common/world_ids.h"
|
||||
#include "shell/renderer/browser_exposed_renderer_interfaces.h"
|
||||
#include "shell/renderer/content_settings_observer.h"
|
||||
#include "shell/renderer/electron_api_service_impl.h"
|
||||
#include "shell/renderer/electron_autofill_agent.h"
|
||||
#include "shell/renderer/electron_render_frame_observer.h"
|
||||
#include "third_party/blink/public/common/associated_interfaces/associated_interface_registry.h"
|
||||
#include "third_party/blink/public/web/blink.h"
|
||||
#include "third_party/blink/public/web/web_custom_element.h" // NOLINT(build/include_alpha)
|
||||
|
@ -424,7 +424,7 @@ v8::Local<v8::Context> RendererClientBase::GetContext(
|
|||
blink::WebLocalFrame* frame,
|
||||
v8::Isolate* isolate) const {
|
||||
if (isolated_world())
|
||||
return frame->WorldScriptContext(isolate, World::ISOLATED_WORLD);
|
||||
return frame->WorldScriptContext(isolate, WorldIDs::ISOLATED_WORLD_ID);
|
||||
else
|
||||
return frame->MainWorldScriptContext();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue