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

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

Issue 1876383003: Introduce infrastructure for tracing ScriptWrappables. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix var used only in assert Created 4 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 a6150c7bba563e01834d4a6b2e3ea9302a807b9f..31597a055943bbbb7ed536f12639719273fd29e9 100644
--- a/third_party/WebKit/Source/bindings/core/v8/ScriptWrappable.h
+++ b/third_party/WebKit/Source/bindings/core/v8/ScriptWrappable.h
@@ -31,6 +31,7 @@
#ifndef ScriptWrappable_h
#define ScriptWrappable_h
+#include "bindings/core/v8/ScriptWrappableVisitor.h"
#include "bindings/core/v8/WrapperTypeInfo.h"
#include "core/CoreExport.h"
#include "platform/heap/Handle.h"
@@ -149,6 +150,15 @@ public:
bool containsWrapper() const { return !m_wrapper.IsEmpty(); }
+ /**
+ * Mark wrapper of this ScriptWrappable as alive in V8. Only marks
+ * wrapper in the main world. To mark wrappers in all worlds call
+ * ScriptWrappableVisitor::markWrapper(ScriptWrappable*, v8::Isolate*)
+ */
+ void markWrapper(v8::Isolate*) const;
+
+ DECLARE_VIRTUAL_TRACE_WRAPPERS() {};
+
// With Oilpan we don't need a ScriptWrappable destructor.
//
// 'RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(!containsWrapper())' is not needed

Powered by Google App Engine
This is Rietveld 408576698