Last Comment Bug 1015762 - JavaScript String.prototype.replace
: JavaScript String.prototype.replace
Status: RESOLVED DUPLICATE of bug 369778
Product: Core
Classification: Components
Component: JavaScript Engine (show other bugs)
: 29 Branch
: x86 Mac OS X
-- normal (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
: Jason Orendorff [:jorendorff]
Depends on:
  Show dependency treegraph
Reported: 2014-05-25 12:43 PDT by Zhenzhen Zhan
Modified: 2014-05-25 14:37 PDT (History)
1 user (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Description User image Zhenzhen Zhan 2014-05-25 12:43:08 PDT
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:29.0) Gecko/20100101 Firefox/29.0 (Beta/Release)
Build ID: 20140506152807

Steps to reproduce:

Maybe it's a JavaScript String.prototype.replace bug. In all other browsers, the p1 argument is undefined. But in Firefox it's "".
"abc".replace(/a(c)?/,function(match,p1,p2){console.log(match,p1);return match;})

Actual results:

"a" ""

Expected results:

"a" undefined
Comment 1 User image Till Schneidereit [till] 2014-05-25 14:37:17 PDT

*** This bug has been marked as a duplicate of bug 369778 ***

Note You need to log in before you can comment on or make changes to this bug.