3706e2e29a
For asm.js functions, the script name is used as the `source_url` for code logging. If the script name was undefined, as it can happen for asm.js code that gets evaluated in an eval, then `nullptr` was used as the `source_url`. The problem was, the logging code accessed `source_url` unconditionally, which caused a segfault. With this CL the empty string is used as `source_url` instead of `nullptr`. The test revealed another problem in the isolate mode: profiling has to be stopped and the profiler disposed before the isolate dies. R=clemensb@chromium.org Bug: chromium:1395401 Change-Id: Ia9730bb033a22b799ea2b1903ea540db9f259513 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4079685 Reviewed-by: Clemens Backes <clemensb@chromium.org> Commit-Queue: Andreas Haas <ahaas@chromium.org> Cr-Commit-Position: refs/heads/main@{#84892}
17 lines
333 B
JavaScript
17 lines
333 B
JavaScript
// Copyright 2022 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.
|
|
|
|
eval(`
|
|
function asmModule() {
|
|
"use asm";
|
|
function x(v) {
|
|
v = v | 0;
|
|
}
|
|
return x;
|
|
}
|
|
asmModule();
|
|
`);
|
|
|
|
console.profile();
|