[Webkit-unassigned] [Bug 7924] New: Cant create inline function using "new Function()" syntax

bugzilla-daemon at opendarwin.org bugzilla-daemon at opendarwin.org
Wed Mar 22 18:18:59 PST 2006


http://bugzilla.opendarwin.org/show_bug.cgi?id=7924

           Summary: Cant create inline function using "new Function()"
                    syntax
           Product: WebKit
           Version: 420+ (nightly)
          Platform: Macintosh
        OS/Version: Mac OS X 10.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: JavaScript
        AssignedTo: webkit-unassigned at opendarwin.org
        ReportedBy: pshah at zimbra.com


See attached (siimplified) testcase for example.

Basically, Safari chokes when trying to assign a new inline function to a
variable using "new Function()".

The attached testcase creates a dummy object and then attempts to create a
"proxy" object or copy of that object by assigning the prototype of the proxied
object to the original object (its simpler than it sounds).

The workaround is to make the assignment using "function() {}" instead.

I.e., this does not work:
var proxyCtor = new Function();

This does work:
var proxyCtor = function() {};

Both cases work in IEv6 and FFv1.5 (both on win and Mac).


-- 
Configure bugmail: http://bugzilla.opendarwin.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list