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

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: Rebase 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 4e934b943e95673a62bf4e59e956e0bc52a61673..ed9ca82ac49464dbe49a6a36b36bb78bbacc193a 100644
--- a/third_party/WebKit/Source/bindings/core/v8/V8GCController.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/V8GCController.cpp
@@ -133,9 +133,8 @@ public:
// Note that node->wrapper().IsEmpty() returns true for nodes that
// 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())
+ ScriptWrappable* scriptwrappable = getInternalField<ScriptWrappable, v8DOMWrapperObjectIndex>(wrapper);
+ if (scriptwrappable && scriptwrappable->hasPendingActivity())
return;
// FIXME: Remove the special handling for image elements.
// The same special handling is in V8GCController::opaqueRootForGC().
@@ -263,8 +262,8 @@ public:
const WrapperTypeInfo* type = toWrapperTypeInfo(wrapper);
- ActiveDOMObject* activeDOMObject = type->toActiveDOMObject(wrapper);
- if (activeDOMObject && activeDOMObject->hasPendingActivity()) {
+ ScriptWrappable* scriptwrappable = getInternalField<ScriptWrappable, v8DOMWrapperObjectIndex>(wrapper);
haraken 2015/10/09 09:48:09 Is it guaranteed that NPObject has the internal fi
+ if (scriptwrappable && scriptwrappable->hasPendingActivity()) {
m_isolate->SetObjectGroupId(*value, liveRootId());
++m_domObjectsWithPendingActivity;
}
« no previous file with comments | « third_party/WebKit/Source/bindings/core/v8/ScriptWrappable.cpp ('k') | third_party/WebKit/Source/core/dom/ActiveDOMObject.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698