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

Unified Diff: third_party/WebKit/Source/bindings/core/v8/ScriptWrappable.h

Issue 2693893007: binding: Changes the association among global-proxy/global/window-instance (2nd attempt). (Closed)
Patch Set: Fixed a typo in DOMWrapperWorld::DissociateDOMWindowWrappersInAllWorlds. Created 3 years, 8 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/ScriptWrappable.h
diff --git a/third_party/WebKit/Source/bindings/core/v8/ScriptWrappable.h b/third_party/WebKit/Source/bindings/core/v8/ScriptWrappable.h
index e6f3e2d08e9777152705f98795855ec6532ed91f..66e7deaf68b67db8dfeb46cd23081e3cd0c060e9 100644
--- a/third_party/WebKit/Source/bindings/core/v8/ScriptWrappable.h
+++ b/third_party/WebKit/Source/bindings/core/v8/ScriptWrappable.h
@@ -130,6 +130,14 @@ class CORE_EXPORT ScriptWrappable : public TraceWrapperBase {
return true;
}
+ // Dissociates the wrapper, if any, from this instance.
+ void UnsetWrapperIfAny() {
+ if (ContainsWrapper()) {
+ main_world_wrapper_.Reset();
+ WrapperTypeInfo::WrapperDestroyed();
+ }
+ }
+
bool IsEqualTo(const v8::Local<v8::Object>& other) const {
return main_world_wrapper_ == other;
}

Powered by Google App Engine
This is Rietveld 408576698