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

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

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/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 cc970e70ecff0d9c37674b30f0c53cc4075e405e..86f7ae5098299f762aa7592a496f247be059e03b 100644
--- a/third_party/WebKit/Source/bindings/core/v8/ScriptWrappable.h
+++ b/third_party/WebKit/Source/bindings/core/v8/ScriptWrappable.h
@@ -128,6 +128,14 @@ class CORE_EXPORT ScriptWrappable : public TraceWrapperBase {
return true;
}
+ // Dissociates the wrapper, if any, from this instance.
+ void unsetWrapperIfAny() {
+ if (containsWrapper()) {
+ m_mainWorldWrapper.Reset();
+ WrapperTypeInfo::wrapperDestroyed();
+ }
+ }
+
bool isEqualTo(const v8::Local<v8::Object>& other) const {
return m_mainWorldWrapper == other;
}
« no previous file with comments | « third_party/WebKit/Source/bindings/core/v8/DOMWrapperWorld.cpp ('k') | third_party/WebKit/Source/bindings/core/v8/ToV8.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698