Fix recent reload flakes

BUG=
R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2759933005 .
This commit is contained in:
John McCutchan 2017-03-20 12:28:29 -07:00
parent 3e78da649e
commit d54c68f6ac
2 changed files with 8 additions and 5 deletions

View file

@ -634,6 +634,9 @@ void IsolateReloadContext::Reload(bool force_reload,
// WEIRD CONTROL FLOW ENDS.
TIR_Print("---- EXITED TAG HANDLER\n");
// Re-enable the background compiler. Do this before propagating any errors.
BackgroundCompiler::Enable();
if (result.IsUnwindError()) {
if (thread->top_exit_frame_info() == 0) {
// We can only propagate errors when there are Dart frames on the stack.
@ -724,8 +727,6 @@ void IsolateReloadContext::FinalizeFailedLoad(const Error& error) {
void IsolateReloadContext::CommonFinalizeTail() {
ReportOnJSON(js_);
reload_finalized_ = true;
// As a final step, re-enable the background compiler.
BackgroundCompiler::Enable();
}

View file

@ -2543,9 +2543,11 @@ RawError* Service::MaybePause(Isolate* isolate, const Error& error) {
if (!isolate->IsPaused()) {
if (isolate->should_pause_post_service_request()) {
isolate->set_should_pause_post_service_request(false);
// Before pausing, restore the sticky error. The debugger will return it
// from PausePostRequest.
Thread::Current()->set_sticky_error(error);
if (!error.IsNull()) {
// Before pausing, restore the sticky error. The debugger will return it
// from PausePostRequest.
Thread::Current()->set_sticky_error(error);
}
return isolate->PausePostRequest();
}
}