Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deps: patch V8 to 6.9.427.23 #22898

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion deps/v8/include/v8-version.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#define V8_MAJOR_VERSION 6
#define V8_MINOR_VERSION 9
#define V8_BUILD_NUMBER 427
#define V8_PATCH_LEVEL 22
#define V8_PATCH_LEVEL 23

// Use 1 for candidates and 0 otherwise.
// (Boolean macro values are not supported by all preprocessors.)
Expand Down
1 change: 1 addition & 0 deletions deps/v8/src/wasm/wasm-js.cc
Original file line number Diff line number Diff line change
Expand Up @@ -729,6 +729,7 @@ void WebAssemblyInstantiate(const v8::FunctionCallbackInfo<v8::Value>& args) {
if (!i::wasm::IsWasmCodegenAllowed(i_isolate, i_isolate->native_context())) {
thrower.CompileError("Wasm code generation disallowed by embedder");
compilation_resolver->OnCompilationFailed(thrower.Reify());
return;
}

// Asynchronous compilation handles copying wire bytes if necessary.
Expand Down
39 changes: 39 additions & 0 deletions deps/v8/test/mjsunit/wasm/disallow-codegen.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,16 @@ async function AsyncTestOk() {
promise, module => assertInstanceof(module, WebAssembly.Module));
}

async function AsyncTestWithInstantiateOk() {
print('async module instantiate (ok)...');
%DisallowCodegenFromStrings(false);
%DisallowWasmCodegen(false);
let promise = WebAssembly.instantiate(buffer);
assertPromiseResult(
promise,
module => assertInstanceof(module.instance, WebAssembly.Instance));
}

async function AsyncTestFail() {
print('async module compile (fail)...');
%DisallowCodegenFromStrings(true);
Expand All @@ -78,6 +88,19 @@ async function AsyncTestFail() {
}
}

async function AsyncTestWithInstantiateFail() {
print('async module instantiate (fail)...');
%DisallowCodegenFromStrings(true);
%DisallowWasmCodegen(false);
try {
let m = await WebAssembly.instantiate(buffer);
assertUnreachable();
} catch (e) {
print(" " + e);
assertInstanceof(e, WebAssembly.CompileError);
}
}

async function AsyncTestWasmFail(disallow_codegen) {
print('async wasm module compile (fail)...');
%DisallowCodegenFromStrings(disallow_codegen);
Expand All @@ -91,6 +114,19 @@ async function AsyncTestWasmFail(disallow_codegen) {
}
}

async function AsyncTestWasmWithInstantiateFail(disallow_codegen) {
print('async wasm module instantiate (fail)...');
%DisallowCodegenFromStrings(disallow_codegen);
%DisallowWasmCodegen(true);
try {
let m = await WebAssembly.instantiate(buffer);
assertUnreachable();
} catch (e) {
print(" " + e);
assertInstanceof(e, WebAssembly.CompileError);
}
}

async function StreamingTestOk() {
print('streaming module compile (ok)...');
// TODO(titzer): compileStreaming must be supplied by embedder.
Expand Down Expand Up @@ -149,14 +185,17 @@ async function RunAll() {
await SyncTestOk();
await SyncTestFail();
await AsyncTestOk();
await AsyncTestWithInstantiateOk();
await AsyncTestFail();
await AsyncTestWithInstantiateFail();
await StreamingTestOk();
await StreamingTestFail();

disallow_codegen = false;
for (count = 0; count < 2; ++count) {
SyncTestWasmFail(disallow_codegen);
AsyncTestWasmFail(disallow_codegen);
AsyncTestWasmWithInstantiateFail(disallow_codegen);
StreamingTestWasmFail(disallow_codegen)
disallow_codegen = true;
}
Expand Down