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}
This commit fixes an occasional crash on shutdown when the profiler is still enabled. This seems like a good candidate for backporting as the fix is very straightforward, and it otherwise won't get into Node for quite a while.
This crash affects the appmetrics npm module. Appmetrics Issue 44
I'm not 100% sure whether I got the process right, if anything looks wrong then let me know.