[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: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/master@{#66064}
This commit is contained in:
parent
5ad8474a1e
commit
6abbfe2736
@ -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],
|
||||
|
14
test/mjsunit/regress/regress-crbug-1047368.js
Normal file
14
test/mjsunit/regress/regress-crbug-1047368.js
Normal file
@ -0,0 +1,14 @@
|
||||
// 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: () => {
|
||||
}
|
||||
};
|
Loading…
Reference in New Issue
Block a user