v8/test/mjsunit/regress/regress-740694.js
Sathya Gunasekaran ea632716d7 [d8] Fix stack overflow when importing modules
Bug: chromium:740694
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: Ib23bca1942c25d8a9f32e12be3f7b50fc3ab55c8
Reviewed-on: https://chromium-review.googlesource.com/568222
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46611}
2017-07-12 23:39:51 +00:00

23 lines
551 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.
// Flags: --harmony --allow-natives-syntax --stack-size=100
function __f_0() {
try {
return __f_0();
} catch(e) {
return import('no-such-file');
}
}
var done = false;
var error;
var promise = __f_0();
promise.then(assertUnreachable,
err => { done = true; error = err });
%RunMicrotasks();
assertTrue(error.startsWith('Error reading'));
assertTrue(done);