Commit 2d445c48 authored by Iain Ireland's avatar Iain Ireland Committed by Commit Bot

[regexp] Return compile data from VerifyRegExpSyntax

Embarrassingly, while integrating VerifyRegExpSyntax into SpiderMonkey,
I realized that I had refactored away the RegExpCompileData* argument,
which is necessary for emitting error messages when parsing fails.

Bug: v8:10406
Change-Id: Iaa8cd1f944bbf058ccc03c052b5ec0563b7c2e99
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2219415Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68033}
parent e8c5444f
......@@ -1833,10 +1833,10 @@ bool RegExpParser::ParseRegExp(Isolate* isolate, Zone* zone,
bool RegExpParser::VerifyRegExpSyntax(Isolate* isolate, Zone* zone,
FlatStringReader* input,
JSRegExp::Flags flags,
RegExpCompileData* result,
const DisallowHeapAllocation& no_gc) {
RegExpParser parser(input, flags, isolate, zone);
RegExpCompileData dummy;
return parser.Parse(&dummy, no_gc);
return parser.Parse(result, no_gc);
}
RegExpBuilder::RegExpBuilder(Zone* zone, JSRegExp::Flags flags)
......
......@@ -161,6 +161,7 @@ class V8_EXPORT_PRIVATE RegExpParser {
JSRegExp::Flags flags, RegExpCompileData* result);
static bool VerifyRegExpSyntax(Isolate* isolate, Zone* zone,
FlatStringReader* input, JSRegExp::Flags flags,
RegExpCompileData* result,
const DisallowHeapAllocation& no_gc);
private:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment