Index: src/isolate.cc |
diff --git a/src/isolate.cc b/src/isolate.cc |
index 792706dc71c54dc2de0bd5f992044004d26f2b46..ef97064838ff4745e9188526b5bd287043ee2e3c 100644 |
--- a/src/isolate.cc |
+++ b/src/isolate.cc |
@@ -2182,6 +2182,8 @@ void Isolate::ClearSerializerData() { |
void Isolate::Deinit() { |
TRACE_ISOLATE(deinit); |
+ cancelable_task_manager()->CancelAndWait(); |
+ |
debug()->Unload(); |
FreeThreadResources(); |
@@ -2232,8 +2234,6 @@ void Isolate::Deinit() { |
delete interpreter_; |
interpreter_ = NULL; |
- cancelable_task_manager()->CancelAndWait(); |
- |
delete cpu_profiler_; |
cpu_profiler_ = NULL; |