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

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: 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
Index: Source/bindings/v8/V8Binding.cpp
diff --git a/Source/bindings/v8/V8Binding.cpp b/Source/bindings/v8/V8Binding.cpp
index 9bd2b00b53eb63f053611e22034683d387649fd4..1d807a497efac5950dfdd2e665039ca84428d754 100644
--- a/Source/bindings/v8/V8Binding.cpp
+++ b/Source/bindings/v8/V8Binding.cpp
@@ -433,4 +433,17 @@ WrapperWorldType worldTypeInMainThread(v8::Isolate* isolate)
return MainWorld;
}
+DOMWrapperWorld* worldForIsolate(v8::Isolate* isolate)
marja 2013/06/13 13:56:29 The name is slightly confusing, since this only re
adamk 2013/06/13 18:55:07 Renamed to isolatedWorldForIsolate(). Also changed
+{
+ V8PerIsolateData* data = V8PerIsolateData::from(isolate);
+ if (data->workerDOMDataStore())
+ return 0;
+ if (!DOMWrapperWorld::isolatedWorldsExist())
+ return 0;
+ ASSERT(!v8::Context::GetEntered().IsEmpty());
+ if (DOMWrapperWorld* isolatedWorld = DOMWrapperWorld::isolatedWorld(v8::Context::GetEntered()))
marja 2013/06/13 13:56:29 Shorter (instead of these 3 lines): return DOMWra
adamk 2013/06/13 18:55:07 Fixed, this was an artifact of a previous version
+ return isolatedWorld;
+ return 0;
+}
+
} // namespace WebCore

Powered by Google App Engine
This is Rietveld 408576698