Source/WebCore/bindings/v8/V8GCController.cpp
static GroupId calculateGroupId(Node* node)
{
    if (node->inDocument() || (node->hasTagName(HTMLNames::imgTag) && !static_cast<HTMLImageElement*>(node)->haveFiredLoadEvent()))
        return GroupId(node->document());

    Node* root = node;
    if (node->isAttributeNode()) {
        root = static_cast<Attr*>(node)->ownerElement();
        // If the attribute has no element, no need to put it in the group,
        // because it'll always be a group of 1.
        if (!root)
            return GroupId();
    } else {
        while (Node* parent = root->parentNode())
            root = parent;
    }

    return GroupId(root);
}
// If the node is in document, put it in the ownerDocument's object group.
//
// If an image element was created by JavaScript "new Image",
// it is not in a document. However, if the load event has not
// been fired (still onloading), it is treated as in the document.
//
// Otherwise, the node is put in an object group identified by the root
// element of the tree to which it belongs.
If the node is in document, put it in the ownerDocument's object group.
If an image element was created by JavaScript "new Image",
it is not in a document. However, if the load event has not
been fired (still onloading), it is treated as in the document.

Otherwise, the node is put in an object group identified by the root
element of the tree to which it belongs.
If the node is in document put it in the ownerDocument ' s object group . If an image element was created by JavaScript " new Image " it is not in a document . However if the load event has not been fired ( still onloading ) it is treated as in the document . Otherwise the node is put in an object group identified by the root element of the tree to which it belongs .
static GroupId calculateGroupId(Node* node)
{
    if (node->inDocument() || (node->hasTagName(HTMLNames::imgTag) && !static_cast<HTMLImageElement*>(node)->haveFiredLoadEvent()))
        return GroupId(node->document());
    Node* root = node;
    if (node->isAttributeNode()) {
        root = static_cast<Attr*>(node)->ownerElement();
        if (!root)
            return GroupId();
    } else {
        while (Node* parent = root->parentNode())
            root = parent;
    }
    return GroupId(root);
}
static GroupId calculateGroupId ( Node * node ) { if ( node -> inDocument ( ) || ( node -> hasTagName ( HTMLNames :: imgTag ) && ! static_cast < HTMLImageElement * > ( node ) -> haveFiredLoadEvent ( ) ) ) return GroupId ( node -> document ( ) ) ; Node * root = node ; if ( node -> isAttributeNode ( ) ) { root = static_cast < Attr * > ( node ) -> ownerElement ( ) ; if ( ! root ) return GroupId ( ) ; } else { while ( Node * parent = root -> parentNode ( ) ) root = parent ; } return GroupId ( root ) ; }
If the node is in document, put it in the ownerDocument's object group.
If the node is in document put it in the ownerDocument ' s object group .
// If the attribute has no element, no need to put it in the group, // because it'll always be a group of 1.