[Webkit-unassigned] [Bug 55040] New: RegExp constructor returns the argument regexp instead of a new object

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Feb 23 04:56:52 PST 2011


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

           Summary: RegExp constructor returns the argument regexp instead
                    of a new object
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: kent.hansen at nokia.com


In the following script, the last comparison

r = new RegExp;
r2 = new RegExp(r);
r == r2;

should produce false; however, with JSC it produces true. I.e., the "copy-constructing" call to RegExp doesn't return a new object.
In both V8 and SpiderMonkey, a new object is returned, as per ECMA-262 5th edition, section 15.10.4.

-- 
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