Commit 6abbfe27 authored by Leszek Swirski's avatar Leszek Swirski Committed by Commit Bot

[ast] Flatten Wasm function names

Factory::NewFunction now requires names passed into it to be flat.
Make sure to flatten Wasm function names when creating new Wasm JS
functions.

Fixes: chromium:1047368
Change-Id: I7bd2d8bc83ae8fab901ab469872bce0f703fc3ec
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2030738
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66064}
parent 5ad8474a
......@@ -1846,6 +1846,7 @@ Handle<WasmJSFunction> WasmJSFunction::New(Isolate* isolate,
Handle<String> name = isolate->factory()->Function_string();
if (callable->IsJSFunction()) {
name = JSFunction::GetName(Handle<JSFunction>::cast(callable));
name = String::Flatten(isolate, name);
}
Handle<Map> function_map = isolate->wasm_exported_function_map();
NewFunctionArgs args =
......
......@@ -306,6 +306,7 @@
'regress/regress-crbug-772056': [SKIP],
'regress/regress-crbug-816961': [SKIP],
'regress/regress-crbug-969498': [SKIP],
'regress/regress-crbug-1047368': [SKIP],
'regress/wasm/*': [SKIP],
'regress/regress-8947': [SKIP],
'regress/regress-9165': [SKIP],
......
// Copyright 2020 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: --wasm-staging
new WebAssembly.Function({
parameters: [],
results: []
}, x => x);
const long_variable = {
toString: () => {
}
};
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