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

Unified Diff: src/runtime/runtime-regexp.cc

Issue 1140053002: Migrate error messages, part 11. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 7 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/runtime.js ('k') | src/symbol.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-regexp.cc
diff --git a/src/runtime/runtime-regexp.cc b/src/runtime/runtime-regexp.cc
index 478573a68d64f625d26321c3e4b73e02da175019..0ab6a51574f8515c337c0601b6969166aea74aea 100644
--- a/src/runtime/runtime-regexp.cc
+++ b/src/runtime/runtime-regexp.cc
@@ -7,6 +7,7 @@
#include "src/arguments.h"
#include "src/jsregexp-inl.h"
#include "src/jsregexp.h"
+#include "src/messages.h"
#include "src/runtime/runtime-utils.h"
#include "src/string-builder.h"
#include "src/string-search.h"
@@ -912,11 +913,9 @@ RUNTIME_FUNCTION(Runtime_RegExpInitializeAndCompile) {
bool success = false;
JSRegExp::Flags flags = RegExpFlagsFromString(flags_string, &success);
if (!success) {
- Handle<FixedArray> element = factory->NewFixedArray(1);
- element->set(0, *flags_string);
- Handle<JSArray> args = factory->NewJSArrayWithElements(element);
THROW_NEW_ERROR_RETURN_FAILURE(
- isolate, NewSyntaxError("invalid_regexp_flags", args));
+ isolate,
+ NewSyntaxError(MessageTemplate::kInvalidRegExpFlags, flags_string));
}
Handle<String> escaped_source;
« no previous file with comments | « src/runtime.js ('k') | src/symbol.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698