Changeset 84749 in webkit


Ignore:
Timestamp:
Apr 23, 2011 6:31:23 PM (13 years ago)
Author:
morrita@google.com
Message:

2011-04-23 Dominic Cooney <dominicc@chromium.org>

Reviewed by Dimitri Glazkov.

[V8] Nodes in shadow DOM should not be GCed while their hosts are alive
https://bugs.webkit.org/show_bug.cgi?id=59284

  • fast/dom/shadow/gc-shadow-expected.txt: Added.
  • fast/dom/shadow/gc-shadow.html: Added.

2011-04-23 Dominic Cooney <dominicc@chromium.org>

Reviewed by Dimitri Glazkov.

[V8] Nodes in shadow DOM should not be GCed while their hosts are alive
https://bugs.webkit.org/show_bug.cgi?id=59284

Test: fast/dom/shadow/gc-shadow.html

  • bindings/v8/V8GCController.cpp: (WebCore::calculateGroupId): group shadow nodes with their hosts

2011-04-23 Dominic Cooney <dominicc@chromium.org>

Reviewed by Dimitri Glazkov.

[V8] Nodes in shadow DOM should not be GCed while their hosts are alive
https://bugs.webkit.org/show_bug.cgi?id=59284

Chromium DRT over-refcounted the NPObject wrappers it used to
marshal shadowRoot nodes back to tests (WebBindings::makeNode
births NPObjects with referenceCount == 1). This masked the GC bug
59284 in tests by making shadowRoot nodes live forever.

  • DumpRenderTree/chromium/LayoutTestController.cpp: (LayoutTestController::shadowRoot): (LayoutTestController::ensureShadowRoot):
Location:
trunk
Files:
2 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r84746 r84749  
     12011-04-23  Dominic Cooney  <dominicc@chromium.org>
     2
     3        Reviewed by Dimitri Glazkov.
     4
     5        [V8] Nodes in shadow DOM should not be GCed while their hosts are alive
     6        https://bugs.webkit.org/show_bug.cgi?id=59284
     7
     8        * fast/dom/shadow/gc-shadow-expected.txt: Added.
     9        * fast/dom/shadow/gc-shadow.html: Added.
     10
    1112011-04-23  MORITA Hajime <morrita@google.com>
    212
  • trunk/Source/WebCore/ChangeLog

    r84747 r84749  
     12011-04-23  Dominic Cooney  <dominicc@chromium.org>
     2
     3        Reviewed by Dimitri Glazkov.
     4
     5        [V8] Nodes in shadow DOM should not be GCed while their hosts are alive
     6        https://bugs.webkit.org/show_bug.cgi?id=59284
     7
     8        Test: fast/dom/shadow/gc-shadow.html
     9
     10        * bindings/v8/V8GCController.cpp:
     11        (WebCore::calculateGroupId): group shadow nodes with their hosts
     12
    1132011-04-23  MORITA Hajime <morrita@google.com>
    214
  • trunk/Source/WebCore/bindings/v8/V8GCController.cpp

    r84741 r84749  
    280280            return GroupId();
    281281    } else {
    282         while (Node* parent = root->parentNode())
     282        while (Node* parent = root->parentOrHostNode())
    283283            root = parent;
    284284    }
  • trunk/Tools/ChangeLog

    r84743 r84749  
     12011-04-23  Dominic Cooney  <dominicc@chromium.org>
     2
     3        Reviewed by Dimitri Glazkov.
     4
     5        [V8] Nodes in shadow DOM should not be GCed while their hosts are alive
     6        https://bugs.webkit.org/show_bug.cgi?id=59284
     7
     8        Chromium DRT over-refcounted the NPObject wrappers it used to
     9        marshal shadowRoot nodes back to tests (WebBindings::makeNode
     10        births NPObjects with referenceCount == 1). This masked the GC bug
     11        59284 in tests by making shadowRoot nodes live forever.
     12
     13        * DumpRenderTree/chromium/LayoutTestController.cpp:
     14        (LayoutTestController::shadowRoot):
     15        (LayoutTestController::ensureShadowRoot):
     16
    1172011-04-23  Kevin Ollivier  <kevino@theolliviers.com>
    218
  • trunk/Tools/DumpRenderTree/chromium/LayoutTestController.cpp

    r84472 r84749  
    666666    }
    667667
    668     WebNode shadowRoot = element.shadowRoot();
    669     if (shadowRoot.isNull()) {
     668    NPObject* shadowRoot = WebBindings::makeNode(element.shadowRoot());
     669    if (!shadowRoot) {
    670670        result->setNull();
    671671        return;
    672672    }
    673673
    674     result->set(WebBindings::makeNode(shadowRoot));
     674    result->set(shadowRoot);
     675    WebBindings::releaseObject(shadowRoot);
    675676}
    676677
     
    688689    }
    689690
    690     result->set(WebBindings::makeNode(element.ensureShadowRoot()));
     691    NPObject* shadowRoot = WebBindings::makeNode(element.ensureShadowRoot());
     692    if (!shadowRoot) {
     693        result->setNull();
     694        return;
     695    }
     696
     697    result->set(shadowRoot);
     698    WebBindings::releaseObject(shadowRoot);
    691699}
    692700
Note: See TracChangeset for help on using the changeset viewer.