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

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

Issue 1615523002: Transitively keep track of an isolated world's children scripts and worlds. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use a static world stack instead of a per-world private field Created 4 years, 11 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
Index: third_party/WebKit/Source/bindings/core/v8/DOMWrapperWorld.cpp
diff --git a/third_party/WebKit/Source/bindings/core/v8/DOMWrapperWorld.cpp b/third_party/WebKit/Source/bindings/core/v8/DOMWrapperWorld.cpp
index c48e4cbdbb092041cdfa36468d72c3f6335553a2..9905cdffed1dbcb7e146cf5f5a6a57112e1acf67 100644
--- a/third_party/WebKit/Source/bindings/core/v8/DOMWrapperWorld.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/DOMWrapperWorld.cpp
@@ -137,6 +137,13 @@ void DOMWrapperWorld::allWorldsInMainThread(Vector<RefPtr<DOMWrapperWorld>>& wor
worlds.append(it->value);
}
+Vector<RefPtr<DOMWrapperWorld>>& DOMWrapperWorld::originWorldStack()
+{
+ ASSERT(isMainThread());
+ DEFINE_STATIC_LOCAL(Vector<RefPtr<DOMWrapperWorld>>, worldStack, ());
+ return worldStack;
+}
+
DOMWrapperWorld::~DOMWrapperWorld()
{
ASSERT(!isMainWorld());

Powered by Google App Engine
This is Rietveld 408576698