Commit 04b02035 authored by Marja Hölttä's avatar Marja Hölttä Committed by Commit Bot

[d8] Fix new style worker creation

Bug: v8:11340, chromium:177058
Change-Id: I34f400bc4d66275eb2fed082f1d44eccf21839d7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2689187Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72655}
parent 4c5ea143
......@@ -1994,7 +1994,12 @@ bool FunctionAndArgumentsToString(Local<Function> function,
if (i > 0) {
*source = String::Concat(isolate, *source, comma);
}
Local<Value> argument = array->Get(context, i).ToLocalChecked();
MaybeLocal<Value> maybe_argument = array->Get(context, i);
Local<Value> argument;
if (!maybe_argument.ToLocal(&argument)) {
Throw(isolate, "Failed to get argument");
return false;
}
Local<String> argument_string;
if (!JSON::Stringify(context, argument).ToLocal(&argument_string)) {
Throw(isolate, "Failed to convert argument to string");
......
// Copyright 2021 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.
(function __f_8() {
Object.prototype.__defineGetter__(0, () => {
throw Error();
});
})();
function __f_9() {
};
assertThrows( () => { new Worker(__f_9, {
type: 'function',
arguments: [,]})});
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment