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

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: 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
« no previous file with comments | « no previous file | test/mjsunit/harmony/debug-async-liveedit.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
+ }
}
}
}
« no previous file with comments | « no previous file | test/mjsunit/harmony/debug-async-liveedit.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698