0a237ffe5b
It was shipped in Chrome 66. Bug: v8:6889 Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng Change-Id: I6333ee20ab913b281674b911d525d2851f4694c9 Reviewed-on: https://chromium-review.googlesource.com/1086928 Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org> Reviewed-by: Jakob Gruber <jgruber@chromium.org> Commit-Queue: Mathias Bynens <mathias@chromium.org> Cr-Commit-Position: refs/heads/master@{#53527}
38 lines
666 B
JavaScript
38 lines
666 B
JavaScript
// Copyright 2017 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.
|
|
|
|
let state = 'initial';
|
|
try {
|
|
throw new Error('caught');
|
|
state = 'unreachable';
|
|
} catch { // Note the lack of a binding
|
|
assertEquals(state, 'initial');
|
|
state = 'caught';
|
|
}
|
|
assertEquals(state, 'caught');
|
|
|
|
|
|
let sigil1 = {};
|
|
try {
|
|
throw sigil1;
|
|
} catch (e) {
|
|
assertEquals(e, sigil1);
|
|
}
|
|
|
|
|
|
let sigil2 = {};
|
|
let reached = false;
|
|
try {
|
|
try {
|
|
throw sigil1;
|
|
} catch {
|
|
reached = true;
|
|
} finally {
|
|
throw sigil2;
|
|
}
|
|
} catch (e) {
|
|
assertEquals(e, sigil2);
|
|
}
|
|
assertTrue(reached);
|