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
|
@ -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() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue