| Index: Source/bindings/v8/V8GCController.cpp
|
| diff --git a/Source/bindings/v8/V8GCController.cpp b/Source/bindings/v8/V8GCController.cpp
|
| index 027481fe0c688d0565082a10fb6e41e994a81f60..bffb6fcecc5927aa591c355713f3316f9b94e48f 100644
|
| --- a/Source/bindings/v8/V8GCController.cpp
|
| +++ b/Source/bindings/v8/V8GCController.cpp
|
| @@ -70,11 +70,12 @@ static void addReferencesForNodeWithEventListeners(v8::Isolate* isolate, Node* n
|
|
|
| Node* V8GCController::opaqueRootForGC(Node* node, v8::Isolate*)
|
| {
|
| + ASSERT(node);
|
| // FIXME: Remove the special handling for image elements.
|
| // The same special handling is in V8GCController::gcTree().
|
| // Maybe should image elements be active DOM nodes?
|
| // See https://code.google.com/p/chromium/issues/detail?id=164882
|
| - if (node->inDocument() || (node->hasTagName(HTMLNames::imgTag) && toHTMLImageElement(node)->hasPendingActivity()))
|
| + if (node->inDocument() || (isHTMLImageElement(*node) && toHTMLImageElement(*node).hasPendingActivity()))
|
| return &node->document();
|
|
|
| if (node->isAttributeNode()) {
|
| @@ -134,7 +135,7 @@ public:
|
| // The same special handling is in V8GCController::opaqueRootForGC().
|
| // Maybe should image elements be active DOM nodes?
|
| // See https://code.google.com/p/chromium/issues/detail?id=164882
|
| - if (node->hasTagName(HTMLNames::imgTag) && toHTMLImageElement(node)->hasPendingActivity())
|
| + if (isHTMLImageElement(*node) && toHTMLImageElement(*node).hasPendingActivity())
|
| return;
|
| // FIXME: Remove the special handling for SVG context elements.
|
| if (node->isSVGElement() && toSVGElement(node)->isContextElement())
|
| @@ -187,8 +188,8 @@ private:
|
| }
|
| // <template> has a |content| property holding a DOM fragment which we must traverse,
|
| // just like we do for the shadow trees above.
|
| - if (node->hasTagName(HTMLNames::templateTag)) {
|
| - if (!traverseTree(toHTMLTemplateElement(node)->content(), partiallyDependentNodes))
|
| + if (isHTMLTemplateElement(*node)) {
|
| + if (!traverseTree(toHTMLTemplateElement(*node).content(), partiallyDependentNodes))
|
| return false;
|
| }
|
| }
|
|
|