summaryrefslogtreecommitdiff
path: root/deps
diff options
context:
space:
mode:
authorGibson Fahnestock <gib@uk.ibm.com>2016-02-01 12:13:28 +0000
committerMyles Borins <mborins@us.ibm.com>2016-03-02 14:01:11 -0800
commit5590c366c5f3c1c10a399233c63e9509ec1990c2 (patch)
tree5fc4dee3a3bc8c4d81873b83d7e688b637ad03dd /deps
parent0217cb54976751758aac78fa969a5194eb96cd18 (diff)
downloadnodejs-5590c366c5f3c1c10a399233c63e9509ec1990c2.tar.gz
nodejs-5590c366c5f3c1c10a399233c63e9509ec1990c2.tar.bz2
nodejs-5590c366c5f3c1c10a399233c63e9509ec1990c2.zip
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: https://github.com/nodejs/node/pull/5024 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michaƫl Zasso <mic.besace@gmail.com>
Diffstat (limited to 'deps')
-rw-r--r--deps/v8/src/isolate.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/deps/v8/src/isolate.cc b/deps/v8/src/isolate.cc
index 186a49358..36fdcf28f 100644
--- a/deps/v8/src/isolate.cc
+++ b/deps/v8/src/isolate.cc
@@ -1907,6 +1907,10 @@ void Isolate::Deinit() {
PrintF(stdout, "=== Stress deopt counter: %u\n", stress_deopt_count_);
}
+ if (cpu_profiler_) {
+ cpu_profiler_->DeleteAllProfiles();
+ }
+
// We must stop the logger before we tear down other components.
Sampler* sampler = logger_->sampler();
if (sampler && sampler->IsActive()) sampler->Stop();