Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1264)

Unified Diff: src/regexp-delay.js

Issue 42007: Fixed a few more incompatibilities (Closed)
Patch Set: Created 11 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/parser.cc ('k') | test/cctest/test-regexp.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/regexp-delay.js
diff --git a/src/regexp-delay.js b/src/regexp-delay.js
index 66f23b00f182ebf60767d70b1b9068c38162954e..39fae34200739fce8515b2c5fda249a061e6f13d 100644
--- a/src/regexp-delay.js
+++ b/src/regexp-delay.js
@@ -160,6 +160,9 @@ function DoRegExpExecGlobal(regexp, string) {
function RegExpExec(string) {
+ if (!IS_REGEXP(this)) {
+ throw MakeTypeError('method_called_on_incompatible', ['RegExp.prototype.exec', this]);
+ }
if (%_ArgumentsLength() == 0) {
if (IS_UNDEFINED(regExpInput)) {
throw MakeError('no_input_to_regexp', [this]);
« no previous file with comments | « src/parser.cc ('k') | test/cctest/test-regexp.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698