Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(354)

Unified Diff: third_party/WebKit/Source/bindings/core/v8/DOMWrapperWorld.h

Issue 2735823006: Bindings: Manage multiple DOMWrapperWorlds for worklets (Closed)
Patch Set: address review comments Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/bindings/core/v8/DOMWrapperWorld.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/bindings/core/v8/DOMWrapperWorld.h
diff --git a/third_party/WebKit/Source/bindings/core/v8/DOMWrapperWorld.h b/third_party/WebKit/Source/bindings/core/v8/DOMWrapperWorld.h
index fefb76de14bc9e01517963b239412b481cb2cb22..d4821bd4ed988205ae3ba5aa9fc58157bf9c0e9f 100644
--- a/third_party/WebKit/Source/bindings/core/v8/DOMWrapperWorld.h
+++ b/third_party/WebKit/Source/bindings/core/v8/DOMWrapperWorld.h
@@ -61,12 +61,9 @@ class CORE_EXPORT DOMWrapperWorld : public RefCounted<DOMWrapperWorld> {
DocumentXMLTreeViewerWorldId,
IsolatedWorldIdLimit,
- // TODO(nhiroki): Dynamically allocate a world id for the following worlds
- // instead of a fixed value (https://crbug.com/697622).
- GarbageCollectorWorldId,
- RegExpWorldId,
- TestingWorldId,
- WorkerWorldId,
+ // Other worlds can use IDs after this. Don't manually pick up an ID from
+ // this range. generateWorldIdForType() picks it up on behalf of you.
+ UnspecifiedWorldIdStart,
};
enum class WorldType {
@@ -149,10 +146,10 @@ class CORE_EXPORT DOMWrapperWorld : public RefCounted<DOMWrapperWorld> {
static unsigned s_numberOfNonMainWorldsInMainThread;
- // Returns an identifier for a given world type. This must not call for
+ // Returns an identifier for a given world type. This must not be called for
// WorldType::IsolatedWorld because an identifier for the world is given from
// out of DOMWrapperWorld.
- static int getWorldIdForType(WorldType);
+ static int generateWorldIdForType(WorldType);
const WorldType m_worldType;
const int m_worldId;
« no previous file with comments | « no previous file | third_party/WebKit/Source/bindings/core/v8/DOMWrapperWorld.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698