Changeset 86234 in webkit


Ignore:
Timestamp:
May 11, 2011 8:24:32 AM (13 years ago)
Author:
jchaffraix@webkit.org
Message:

2011-05-11 Julien Chaffraix <jchaffraix@webkit.org>

Reviewed by Geoffrey Garen.

Tests for: XPathResult should keep its node set's JS wrappers alive
https://bugs.webkit.org/show_bug.cgi?id=34231

  • fast/xpath/xpath-result-eventlistener-crash-expected.txt: Added.
  • fast/xpath/xpath-result-eventlistener-crash.html: Added. Test that an event listener registered on an XPATH result snapshots' node does not crash. This case was already fixed prior to this change. However it is better to keep it as a regression test.
  • fast/xpath/xpath-snapshot-result-should-mark-its-nodeset-expected.txt: Added.
  • fast/xpath/xpath-snapshot-result-should-mark-its-nodeset.html: Added. Test that an XPath snapshot result keeps its node wrapper alive.
  • fast/xpath/xpath-iterator-result-should-mark-its-nodeset-expected.txt: Added.
  • fast/xpath/xpath-iterator-result-should-mark-its-nodeset.html: Added. Test that an XPath iterator result keeps its node wrapper alive.
  • fast/xpath/xpath-other-nodeset-result-should-mark-its-nodeset-expected.txt: Added.
  • fast/xpath/xpath-other-nodeset-result-should-mark-its-nodeset.html: Added. Test that other XPath result that holds nodes keeps their wrapper alive.

2011-05-11 Julien Chaffraix <jchaffraix@webkit.org>

Reviewed by Geoffrey Garen.

XPathResult should keep its node set's JS wrappers alive
https://bugs.webkit.org/show_bug.cgi?id=34231

The change added a custom mark function for JSC. V8 was already properly
marking the nodes so no change were done on the V8 side.

Tests: fast/xpath/xpath-iterator-result-should-mark-its-nodeset.html

fast/xpath/xpath-other-nodeset-result-should-mark-its-nodeset.html
fast/xpath/xpath-result-eventlistener-crash.html
fast/xpath/xpath-snapshot-result-should-mark-its-nodeset.html

  • Android.jscbindings.mk:
  • GNUmakefile.list.am:
  • UseJSC.cmake:
  • WebCore.gypi:
  • WebCore.pro:
  • WebCore.vcproj/WebCore.vcproj:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/JSBindingsAllInOne.cpp: Added the new file to our build systems.
  • bindings/js/JSXPathResultCustom.cpp: Added. (WebCore::JSXPathResult::markChildren): Added code to mark the XPathResult snapshot's nodes.
  • xml/XPathResult.h: (WebCore::XPathResult::value): Exposed this getter so that we can mark our XPathValue.
  • xml/XPathResult.idl: Told the IDL parser that we now need a custom mark function.
Location:
trunk
Files:
9 added
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r86233 r86234  
     12011-05-11  Julien Chaffraix  <jchaffraix@webkit.org>
     2
     3        Reviewed by Geoffrey Garen.
     4
     5        Tests for: XPathResult should keep its node set's JS wrappers alive
     6        https://bugs.webkit.org/show_bug.cgi?id=34231
     7
     8        * fast/xpath/xpath-result-eventlistener-crash-expected.txt: Added.
     9        * fast/xpath/xpath-result-eventlistener-crash.html: Added.
     10        Test that an event listener registered on an XPATH result snapshots' node does
     11        not crash. This case was already fixed prior to this change. However it is better
     12        to keep it as a regression test.
     13
     14        * fast/xpath/xpath-snapshot-result-should-mark-its-nodeset-expected.txt: Added.
     15        * fast/xpath/xpath-snapshot-result-should-mark-its-nodeset.html: Added.
     16        Test that an XPath snapshot result keeps its node wrapper alive.
     17
     18        * fast/xpath/xpath-iterator-result-should-mark-its-nodeset-expected.txt: Added.
     19        * fast/xpath/xpath-iterator-result-should-mark-its-nodeset.html: Added.
     20        Test that an XPath iterator result keeps its node wrapper alive.
     21
     22        * fast/xpath/xpath-other-nodeset-result-should-mark-its-nodeset-expected.txt: Added.
     23        * fast/xpath/xpath-other-nodeset-result-should-mark-its-nodeset.html: Added.
     24        Test that other XPath result that holds nodes keeps their wrapper alive.
     25
    1262011-05-11  Jessie Berlin  <jberlin@apple.com>
    227
  • trunk/Source/WebCore/ChangeLog

    r86232 r86234  
     12011-05-11  Julien Chaffraix  <jchaffraix@webkit.org>
     2
     3        Reviewed by Geoffrey Garen.
     4
     5        XPathResult should keep its node set's JS wrappers alive
     6        https://bugs.webkit.org/show_bug.cgi?id=34231
     7
     8        The change added a custom mark function for JSC. V8 was already properly
     9        marking the nodes so no change were done on the V8 side.
     10
     11        Tests: fast/xpath/xpath-iterator-result-should-mark-its-nodeset.html
     12               fast/xpath/xpath-other-nodeset-result-should-mark-its-nodeset.html
     13               fast/xpath/xpath-result-eventlistener-crash.html
     14               fast/xpath/xpath-snapshot-result-should-mark-its-nodeset.html
     15
     16        * Android.jscbindings.mk:
     17        * GNUmakefile.list.am:
     18        * UseJSC.cmake:
     19        * WebCore.gypi:
     20        * WebCore.pro:
     21        * WebCore.vcproj/WebCore.vcproj:
     22        * WebCore.xcodeproj/project.pbxproj:
     23        * bindings/js/JSBindingsAllInOne.cpp:
     24        Added the new file to our build systems.
     25
     26        * bindings/js/JSXPathResultCustom.cpp: Added.
     27        (WebCore::JSXPathResult::markChildren): Added code to mark the
     28        XPathResult snapshot's nodes.
     29        * xml/XPathResult.h:
     30        (WebCore::XPathResult::value): Exposed this getter so that we can
     31        mark our XPathValue.
     32        * xml/XPathResult.idl: Told the IDL parser that we now need
     33        a custom mark function.
     34
    1352011-05-04  Philippe Normand  <pnormand@igalia.com>
    236
  • trunk/Source/WebCore/GNUmakefile.list.am

    r86197 r86234  
    799799        Source/WebCore/bindings/js/JSXMLHttpRequestCustom.cpp \
    800800        Source/WebCore/bindings/js/JSXMLHttpRequestUploadCustom.cpp \
     801        Source/WebCore/bindings/js/JSXPathResultCustom.cpp \
    801802        Source/WebCore/bindings/js/JSXSLTProcessorCustom.cpp \
    802803        Source/WebCore/bindings/js/JavaScriptCallFrame.cpp \
  • trunk/Source/WebCore/UseJSC.cmake

    r84991 r86234  
    140140    bindings/js/JSXMLHttpRequestUploadCustom.cpp
    141141    bindings/js/JSXSLTProcessorCustom.cpp
     142    bindings/js/JSXPathResultCustom.cpp
    142143    bindings/js/JavaScriptCallFrame.cpp
    143144    bindings/js/PageScriptDebugServer.cpp
  • trunk/Source/WebCore/WebCore.gypi

    r86197 r86234  
    18701870            'bindings/js/JSXMLHttpRequestCustom.cpp',
    18711871            'bindings/js/JSXMLHttpRequestUploadCustom.cpp',
     1872            'bindings/js/JSXPathResultCustom.cpp',
    18721873            'bindings/js/JSXSLTProcessorCustom.cpp',
    18731874            'bindings/js/JavaScriptCallFrame.cpp',
  • trunk/Source/WebCore/WebCore.pro

    r86197 r86234  
    344344        bindings/js/JSXMLHttpRequestCustom.cpp \
    345345        bindings/js/JSXMLHttpRequestUploadCustom.cpp \
     346        bindings/js/JSXPathResultCustom.cpp \
    346347        bindings/js/PageScriptDebugServer.cpp \
    347348        bindings/js/ScheduledAction.cpp \
  • trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj

    r86197 r86234  
    6292262922                                </File>
    6292362923                                <File
     62924                                        RelativePath="..\bindings\js\JSXPathResultCustom.cpp"
     62925                                        >
     62926                                        <FileConfiguration
     62927                                                Name="Debug|Win32"
     62928                                                ExcludedFromBuild="true"
     62929                                                >
     62930                                                <Tool
     62931                                                        Name="VCCLCompilerTool"
     62932                                                />
     62933                                        </FileConfiguration>
     62934                                        <FileConfiguration
     62935                                                Name="Release|Win32"
     62936                                                ExcludedFromBuild="true"
     62937                                                >
     62938                                                <Tool
     62939                                                        Name="VCCLCompilerTool"
     62940                                                />
     62941                                        </FileConfiguration>
     62942                                        <FileConfiguration
     62943                                                Name="Debug_Cairo_CFLite|Win32"
     62944                                                ExcludedFromBuild="true"
     62945                                                >
     62946                                                <Tool
     62947                                                        Name="VCCLCompilerTool"
     62948                                                />
     62949                                        </FileConfiguration>
     62950                                        <FileConfiguration
     62951                                                Name="Release_Cairo_CFLite|Win32"
     62952                                                ExcludedFromBuild="true"
     62953                                                >
     62954                                                <Tool
     62955                                                        Name="VCCLCompilerTool"
     62956                                                />
     62957                                        </FileConfiguration>
     62958                                        <FileConfiguration
     62959                                                Name="Debug_All|Win32"
     62960                                                ExcludedFromBuild="true"
     62961                                                >
     62962                                                <Tool
     62963                                                        Name="VCCLCompilerTool"
     62964                                                />
     62965                                        </FileConfiguration>
     62966                                        <FileConfiguration
     62967                                                Name="Production|Win32"
     62968                                                ExcludedFromBuild="true"
     62969                                                >
     62970                                                <Tool
     62971                                                        Name="VCCLCompilerTool"
     62972                                                />
     62973                                        </FileConfiguration>
     62974                                </File>
     62975                                <File
    6292462976                                        RelativePath="..\bindings\js\JSXSLTProcessorCustom.cpp"
    6292562977                                        >
  • trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj

    r86197 r86234  
    31413141                A17C81220F2A5CF7005DAAEB /* HTMLElementFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A17C81200F2A5CF7005DAAEB /* HTMLElementFactory.cpp */; };
    31423142                A17C81230F2A5CF7005DAAEB /* HTMLElementFactory.h in Headers */ = {isa = PBXBuildFile; fileRef = A17C81210F2A5CF7005DAAEB /* HTMLElementFactory.h */; };
     3143                A1C7FAA2133A5D3500D6732D /* JSXPathResultCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A1C7FAA1133A5D3500D6732D /* JSXPathResultCustom.cpp */; };
    31433144                A1E1154413015C3D0054AC8C /* DistantLightSource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A1E1154313015C3D0054AC8C /* DistantLightSource.cpp */; };
    31443145                A1E1154613015C4E0054AC8C /* PointLightSource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A1E1154513015C4E0054AC8C /* PointLightSource.cpp */; };
     
    96389639                A17C81200F2A5CF7005DAAEB /* HTMLElementFactory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLElementFactory.cpp; sourceTree = "<group>"; };
    96399640                A17C81210F2A5CF7005DAAEB /* HTMLElementFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTMLElementFactory.h; sourceTree = "<group>"; };
     9641                A1C7FAA1133A5D3500D6732D /* JSXPathResultCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSXPathResultCustom.cpp; sourceTree = "<group>"; };
    96409642                A1E1154313015C3D0054AC8C /* DistantLightSource.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DistantLightSource.cpp; path = filters/DistantLightSource.cpp; sourceTree = "<group>"; };
    96419643                A1E1154513015C4E0054AC8C /* PointLightSource.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PointLightSource.cpp; path = filters/PointLightSource.cpp; sourceTree = "<group>"; };
     
    1803318035                        isa = PBXGroup;
    1803418036                        children = (
     18037                                A1C7FAA1133A5D3500D6732D /* JSXPathResultCustom.cpp */,
    1803518038                                BC275CB211C5E85C00C9206C /* JSArrayBufferCustom.cpp */,
    1803618039                                86243D0011BC31F700CC006A /* JSArrayBufferViewHelper.h */,
     
    2462024623                                1A762C770A074F2600989F5B /* JSXPathNSResolver.cpp in Sources */,
    2462124624                                1A762C790A074F2600989F5B /* JSXPathResult.cpp in Sources */,
     24625                                A1C7FAA2133A5D3500D6732D /* JSXPathResultCustom.cpp in Sources */,
    2462224626                                BCEFE1EA0DCA5F6400739219 /* JSXSLTProcessor.cpp in Sources */,
    2462324627                                BCEFE1E50DCA5F3300739219 /* JSXSLTProcessorCustom.cpp in Sources */,
  • trunk/Source/WebCore/bindings/js/JSBindingsAllInOne.cpp

    r84991 r86234  
    157157#include "JSXMLHttpRequestCustom.cpp"
    158158#include "JSXMLHttpRequestUploadCustom.cpp"
     159#include "JSXPathResultCustom.cpp"
    159160#include "JSXSLTProcessorCustom.cpp"
    160161#include "JavaScriptCallFrame.cpp"
  • trunk/Source/WebCore/xml/XPathResult.h

    r80797 r86234  
    7373        Node* snapshotItem(unsigned long index, ExceptionCode&);
    7474
     75        const XPath::Value& value() const { return m_value; }
     76
    7577    private:
    7678        XPathResult(Document*, const XPath::Value&);
  • trunk/Source/WebCore/xml/XPathResult.idl

    r52537 r86234  
    2020module xpath {
    2121
    22     interface [Conditional=XPATH] XPathResult {
     22    interface [Conditional=XPATH, CustomMarkFunction] XPathResult {
    2323        const unsigned short ANY_TYPE                       = 0;
    2424        const unsigned short NUMBER_TYPE                    = 1;
Note: See TracChangeset for help on using the changeset viewer.