Reviewers: Jakob,
Description:
Actually fix the memory leak in debugger wrt promises.
In the fuzz test the debugger is not actually loaded...
[email protected]
Please review this at https://codereview.chromium.org/304453003/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files (+3, -3 lines):
M src/debug.cc
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>();
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.