v8/test/mjsunit/regress/regress-1110001.js
Clemens Backes 9555464fb2 [d8] Fix worker creation near stack limit
If we are near the stack limit, calling the proxy method might not work
any more. Instead of crashing because of an empty MaybeLocal, handle
this gracefully.

Drive-by: Minor refactoring in TryGetValue.

R=tebbi@chromium.org

Bug: chromium:1110001
Change-Id: I07e7773768166b3dbea2e6b75a3ab8b24bfeee53
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2332156
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69161}
2020-07-31 09:37:59 +00:00

18 lines
375 B
JavaScript

// Copyright 2020 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 foo() {
try {
foo();
} catch {
print('Stack overflow');
Worker('string', new Proxy([], {}));
}
}
try {
foo();
} catch {
// expecting stack overflow, but we should not crash.
}