d3ba88a2ce
This aligns the Torque semantics of catch with the JavaScript behavior: When we catch an exception, we also reset the pending exception. This also fixes a long-standing bug that we didn't restore the original pending message after executing arbitrary JS in IteratorCloseOnException Bug: v8:12439 Change-Id: I268d9d639d09023a424f352547cdce03428f983a Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3303805 Commit-Queue: Tobias Tebbi <tebbi@chromium.org> Reviewed-by: Marja Hölttä <marja@chromium.org> Reviewed-by: Leszek Swirski <leszeks@chromium.org> Reviewed-by: Jakob Gruber <jgruber@chromium.org> Reviewed-by: Michael Stanton <mvstanton@chromium.org> Cr-Commit-Position: refs/heads/main@{#78259}
11 lines
282 B
JavaScript
11 lines
282 B
JavaScript
// Copyright 2021 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.
|
|
|
|
Object.prototype.return = function () {
|
|
try {
|
|
throw "";
|
|
} catch(e) {}
|
|
};
|
|
Object.fromEntries([0]);
|