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

Unified Diff: src/runtime/runtime-liveedit.cc

Issue 1492393003: Reland of [debugger] do not restart frames that reference new.target for liveedit. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years 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 | « src/runtime/runtime.h ('k') | test/mjsunit/es6/debug-liveedit-new-target-1.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-liveedit.cc
diff --git a/src/runtime/runtime-liveedit.cc b/src/runtime/runtime-liveedit.cc
index dd3405a44cd811f74f1d7ac61a80ceef4a0979b4..189ec08d33d4428a3674d29564c583549fbd27b5 100644
--- a/src/runtime/runtime-liveedit.cc
+++ b/src/runtime/runtime-liveedit.cc
@@ -200,22 +200,34 @@
RUNTIME_FUNCTION(Runtime_LiveEditCheckAndDropActivations) {
HandleScope scope(isolate);
CHECK(isolate->debug()->live_edit_enabled());
- DCHECK(args.length() == 2);
- CONVERT_ARG_HANDLE_CHECKED(JSArray, shared_array, 0);
- CONVERT_BOOLEAN_ARG_CHECKED(do_drop, 1);
- RUNTIME_ASSERT(shared_array->length()->IsSmi());
- RUNTIME_ASSERT(shared_array->HasFastElements())
- int array_length = Smi::cast(shared_array->length())->value();
+ DCHECK(args.length() == 3);
+ CONVERT_ARG_HANDLE_CHECKED(JSArray, old_shared_array, 0);
+ CONVERT_ARG_HANDLE_CHECKED(JSArray, new_shared_array, 1);
+ CONVERT_BOOLEAN_ARG_CHECKED(do_drop, 2);
+ USE(new_shared_array);
+ RUNTIME_ASSERT(old_shared_array->length()->IsSmi());
+ RUNTIME_ASSERT(new_shared_array->length() == old_shared_array->length());
+ RUNTIME_ASSERT(old_shared_array->HasFastElements())
+ RUNTIME_ASSERT(new_shared_array->HasFastElements())
+ int array_length = Smi::cast(old_shared_array->length())->value();
for (int i = 0; i < array_length; i++) {
- Handle<Object> element;
+ Handle<Object> old_element;
+ Handle<Object> new_element;
ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
- isolate, element, Object::GetElement(isolate, shared_array, i));
+ isolate, old_element, Object::GetElement(isolate, old_shared_array, i));
RUNTIME_ASSERT(
- element->IsJSValue() &&
- Handle<JSValue>::cast(element)->value()->IsSharedFunctionInfo());
- }
-
- return *LiveEdit::CheckAndDropActivations(shared_array, do_drop);
+ old_element->IsJSValue() &&
+ Handle<JSValue>::cast(old_element)->value()->IsSharedFunctionInfo());
+ ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
+ isolate, new_element, Object::GetElement(isolate, new_shared_array, i));
+ RUNTIME_ASSERT(
+ new_element->IsUndefined() ||
+ (new_element->IsJSValue() &&
+ Handle<JSValue>::cast(new_element)->value()->IsSharedFunctionInfo()));
+ }
+
+ return *LiveEdit::CheckAndDropActivations(old_shared_array, new_shared_array,
+ do_drop);
}
« no previous file with comments | « src/runtime/runtime.h ('k') | test/mjsunit/es6/debug-liveedit-new-target-1.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698