See http://code.google.com/p/v8/issues/detail?id=1815
Please post complete reports to Bugzilla. People reading bugs shouldn't need to click through to external sites. The bug report says: ------------------------------ var expr = (new RegExp).compile('str'); // now expr will be undefined The RegExp.prototype.compile function is non-standard. Mozilla have tried to remove it at least once: https://bugzilla.mozilla.org/show_bug.cgi?id=630284 That said, FF will return the regexp, while Safari and Chrome will return undefined.
*** Bug 17822 has been marked as a duplicate of this bug. ***
Our behavior matches Opera and Chrome, I haven't tested IE. Returning 'this' is not a common pattern in the JavaScript library, and doesn't seem appropriate here. I don't think we want to change, unless there is a strong web-compatibility case to do so.