Index: src/regexp/regexp-parser.cc |
diff --git a/src/regexp/regexp-parser.cc b/src/regexp/regexp-parser.cc |
index 9da863f23f4bdbcbb36287104a42517b97cd742e..1d7829a4b77d830e78d665149267055fa20f4928 100644 |
--- a/src/regexp/regexp-parser.cc |
+++ b/src/regexp/regexp-parser.cc |
@@ -136,7 +136,10 @@ bool RegExpParser::IsSyntaxCharacterOrSlash(uc32 c) { |
RegExpTree* RegExpParser::ReportError(Vector<const char> message) { |
if (failed_) return NULL; // Do not overwrite any existing error. |
failed_ = true; |
- *error_ = isolate()->factory()->NewStringFromAscii(message).ToHandleChecked(); |
+ *error_ = isolate() |
+ ->factory() |
+ ->NewStringFromOneByte(Vector<const uint8_t>::cast(message)) |
+ .ToHandleChecked(); |
// Zip to the end to make sure the no more input is read. |
current_ = kEndMarker; |
next_pos_ = in()->length(); |