Skip to content

Commit dd97d07

Browse files
gibfahnrvagg
authored andcommitted
deps: backport 8d00c2c from v8 upstream
Original commit message: ``` Stop profiler on isolate teardown if still running If the profiler is started via the API and not stopped, V8 will intermittently crash during isolate teardown. The fix is to run the DeleteAllProfiles function in Isolate::Deinit() if cpu_profiler_ still exists. https://groups.google.com/forum/#!topic/v8-dev/WsIlpbaD4mo TEST= Run in debug mode, if you start a profile and don't stop it, this assert should fail: Fatal error in ../src/profiler/cpu-profiler.cc, line 414 Check failed: !is_profiling_. Review URL: https://codereview.chromium.org/1526253005 Cr-Commit-Position: refs/heads/master@{#32953} ``` PR-URL: #5024 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Michaël Zasso <[email protected]>
1 parent 3b08b5d commit dd97d07

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

deps/v8/src/isolate.cc

+4
Original file line numberDiff line numberDiff line change
@@ -1899,6 +1899,10 @@ void Isolate::Deinit() {
18991899
PrintF(stdout, "=== Stress deopt counter: %u\n", stress_deopt_count_);
19001900
}
19011901

1902+
if (cpu_profiler_) {
1903+
cpu_profiler_->DeleteAllProfiles();
1904+
}
1905+
19021906
// We must stop the logger before we tear down other components.
19031907
Sampler* sampler = logger_->sampler();
19041908
if (sampler && sampler->IsActive()) sampler->Stop();

0 commit comments

Comments
 (0)