Skip to content

Commit

Permalink
deps: patch V8 to 12.8.374.16
Browse files Browse the repository at this point in the history
  • Loading branch information
nodejs-github-bot committed Aug 18, 2024
1 parent 9e83853 commit 8bf16cd
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 10 deletions.
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 12
#define V8_MINOR_VERSION 8
#define V8_BUILD_NUMBER 374
#define V8_PATCH_LEVEL 13
#define V8_PATCH_LEVEL 16

// Use 1 for candidates and 0 otherwise.
// (Boolean macro values are not supported by all preprocessors.)
Expand Down
2 changes: 1 addition & 1 deletion deps/v8/src/objects/js-date-time-format.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1845,7 +1845,7 @@ std::unique_ptr<icu::SimpleDateFormat> CreateICUDateFormat(
// has to be discussed. Revisit once the spec is clarified/revised.
icu::UnicodeString pattern;
UErrorCode status = U_ZERO_ERROR;
pattern = generator->getBestPattern(skeleton, UDATPG_MATCH_ALL_FIELDS_LENGTH,
pattern = generator->getBestPattern(skeleton, UDATPG_MATCH_HOUR_FIELD_LENGTH,
status);
pattern = ReplaceHourCycleInPattern(pattern, hc);
DCHECK(U_SUCCESS(status));
Expand Down
1 change: 1 addition & 0 deletions deps/v8/src/objects/shared-function-info-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -615,6 +615,7 @@ bool SharedFunctionInfo::HasOuterScopeInfo() const {
Tagged<ScopeInfo> outer_info;
Tagged<ScopeInfo> info = scope_info(kAcquireLoad);
if (info->IsEmpty()) {
if (is_compiled()) return false;
if (!IsScopeInfo(outer_scope_info())) return false;
outer_info = Cast<ScopeInfo>(outer_scope_info());
} else {
Expand Down
8 changes: 6 additions & 2 deletions deps/v8/src/wasm/wasm-js.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2453,9 +2453,13 @@ void WebAssemblyPromising(const v8::FunctionCallbackInfo<v8::Value>& info) {
i::DirectHandle<i::WasmExportedFunctionData> data(
wasm_exported_function->shared()->wasm_exported_function_data(),
i_isolate);
if (data->instance_data()->module_object()->is_asm_js()) {
thrower.TypeError("Argument 0 must be a WebAssembly exported function");
return;
}
bool with_suspender_param = false;
i::Handle<i::JSFunction> result = NewPromisingWasmExportedFunction(
i_isolate, data, thrower, with_suspender_param);
i::Handle<i::JSFunction> result =
NewPromisingWasmExportedFunction(i_isolate, data, thrower, with_suspender_param);
info.GetReturnValue().Set(Utils::ToLocal(i::Cast<i::JSObject>(result)));
return;
}
Expand Down
6 changes: 0 additions & 6 deletions deps/v8/test/intl/regress-40855035.js

This file was deleted.

21 changes: 21 additions & 0 deletions deps/v8/test/mjsunit/wasm/stack-switching.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,27 @@ d8.file.execute("test/mjsunit/wasm/wasm-module-builder.js");
let wrapper = ToPromising(instance.exports.test);
})();

(function TestInvalidWrappers() {
print(arguments.callee.name);
assertThrows(() => WebAssembly.promising({}), TypeError,
/Argument 0 must be a function/);
assertThrows(() => WebAssembly.promising(() => {}), TypeError,
/Argument 0 must be a WebAssembly exported function/);
assertThrows(() => WebAssembly.Suspending(() => {}), TypeError,
/WebAssembly.Suspending must be invoked with 'new'/);
assertThrows(() => new WebAssembly.Suspending({}), TypeError,
/Argument 0 must be a function/);
function asmModule() {
"use asm";
function x(v) {
v = v | 0;
}
return x;
}
assertThrows(() => WebAssembly.promising(asmModule()), TypeError,
/Argument 0 must be a WebAssembly exported function/);
})();

(function TestStackSwitchNoSuspend() {
print(arguments.callee.name);
let builder = new WasmModuleBuilder();
Expand Down

0 comments on commit 8bf16cd

Please sign in to comment.