Index: src/debug/liveedit.cc |
diff --git a/src/debug/liveedit.cc b/src/debug/liveedit.cc |
index 39db3dbcca572b7c04d9173aaf21aef7ac5ec7ab..e2849495bd9cbe17843605b4366a6bb803087bfc 100644 |
--- a/src/debug/liveedit.cc |
+++ b/src/debug/liveedit.cc |
@@ -1626,6 +1626,21 @@ class MultipleFunctionTarget { |
return false; |
} |
+ void set_status(LiveEdit::FunctionPatchabilityStatus status) { |
caitp (gmail)
2016/06/10 13:08:16
this stuff might actually not be necessary, since
Dan Ehrenberg
2016/06/10 13:14:41
What do you mean the test turned out to be wrong?
caitp (gmail)
2016/06/10 13:18:45
The assertion that the last promise value would be
|
+ 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_; |
@@ -1703,6 +1718,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; |
+ } |
} |
} |
} |