v8/test/mjsunit/regress/regress-crbug-401915.js
yangguo@chromium.org 413b20b6c1 Make %DebugPushPromise more robust wrt fuzzing.
If %DebugPushPromise and throwing is called outside its intended context,
we may encounter assertion failures.

R=hpayer@chromium.org
BUG=401915
LOG=N

Review URL: https://codereview.chromium.org/453933002

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23023 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-11 07:59:10 +00:00

21 lines
459 B
JavaScript

// Copyright 2014 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: --allow-natives-syntax --expose-debug-as debug
Debug = debug.Debug;
Debug.setListener(function() {});
Debug.setBreakOnException();
try {
try {
%DebugPushPromise(new Promise(function() {}));
} catch (e) {
}
throw new Error();
} catch (e) {
}
Debug.setListener(null);