-
Notifications
You must be signed in to change notification settings - Fork 30.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PR-URL: #20480 Refs: v8/v8@6.6.346.24...6.6.346.27 Reviewed-By: Khaidi Chu <i@2333.moe> Reviewed-By: Michaël Zasso <targos@protonmail.com>
- Loading branch information
1 parent
f604c04
commit bf22f41
Showing
6 changed files
with
105 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// 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. | ||
|
||
|
||
let arr = [...Array(9000)]; | ||
for (let j = 0; j < 40; j++) { | ||
Reflect.ownKeys(arr).shift(); | ||
Array(64386); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// 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. | ||
|
||
load('test/mjsunit/wasm/wasm-constants.js'); | ||
load('test/mjsunit/wasm/wasm-module-builder.js'); | ||
|
||
const builder = new WasmModuleBuilder(); | ||
builder.addMemory(16, 32); | ||
builder.addFunction("test", kSig_i_v).addBody([ | ||
kExprI32Const, 12, // i32.const 0 | ||
]); | ||
|
||
let module = new WebAssembly.Module(builder.toBuffer()); | ||
module.then = () => { | ||
// Use setTimeout to get out of the promise chain. | ||
setTimeout(assertUnreachable); | ||
}; | ||
|
||
WebAssembly.instantiate(module); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// 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. | ||
|
||
load('test/mjsunit/wasm/wasm-constants.js'); | ||
load('test/mjsunit/wasm/wasm-module-builder.js'); | ||
|
||
const builder = new WasmModuleBuilder(); | ||
builder.addMemory(16, 32); | ||
builder.addFunction("test", kSig_i_v).addBody([ | ||
kExprI32Const, 12, // i32.const 0 | ||
]); | ||
|
||
WebAssembly.Module.prototype.then = resolve => resolve( | ||
String.fromCharCode(null, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41)); | ||
|
||
// WebAssembly.instantiate should not actually throw a TypeError in this case. | ||
// However, this is a workaround for | ||
assertPromiseResult( | ||
WebAssembly.instantiate(builder.toBuffer()), assertUnreachable, | ||
exception => { | ||
assertInstanceof(exception, TypeError); | ||
}); |