Chromium Code Reviews| 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..bef2553145f169915948ab1f140603256c75b3dd 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 IsolatedWorldIdLimit. Don't manually pick |
| + // up an ID from this range. generateWorldIdForType() picks it up on behalf |
| + // of you. |
| }; |
| enum class WorldType { |
| @@ -149,10 +146,10 @@ class CORE_EXPORT DOMWrapperWorld : public RefCounted<DOMWrapperWorld> { |
| static unsigned s_numberOfNonMainWorldsInMainThread; |
|
peria
2017/03/14 09:52:46
optional: Can this static variable be replaced wit
nhiroki
2017/03/14 10:58:28
It'd be feasible. I'll work on it in a follow-up C
|
| - // 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; |