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; |
+ } |
} |
} |
} |