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

Unified Diff: Source/bindings/v8/DOMWrapperWorld.h

Issue 180743013: Ensure DOMWrapperWorld always exists in all webkit_unit_tests (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 10 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 | Source/bindings/v8/DOMWrapperWorld.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/v8/DOMWrapperWorld.h
diff --git a/Source/bindings/v8/DOMWrapperWorld.h b/Source/bindings/v8/DOMWrapperWorld.h
index 100c6160021209239b98db46fca7cf872fe3fc1d..da5e3efc5ba7c60a6013b79701e78c97bf50200c 100644
--- a/Source/bindings/v8/DOMWrapperWorld.h
+++ b/Source/bindings/v8/DOMWrapperWorld.h
@@ -50,13 +50,15 @@ enum WorldIdConstants {
// Embedder isolated worlds can use IDs in [1, 1<<29).
EmbedderWorldIdLimit = (1 << 29),
ScriptPreprocessorIsolatedWorldId,
+ IsolatedWorldIdLimit,
WorkerWorldId,
+ TestingWorldId,
};
// This class represent a collection of DOM wrappers for a specific world.
class DOMWrapperWorld : public RefCounted<DOMWrapperWorld> {
public:
- static PassRefPtr<DOMWrapperWorld> create(int worldId, int extensionGroup);
+ static PassRefPtr<DOMWrapperWorld> create(int worldId = -1, int extensionGroup = -1);
static const int mainWorldExtensionGroup = 0;
static PassRefPtr<DOMWrapperWorld> ensureIsolatedWorld(int worldId, int extensionGroup);
@@ -96,7 +98,7 @@ public:
bool isMainWorld() const { return m_worldId == MainWorldId; }
bool isWorkerWorld() const { return m_worldId == WorkerWorldId; }
- bool isIsolatedWorld() const { return !isMainWorld() && !isWorkerWorld(); }
+ bool isIsolatedWorld() const { return MainWorldId < m_worldId && m_worldId < IsolatedWorldIdLimit; }
int worldId() const { return m_worldId; }
int extensionGroup() const { return m_extensionGroup; }
« no previous file with comments | « no previous file | Source/bindings/v8/DOMWrapperWorld.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698