[Webkit-unassigned] [Bug 103822] New: RegExp.prototype.exec should always update lastIndex if no match was found

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Dec 1 16:52:36 PST 2012


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

           Summary: RegExp.prototype.exec should always update lastIndex
                    if no match was found
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: All
        OS/Version: All
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: andre.bargull at gmail.com


Steps to reproduce:

Simple test case:
---
js> r = /a/; r.lastIndex = 1; r.exec("zzzz"); r.lastIndex
1
---


Actual results:

`r.lastIndex` should have been set to `0` per ES5.1, cf. [15.10.6.2 RegExp.prototype.exec(string) - step 9a].

Spidermonkey and V8 also return `1` whereas IE10 and Opera12 return `0`.

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