Commit f71cba99 authored by Tobias Tebbi's avatar Tobias Tebbi Committed by Commit Bot

[torque] allow multiple errors (one per declarable)

Drive-by fix: For JSON, it's illegal to have an \' escape sequence in a
double quote (") string literal.

Bug: v8:8880
Change-Id: I16de0ee731e93f5ea0db8f743c9b363a6bf50a43
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1631599
Auto-Submit: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: 's avatarSimon Zünd <szuend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61868}
parent 3a75c1fb
......@@ -2583,7 +2583,11 @@ void ImplementationVisitor::VisitAllDeclarables() {
// This has to be an index-based loop because all_declarables can be extended
// during the loop.
for (size_t i = 0; i < all_declarables.size(); ++i) {
Visit(all_declarables[i].get());
try {
Visit(all_declarables[i].get());
} catch (TorqueAbortCompilation&) {
// Recover from compile errors here. The error is recorded already.
}
}
}
......
......@@ -62,7 +62,6 @@ std::string StringLiteralQuote(const std::string& s) {
case '\t':
result << "\\t";
break;
case '\'':
case '"':
case '\\':
result << "\\" << s[i];
......
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