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 c1f74c4286e808879c9edb1af455d55690c9cafd..f3985f161c43ac3deb84ab1033e8e1aa97b8a0dd 100644 |
--- a/third_party/WebKit/Source/bindings/core/v8/V8GCController.cpp |
+++ b/third_party/WebKit/Source/bindings/core/v8/V8GCController.cpp |
@@ -116,7 +116,8 @@ public: |
v8::Local<v8::Object> wrapper = v8::Local<v8::Object>::New(m_isolate, v8::Persistent<v8::Object>::Cast(*value)); |
ASSERT(V8DOMWrapper::hasInternalFieldsSet(wrapper)); |
- if (toWrapperTypeInfo(wrapper)->hasPendingActivity(wrapper)) { |
+ if (toWrapperTypeInfo(wrapper)->isActiveScriptWrappable() |
haraken
2016/08/23 07:55:40
Do we need to check isActiveScriptWrappable()? I'm
Yuki
2016/08/23 09:49:52
Not necessary, but I'd expect isActiveScriptWrappa
|
+ && toScriptWrappable(wrapper)->hasPendingActivity()) { |
v8::Persistent<v8::Object>::Cast(*value).MarkActive(); |
return; |
} |
@@ -161,11 +162,12 @@ public: |
ASSERT(V8DOMWrapper::hasInternalFieldsSet(wrapper)); |
const WrapperTypeInfo* type = toWrapperTypeInfo(wrapper); |
- if (type->hasPendingActivity(wrapper)) { |
+ if (type->isActiveScriptWrappable() |
+ && toScriptWrappable(wrapper)->hasPendingActivity()) { |
// 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 [DependentLifetime]. |
- RELEASE_ASSERT(!value->IsIndependent()); |
+ CHECK(!value->IsIndependent()); |
m_isolate->SetObjectGroupId(*value, liveRootId()); |
++m_domObjectsWithPendingActivity; |
} |
@@ -457,7 +459,8 @@ public: |
v8::Local<v8::Object> wrapper = v8::Local<v8::Object>::New(m_isolate, v8::Persistent<v8::Object>::Cast(*value)); |
ASSERT(V8DOMWrapper::hasInternalFieldsSet(wrapper)); |
// The ExecutionContext check is heavy, so it should be done at the last. |
- if (toWrapperTypeInfo(wrapper)->hasPendingActivity(wrapper) |
+ if (toWrapperTypeInfo(wrapper)->isActiveScriptWrappable() |
+ && toScriptWrappable(wrapper)->hasPendingActivity() |
// TODO(haraken): Currently we don't have a way to get a creation |
// context from a wrapper. We should implement the way and enable |
// the following condition. |