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

Unified Diff: Source/bindings/v8/V8Binding.cpp

Issue 16904002: Avoid leaking objects between isolated worlds via attribute event listeners (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Patch for landing Created 7 years, 6 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 | « Source/bindings/v8/V8Binding.h ('k') | Source/core/dom/Document.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/v8/V8Binding.cpp
diff --git a/Source/bindings/v8/V8Binding.cpp b/Source/bindings/v8/V8Binding.cpp
index 9bd2b00b53eb63f053611e22034683d387649fd4..1a6b54c1761c9f6d7a9a9ff5fccb272a0957f5b6 100644
--- a/Source/bindings/v8/V8Binding.cpp
+++ b/Source/bindings/v8/V8Binding.cpp
@@ -433,4 +433,15 @@ WrapperWorldType worldTypeInMainThread(v8::Isolate* isolate)
return MainWorld;
}
+DOMWrapperWorld* isolatedWorldForIsolate(v8::Isolate* isolate)
+{
+ V8PerIsolateData* data = V8PerIsolateData::from(isolate);
+ if (data->workerDOMDataStore())
+ return 0;
+ if (!DOMWrapperWorld::isolatedWorldsExist())
+ return 0;
+ ASSERT(!v8::Context::GetEntered().IsEmpty());
+ return DOMWrapperWorld::isolatedWorld(v8::Context::GetEntered());
+}
+
} // namespace WebCore
« no previous file with comments | « Source/bindings/v8/V8Binding.h ('k') | Source/core/dom/Document.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698