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

Unified Diff: src/debug/liveedit.cc

Issue 2058733002: [liveedit]: fail to patch if target is outside of async function on stack (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix the CHECK failure, too Created 4 years, 6 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
Index: src/debug/liveedit.cc
diff --git a/src/debug/liveedit.cc b/src/debug/liveedit.cc
index cc21f2dd46b015dd0dff10c3920ab95d97f2bced..b28ae9a41c669711a5155e7ee8575c915997ce53 100644
--- a/src/debug/liveedit.cc
+++ b/src/debug/liveedit.cc
@@ -1627,6 +1627,21 @@ class MultipleFunctionTarget {
return false;
}
+ void set_status(LiveEdit::FunctionPatchabilityStatus status) {
+ Isolate* isolate = old_shared_array_->GetIsolate();
+ int len = GetArrayLength(old_shared_array_);
+ for (int i = 0; i < len; ++i) {
+ Handle<Object> old_element =
+ JSReceiver::GetElement(isolate, result_, i).ToHandleChecked();
+ if (!old_element->IsSmi() ||
+ Smi::cast(*old_element)->value() ==
+ LiveEdit::FUNCTION_AVAILABLE_FOR_PATCH) {
+ SetElementSloppy(result_, i,
+ Handle<Smi>(Smi::FromInt(status), isolate));
+ }
+ }
+ }
+
private:
Handle<JSArray> old_shared_array_;
Handle<JSArray> new_shared_array_;
@@ -1704,6 +1719,13 @@ static const char* DropActivationsInActiveThreadImpl(Isolate* isolate,
// Fail.
return NULL;
}
+ if (non_droppable_reason ==
+ LiveEdit::FUNCTION_BLOCKED_UNDER_GENERATOR &&
+ !target_frame_found) {
+ // Fail.
+ target.set_status(non_droppable_reason);
+ return NULL;
+ }
}
}
}

Powered by Google App Engine
This is Rietveld 408576698