Status: Untriaged
Owner: ----

New issue 4146 by [email protected]: Passing a frozen regexp as the first argument to str.replace does not throw
https://code.google.com/p/v8/issues/detail?id=4146

Version: 9633ebabd405c264d33f603f8798c31f59418dcd
OS: MacOS
Architecture: x64

What steps will reproduce the problem?

  var regex = /0/g;
  Object.freeze(regex);
  var str = "abc000";
  str.replace(regex, "o");

What is the expected output? TypeError exception thrown

What do you see instead? No exception.

The relevant spec bit is that http://people.mozilla.org/~jorendorff/es6-draft.html#sec-regexp.prototype-@@replace step 10c does a Set on the regexp with the "Throw" flag set to true, so an exception should be thrown.

--
You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to