// 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: --allow-natives-syntax --async-stack-traces// Basic test with Promise.all().(function(){asyncfunctionfine(){}asyncfunctionthrower(){awaitfine();thrownewError();}asyncfunctiondriver(){awaitPromise.all([fine(),fine(),thrower(),thrower()]);}asyncfunctiontest(f){try{awaitf();assertUnreachable();}catch(e){assertInstanceof(e,Error);assertMatches(/Error.+at thrower.+at async Promise.all \(index 2\).+at async driver.+at async test/ms,e.stack);}}assertPromiseResult((async()=>{awaittest(driver);awaittest(driver);%OptimizeFunctionOnNextCall(thrower);awaittest(driver);%OptimizeFunctionOnNextCall(driver);awaittest(driver);})());})();