[Webkit-unassigned] [Bug 32863] New: [V8] NodeList should support call as function

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Dec 22 02:19:15 PST 2009


https://bugs.webkit.org/show_bug.cgi?id=32863

           Summary: [V8] NodeList should support call as function
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: PC
        OS/Version: Mac OS X 10.5
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: HTML DOM
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: jnd at chromium.org
                CC: dglazkov at chromium.org


After running the following html snippet in both Safari and Chrome, Safari
passed but Chrome didn't

01.<!DOCTYPE HTML>
02.<HTML>
03.<BODY>
04.<SPAN>contents 1</SPAN> <SPAN>contents 2</SPAN>
05.<SCRIPT>
06.var list = document.getElementsByTagName("span");
07.alert(list[0]);
08.alert(list(0));
09.</SCRIPT>
10.</BODY>
11.</HTML>

The root cause of this issue is because in V8 binding, the NodeList object 
didn't support call as function, but Safari's JS binding supports.
See the following js code.

In Safari NodeList is strange object to support both get and call, NodeList[0]
and NodeList(0) both work.
But now Chrome will throw an exception when running at line 8.
We should change the V8 binding code to match Safari.

I will provide a patch and corresponding test.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list