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

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

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/V8GCController.cpp
diff --git a/third_party/WebKit/Source/bindings/core/v8/V8GCController.cpp b/third_party/WebKit/Source/bindings/core/v8/V8GCController.cpp
index 4307080e5322e2cf88ca3f7319d1d00b7104c6ca..88b07200e6c0d50109a54023a7ffcdeef2698210 100644
--- a/third_party/WebKit/Source/bindings/core/v8/V8GCController.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/V8GCController.cpp
@@ -32,6 +32,7 @@
#include "bindings/core/v8/ActiveScriptWrappable.h"
#include "bindings/core/v8/RetainedDOMInfo.h"
+#include "bindings/core/v8/ScriptWrappableVisitor.h"
#include "bindings/core/v8/V8AbstractEventListener.h"
#include "bindings/core/v8/V8Binding.h"
#include "bindings/core/v8/V8MutationObserver.h"
@@ -168,7 +169,7 @@ public:
if (type->hasPendingActivity(wrapper)) {
// If you hit this assert, you'll need to add a [DependentiLifetime]
// extended attribute to the DOM interface. A DOM interface that
- // overrides hasPendingActivity must be marked as [DependentiLifetime].
+ // overrides hasPendingActivity must be marked as [DependentLifetime].
RELEASE_ASSERT(!value->IsIndependent());
m_isolate->SetObjectGroupId(*value, liveRootId());
++m_domObjectsWithPendingActivity;
@@ -259,6 +260,9 @@ void objectGroupingForMajorGC(v8::Isolate* isolate, bool constructRetainedObject
void gcPrologueForMajorGC(v8::Isolate* isolate, bool constructRetainedObjectInfos)
{
+ if (RuntimeEnabledFeatures::traceWrappablesEnabled())
+ return;
+
objectGroupingForMajorGC(isolate, constructRetainedObjectInfos);
}

Powered by Google App Engine
This is Rietveld 408576698