Revision: 21489
Author: [email protected]
Date: Mon May 26 11:13:18 2014 UTC
Log: Fix memory leak caused by fuzzing.
%DebugPromiseHandlePrologue expects to be followed up by %..Epilogue,
otherwise we get a leak.
[email protected]
Review URL: https://codereview.chromium.org/301553002
http://code.google.com/p/v8/source/detail?r=21489
Modified:
/branches/bleeding_edge/src/debug.cc
=======================================
--- /branches/bleeding_edge/src/debug.cc Mon May 26 08:05:04 2014 UTC
+++ /branches/bleeding_edge/src/debug.cc Mon May 26 11:13:18 2014 UTC
@@ -813,6 +813,9 @@
// 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>();
@@ -3260,9 +3263,6 @@
EnterDebugger::~EnterDebugger() {
Debug* debug = isolate_->debug();
- // Leaving this debugger entry.
- debug->set_debugger_entry(prev_);
-
// Restore to the previous break state.
debug->SetBreak(break_frame_id_, break_id_);
@@ -3282,6 +3282,9 @@
isolate_->stack_guard()->RequestDebugCommand();
}
}
+
+ // Leaving this debugger entry.
+ debug->set_debugger_entry(prev_);
isolate_->debugger()->UpdateState();
}
--
--
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.