Commit cdae5af8 authored by Toon Verwaest's avatar Toon Verwaest Committed by Commit Bot

[parser] Don't reindex function literals if there's a parser error

Bug: chromium:904275
Change-Id: I82712f70954246c16846f44bb9e8dc6e60e73d83
Reviewed-on: https://chromium-review.googlesource.com/c/1329686Reviewed-by: 's avatarIgor Sheludko <ishell@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57421}
parent bc534453
......@@ -796,6 +796,7 @@ FunctionLiteral* Parser::DoParseFunction(Isolate* isolate, ParseInfo* info,
}
if (GetLastFunctionLiteralId() != info->function_literal_id() - 1) {
if (has_error()) return nullptr;
// If there were FunctionLiterals in the parameters, we need to
// renumber them to shift down so the next function literal id for
// the arrow function is the one requested.
......
// Copyright 2018 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
function __isPropertyOfType(obj, name) {
Object.getOwnPropertyDescriptor(obj, name)
}
function __getProperties(obj, type) {
for (let name of Object.getOwnPropertyNames(obj)) {
__isPropertyOfType(obj, name);
}
}
function __getRandomProperty(obj) {
let properties = __getProperties(obj);
}
function __f_6776(__v_33890, __v_33891) {
var __v_33896 = __v_33891();
__getRandomProperty([])
}
(function __f_6777() {
var __v_33906 = async () => { };
__f_6776(1, () => __v_33906())
})();
(function __f_6822() {
try {
__f_6776(1, () => __f_6822());
} catch (e) {}
var __v_34059 = async (__v_34079 = () => eval()) => { };
delete __v_34059[__getRandomProperty(__v_34059)];
})();
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