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

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

Issue 2617733004: binding: Changes the association among global-proxy/global/window-instance. (Closed)
Patch Set: Addressed review comments. Created 3 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
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 7f774b237070d7053468c1e099e356bb3dc0444d..ec78f7f738dc740185fcea1b8f04c9a83aab0216 100644
--- a/third_party/WebKit/Source/bindings/core/v8/DOMWrapperWorld.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/DOMWrapperWorld.cpp
@@ -30,19 +30,13 @@
#include "bindings/core/v8/DOMWrapperWorld.h"
+#include <memory>
+
#include "bindings/core/v8/DOMDataStore.h"
-#include "bindings/core/v8/ScriptController.h"
-#include "bindings/core/v8/V8Binding.h"
-#include "bindings/core/v8/V8DOMActivityLogger.h"
-#include "bindings/core/v8/V8DOMWrapper.h"
-#include "bindings/core/v8/V8Window.h"
-#include "bindings/core/v8/WindowProxy.h"
-#include "bindings/core/v8/WrapperTypeInfo.h"
-#include "core/dom/ExecutionContext.h"
+#include "bindings/core/v8/ScriptFunction.h"
#include "wtf/HashTraits.h"
#include "wtf/PtrUtil.h"
#include "wtf/StdLibExtras.h"
-#include <memory>
namespace blink {
@@ -315,4 +309,16 @@ void DOMWrapperWorld::weakCallbackForDOMObjectHolder(
holderBase->world()->unregisterDOMObjectHolder(holderBase);
}
+void DOMWrapperWorld::dissociateDOMWindowWrappersInAllWorlds(
+ ScriptWrappable* scriptWrappable) {
+ DCHECK(scriptWrappable);
+ DCHECK(isMainThread());
+
+ scriptWrappable->unsetWrapperIfAny();
+
+ for (auto& world : isolatedWorldMap().values()) {
+ world->domDataStore().unsetWrapperIfAny(scriptWrappable);
+ }
+}
+
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698