- Revision
- 131838
- Author
- [email protected]
- Date
- 2012-10-18 18:53:03 -0700 (Thu, 18 Oct 2012)
Log Message
[V8] fast/dom/gc-9.html fails for document.implementation
https://bugs.webkit.org/show_bug.cgi?id=99783
Reviewed by Kentaro Hara.
Source/WebCore:
In order to correctly manage the lifetime of document.implementation,
we need to implement GenerateIsReachable=ImplDocument.
* bindings/scripts/CodeGeneratorV8.pm:
(GenerateVisitDOMWrapper):
* bindings/scripts/IDLAttributes.txt:
* dom/DOMImplementation.idl:
LayoutTests:
* platform/chromium/TestExpectations:
- TestExpectations claims that this test is "brain damaged", but it
looks like the test has improved since that comment was written
and that this test is actually quite valuable.
* platform/chromium/fast/dom/gc-9-expected.txt: Added.
- This patch adds a Chromium-specific baseline for this test.
Before this patch, we failed the document.implementation
subtests.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (131837 => 131838)
--- trunk/LayoutTests/ChangeLog 2012-10-19 01:32:38 UTC (rev 131837)
+++ trunk/LayoutTests/ChangeLog 2012-10-19 01:53:03 UTC (rev 131838)
@@ -1,3 +1,19 @@
+2012-10-18 Adam Barth <[email protected]>
+
+ [V8] fast/dom/gc-9.html fails for document.implementation
+ https://bugs.webkit.org/show_bug.cgi?id=99783
+
+ Reviewed by Kentaro Hara.
+
+ * platform/chromium/TestExpectations:
+ - TestExpectations claims that this test is "brain damaged", but it
+ looks like the test has improved since that comment was written
+ and that this test is actually quite valuable.
+ * platform/chromium/fast/dom/gc-9-expected.txt: Added.
+ - This patch adds a Chromium-specific baseline for this test.
+ Before this patch, we failed the document.implementation
+ subtests.
+
2012-10-18 Kent Tamura <[email protected]>
[Chromium] Test expectation update.
Modified: trunk/LayoutTests/platform/chromium/TestExpectations (131837 => 131838)
--- trunk/LayoutTests/platform/chromium/TestExpectations 2012-10-19 01:32:38 UTC (rev 131837)
+++ trunk/LayoutTests/platform/chromium/TestExpectations 2012-10-19 01:53:03 UTC (rev 131838)
@@ -677,11 +677,6 @@
# of ResourceHandleClient). That function is Mac-specific.
http/tests/misc/willCacheResponse-delegate-callback.html [ WontFix ]
-# Checks for very kjs-specific garbage collector
-# behavior. Gc-9 is completely braindamaged; it tests that certain
-# properties are reset by the garbage collector. It looks to pass recently.
-fast/dom/gc-9.html [ WontFix ]
-
# This test checks that properties of arguments arrays are non-enumerable
# which is incorrect according to the ES5 spec.
fast/js/kde/function.html [ WontFix ]
Added: trunk/LayoutTests/platform/chromium/fast/dom/gc-9-expected.txt (0 => 131838)
--- trunk/LayoutTests/platform/chromium/fast/dom/gc-9-expected.txt (rev 0)
+++ trunk/LayoutTests/platform/chromium/fast/dom/gc-9-expected.txt 2012-10-19 01:53:03 UTC (rev 131838)
@@ -0,0 +1,83 @@
+This page tests whether custom properties on DOM objects persist after garbage collection.
+
+If the test passes, you'll see a series of 'PASS' messages below.
+
+Because neither WinIE nor FF has reasonable or predictable behavior in this scenario, this test just documents our behavior to ensure that we don't change it accidentally. It is not a prescription for how things should behave.
+
+DOM OBJECTS BEFORE GARBAGE COLLECTION:
+PASS: document.implementation.myCustomProperty should be 1 and is.
+PASS: document.myCustomProperty should be 1 and is.
+PASS: document.body.myCustomProperty should be 1 and is.
+PASS: document.body.attributes.myCustomProperty should be 1 and is.
+PASS: document.getElementsByTagName('body').myCustomProperty should be 1 and is.
+PASS: document.getElementsByTagName('canvas')[0].getContext('2d').myCustomProperty should be 1 and is.
+PASS: document.getElementsByTagName('canvas')[0].getContext('2d').createLinearGradient(0, 0, 0, 0).myCustomProperty should be undefined and is.
+PASS: document.getElementsByTagName('canvas')[0].getContext('2d').createPattern(new Image(), 'no-repeat').myCustomProperty should be undefined and is.
+PASS: document.getElementsByTagName('select')[0].options.myCustomProperty should be 1 and is.
+PASS: document.body.childNodes.myCustomProperty should be 1 and is.
+PASS: document.all.myCustomProperty should be 1 and is.
+PASS: document.images.myCustomProperty should be 1 and is.
+PASS: document.embeds.myCustomProperty should be 1 and is.
+PASS: document.applets.myCustomProperty should be 1 and is.
+PASS: document.links.myCustomProperty should be 1 and is.
+PASS: document.forms.myCustomProperty should be 1 and is.
+PASS: document.anchors.myCustomProperty should be 1 and is.
+PASS: document.scripts.myCustomProperty should be 1 and is.
+PASS: document.getElementsByTagName('form')[0].elements.myCustomProperty should be 1 and is.
+PASS: document.getElementsByTagName('table')[0].rows.myCustomProperty should be 1 and is.
+PASS: document.getElementsByTagName('table')[0].rows[0].cells.myCustomProperty should be 1 and is.
+PASS: document.getElementsByTagName('table')[0].tBodies.myCustomProperty should be 1 and is.
+PASS: document.getElementsByTagName('table')[0].tBodies[0].rows.myCustomProperty should be 1 and is.
+PASS: document.body.children.myCustomProperty should be 1 and is.
+PASS: document.getElementsByTagName('map')[0].areas.myCustomProperty should be 1 and is.
+PASS: document.body.style.myCustomProperty should be 1 and is.
+PASS: document.body.style.getPropertyCSSValue('color').myCustomProperty should be 1 and is.
+PASS: document.styleSheets.myCustomProperty should be 1 and is.
+PASS: document.styleSheets[0].myCustomProperty should be 1 and is.
+PASS: document.styleSheets[0].cssRules.myCustomProperty should be 1 and is.
+PASS: document.styleSheets[0].cssRules[0].myCustomProperty should be 1 and is.
+PASS: new XPathEvaluator().myCustomProperty should be undefined and is.
+PASS: new XPathEvaluator().evaluate('/', document, null, 0, null).myCustomProperty should be undefined and is.
+PASS: document.createNSResolver(document).myCustomProperty should be undefined and is.
+PASS: document.createExpression('/', document.createNSResolver(document)).myCustomProperty should be undefined and is.
+DOM OBJECTS AFTER GARBAGE COLLECTION:
+PASS: document.implementation.myCustomProperty should be 1 and is.
+PASS: document.myCustomProperty should be 1 and is.
+PASS: document.body.myCustomProperty should be 1 and is.
+PASS: document.body.attributes.myCustomProperty should be 1 and is.
+PASS: document.getElementsByTagName('body').myCustomProperty should be 1 and is.
+FAIL: document.getElementsByTagName('canvas')[0].getContext('2d').myCustomProperty should be 1 but instead is undefined.
+PASS: document.getElementsByTagName('canvas')[0].getContext('2d').createLinearGradient(0, 0, 0, 0).myCustomProperty should be undefined and is.
+PASS: document.getElementsByTagName('canvas')[0].getContext('2d').createPattern(new Image(), 'no-repeat').myCustomProperty should be undefined and is.
+FAIL: document.getElementsByTagName('select')[0].options.myCustomProperty should be 1 but instead is undefined.
+PASS: document.body.childNodes.myCustomProperty should be 1 and is.
+PASS: document.all.myCustomProperty should be 1 and is.
+PASS: document.images.myCustomProperty should be 1 and is.
+PASS: document.embeds.myCustomProperty should be 1 and is.
+PASS: document.applets.myCustomProperty should be 1 and is.
+PASS: document.links.myCustomProperty should be 1 and is.
+PASS: document.forms.myCustomProperty should be 1 and is.
+PASS: document.anchors.myCustomProperty should be 1 and is.
+PASS: document.scripts.myCustomProperty should be 1 and is.
+PASS: document.getElementsByTagName('form')[0].elements.myCustomProperty should be 1 and is.
+PASS: document.getElementsByTagName('table')[0].rows.myCustomProperty should be 1 and is.
+PASS: document.getElementsByTagName('table')[0].rows[0].cells.myCustomProperty should be 1 and is.
+PASS: document.getElementsByTagName('table')[0].tBodies.myCustomProperty should be 1 and is.
+PASS: document.getElementsByTagName('table')[0].tBodies[0].rows.myCustomProperty should be 1 and is.
+PASS: document.body.children.myCustomProperty should be 1 and is.
+PASS: document.getElementsByTagName('map')[0].areas.myCustomProperty should be 1 and is.
+FAIL: document.body.style.myCustomProperty should be 1 but instead is undefined.
+FAIL: document.body.style.getPropertyCSSValue('color').myCustomProperty should be 1 but instead is undefined.
+FAIL: document.styleSheets.myCustomProperty should be 1 but instead is undefined.
+FAIL: document.styleSheets[0].myCustomProperty should be 1 but instead is undefined.
+FAIL: document.styleSheets[0].cssRules.myCustomProperty should be 1 but instead is undefined.
+FAIL: document.styleSheets[0].cssRules[0].myCustomProperty should be 1 but instead is undefined.
+PASS: new XPathEvaluator().myCustomProperty should be undefined and is.
+PASS: new XPathEvaluator().evaluate('/', document, null, 0, null).myCustomProperty should be undefined and is.
+PASS: document.createNSResolver(document).myCustomProperty should be undefined and is.
+PASS: document.createExpression('/', document.createNSResolver(document)).myCustomProperty should be undefined and is.
+DOM EVENT BEFORE GARBAGE COLLECTION
+PASS: event.myCustomProperty should be 1 and is.
+DOM EVENT AFTER GARBAGE COLLECTION
+PASS: event.myCustomProperty should be 1 and is.
+
Modified: trunk/Source/WebCore/ChangeLog (131837 => 131838)
--- trunk/Source/WebCore/ChangeLog 2012-10-19 01:32:38 UTC (rev 131837)
+++ trunk/Source/WebCore/ChangeLog 2012-10-19 01:53:03 UTC (rev 131838)
@@ -1,3 +1,18 @@
+2012-10-18 Adam Barth <[email protected]>
+
+ [V8] fast/dom/gc-9.html fails for document.implementation
+ https://bugs.webkit.org/show_bug.cgi?id=99783
+
+ Reviewed by Kentaro Hara.
+
+ In order to correctly manage the lifetime of document.implementation,
+ we need to implement GenerateIsReachable=ImplDocument.
+
+ * bindings/scripts/CodeGeneratorV8.pm:
+ (GenerateVisitDOMWrapper):
+ * bindings/scripts/IDLAttributes.txt:
+ * dom/DOMImplementation.idl:
+
2012-10-18 Chris Fleizach <[email protected]>
AX: Crashes in WebProcess at com.apple.WebCore: -[AccessibilityObjectWrapper remoteAccessibilityParentObject] + 78
Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm (131837 => 131838)
--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm 2012-10-19 01:32:38 UTC (rev 131837)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm 2012-10-19 01:53:03 UTC (rev 131838)
@@ -212,12 +212,14 @@
{
${implClassName}* impl = static_cast<${implClassName}*>(object);
END
- if (GetGenerateIsReachable($dataNode) eq "ImplElementRoot" ||
+ if (GetGenerateIsReachable($dataNode) eq "ImplDocument" ||
+ GetGenerateIsReachable($dataNode) eq "ImplElementRoot" ||
GetGenerateIsReachable($dataNode) eq "ImplOwnerRoot" ||
GetGenerateIsReachable($dataNode) eq "ImplOwnerNodeRoot" ||
GetGenerateIsReachable($dataNode) eq "ImplBaseRoot") {
my $methodName;
+ $methodName = "document" if (GetGenerateIsReachable($dataNode) eq "ImplDocument");
$methodName = "element" if (GetGenerateIsReachable($dataNode) eq "ImplElementRoot");
$methodName = "owner" if (GetGenerateIsReachable($dataNode) eq "ImplOwnerRoot");
$methodName = "ownerNode" if (GetGenerateIsReachable($dataNode) eq "ImplOwnerNodeRoot");
Modified: trunk/Source/WebCore/bindings/scripts/IDLAttributes.txt (131837 => 131838)
--- trunk/Source/WebCore/bindings/scripts/IDLAttributes.txt 2012-10-19 01:32:38 UTC (rev 131837)
+++ trunk/Source/WebCore/bindings/scripts/IDLAttributes.txt 2012-10-19 01:53:03 UTC (rev 131838)
@@ -53,7 +53,7 @@
DoNotCheckSecurityOnSetter
EventTarget
ExtendsDOMGlobalObject
-GenerateIsReachable=ImplElementRoot|ImplBaseRoot
+GenerateIsReachable=ImplDocument|ImplElementRoot|ImplBaseRoot
Immutable
ImplementedAs=*
IndexedGetter
@@ -118,7 +118,7 @@
V8DoNotCheckSignature
V8EnabledAtRuntime=*
V8EnabledPerContext=*
-V8GenerateIsReachable=ImplElementRoot|ImplOwnerRoot|ImplOwnerNodeRoot|ImplBaseRoot
+V8GenerateIsReachable=ImplDocument|ImplElementRoot|ImplOwnerRoot|ImplOwnerNodeRoot|ImplBaseRoot
V8MeasureAs=*
V8ReadOnly
V8Unforgeable
Modified: trunk/Source/WebCore/dom/DOMImplementation.idl (131837 => 131838)
--- trunk/Source/WebCore/dom/DOMImplementation.idl 2012-10-19 01:32:38 UTC (rev 131837)
+++ trunk/Source/WebCore/dom/DOMImplementation.idl 2012-10-19 01:53:03 UTC (rev 131838)
@@ -19,8 +19,7 @@
*/
[
- JSGenerateIsReachable=ImplDocument,
- V8DependentLifetime
+ GenerateIsReachable=ImplDocument,
] interface DOMImplementation {
// DOM Level 1