Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(151)

Unified Diff: src/debug.cc

Issue 304453003: Actually fix the memory leak in debugger wrt promises. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/debug.cc
diff --git a/src/debug.cc b/src/debug.cc
index b4421d6df8f2ffa51ce10a8f35d7b955bf4b3a99..80f993b82b29ecceee5c98e7a50644b9e75feec1 100644
--- a/src/debug.cc
+++ b/src/debug.cc
@@ -807,15 +807,15 @@ bool Debug::Load() {
void Debug::Unload() {
ClearAllBreakPoints();
+ // Match unmatched PromiseHandlePrologue calls.
+ while (thread_local_.promise_on_stack_) PromiseHandleEpilogue();
+
// Return debugger is not loaded.
if (!IsLoaded()) return;
// Clear the script cache.
DestroyScriptCache();
- // Match unmatched PromiseHandlePrologue calls.
- while (thread_local_.promise_on_stack_) PromiseHandleEpilogue();
-
// Clear debugger context global handle.
GlobalHandles::Destroy(Handle<Object>::cast(debug_context_).location());
debug_context_ = Handle<Context>();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698