v8/test/mjsunit/regress/regress-crbug-866315.js
Maya Lekova 2d0a7649e1 [async] Fix a crash when AsyncHooks is used in the proto of an object
Bug: chromium:866315
Change-Id: I83074475185c0646d575282d24679e18ec0628c7
Reviewed-on: https://chromium-review.googlesource.com/1146645
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54612}
2018-07-23 14:34:59 +00:00

13 lines
343 B
JavaScript

// 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.
// Flags: --expose-async-hooks
let num = 42;
let ah = async_hooks.createHook({});
num.__proto__.__proto__ = ah;
assertThrows('num.enable()');
assertThrows('num.disable()');