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

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

Issue 2454433002: [Extensions + Blink] Account for user gesture in v8 function calls (Closed)
Patch Set: nits Created 4 years, 1 month 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 9080babd3ac986d76bd3065f2a75a58ca519d961..beaa9ef9cef64ad531b334f21b0750cb8d49da93 100644
--- a/third_party/WebKit/Source/bindings/core/v8/DOMWrapperWorld.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/DOMWrapperWorld.cpp
@@ -122,6 +122,14 @@ DOMWrapperWorld& DOMWrapperWorld::privateScriptIsolatedWorld() {
return *cachedPrivateScriptIsolatedWorld;
}
+PassRefPtr<DOMWrapperWorld> DOMWrapperWorld::fromWorldId(v8::Isolate* isolate,
+ int worldId,
+ int extensionGroup) {
+ if (worldId == MainWorldId)
+ return &mainWorld();
+ return ensureIsolatedWorld(isolate, worldId, extensionGroup);
+}
+
typedef HashMap<int, DOMWrapperWorld*> WorldMap;
static WorldMap& isolatedWorldMap() {
ASSERT(isMainThread());

Powered by Google App Engine
This is Rietveld 408576698