Fix memory leak caused by fuzzing.
%DebugPromiseHandlePrologue expects to be followed up by %..Epilogue, otherwise we get a leak. R=jkummerow@chromium.org Review URL: https://codereview.chromium.org/301553002 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21489 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
2b7810c09c
commit
e08b33eaac
@ -813,6 +813,9 @@ void Debug::Unload() {
|
||||
// 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(Isolate* isolate)
|
||||
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_);
|
||||
|
||||
@ -3283,6 +3283,9 @@ EnterDebugger::~EnterDebugger() {
|
||||
}
|
||||
}
|
||||
|
||||
// Leaving this debugger entry.
|
||||
debug->set_debugger_entry(prev_);
|
||||
|
||||
isolate_->debugger()->UpdateState();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user