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

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

Issue 1133713008: [WIP] Migrate hasPendingActivity from ActiveDOMObject to ScriptWrappable. Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Review Comments Created 5 years, 2 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 d37514736d20a7124f5cfcb7b788c0bde8bd971d..e0d241cf7da4bdf1dd63afd4b9112c7909ea66f0 100644
--- a/third_party/WebKit/Source/bindings/core/v8/V8GCController.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/V8GCController.cpp
@@ -31,6 +31,7 @@
#include "config.h"
#include "bindings/core/v8/V8GCController.h"
+#include "bindings/core/v8/NPV8Object.h"
#include "bindings/core/v8/RetainedDOMInfo.h"
#include "bindings/core/v8/V8AbstractEventListener.h"
#include "bindings/core/v8/V8Binding.h"
@@ -144,8 +145,7 @@ public:
// do not have wrappers in the main world.
if (node->containsWrapper()) {
const WrapperTypeInfo* type = toWrapperTypeInfo(wrapper);
- ActiveDOMObject* activeDOMObject = type->toActiveDOMObject(wrapper);
- if (activeDOMObject && activeDOMObject->hasPendingActivity())
+ if (type != npObjectTypeInfo() && toScriptWrappable(wrapper)->hasPendingActivity())
return;
// FIXME: Remove the special handling for image elements.
// The same special handling is in V8GCController::opaqueRootForGC().
@@ -272,9 +272,7 @@ public:
return;
const WrapperTypeInfo* type = toWrapperTypeInfo(wrapper);
-
- ActiveDOMObject* activeDOMObject = type->toActiveDOMObject(wrapper);
- if (activeDOMObject && activeDOMObject->hasPendingActivity()) {
+ if (type != npObjectTypeInfo() && toScriptWrappable(wrapper)->hasPendingActivity()) {
m_isolate->SetObjectGroupId(*value, liveRootId());
++m_domObjectsWithPendingActivity;
}

Powered by Google App Engine
This is Rietveld 408576698