mirror of
https://github.com/electron/electron.git
synced 2026-01-10 07:58:08 -05:00
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:
@@ -6,6 +6,7 @@
|
||||
|
||||
#include "content/public/renderer/render_thread.h"
|
||||
#include "extensions/renderer/dispatcher.h"
|
||||
#include "shell/common/world_ids.h"
|
||||
#include "shell/renderer/extensions/electron_extensions_dispatcher_delegate.h"
|
||||
|
||||
namespace electron {
|
||||
@@ -24,11 +25,7 @@ bool ElectronExtensionsRendererClient::IsIncognitoProcess() const {
|
||||
}
|
||||
|
||||
int ElectronExtensionsRendererClient::GetLowestIsolatedWorldId() const {
|
||||
// app_shell doesn't need to reserve world IDs for anything other than
|
||||
// extensions, so we always return 1. Note that 0 is reserved for the global
|
||||
// world.
|
||||
// TODO(samuelmaddock): skip electron worlds
|
||||
return 10;
|
||||
return WorldIDs::ISOLATED_WORLD_ID_EXTENSIONS;
|
||||
}
|
||||
|
||||
extensions::Dispatcher* ElectronExtensionsRendererClient::GetDispatcher() {
|
||||
|
||||
Reference in New Issue
Block a user