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

Side by Side Diff: src/runtime/runtime-debug.cc

Issue 2696173002: Fix receiver in Runtime::GetFrameDetails (Closed)
Patch Set: Disable receiver DCHECK for optimized frames Created 3 years, 10 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 unified diff | Download patch
« no previous file with comments | « no previous file | test/debugger/debugger.status » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/runtime/runtime-utils.h" 5 #include "src/runtime/runtime-utils.h"
6 6
7 #include "src/arguments.h" 7 #include "src/arguments.h"
8 #include "src/compiler.h" 8 #include "src/compiler.h"
9 #include "src/debug/debug-coverage.h" 9 #include "src/debug/debug-coverage.h"
10 #include "src/debug/debug-evaluate.h" 10 #include "src/debug/debug-evaluate.h"
(...skipping 714 matching lines...) Expand 10 before | Expand all | Expand 10 after
725 725
726 // Add locals name and value from the temporary copy from the function frame. 726 // Add locals name and value from the temporary copy from the function frame.
727 for (const auto& local : locals) details->set(details_index++, *local); 727 for (const auto& local : locals) details->set(details_index++, *local);
728 728
729 // Add the value being returned. 729 // Add the value being returned.
730 if (at_return) { 730 if (at_return) {
731 details->set(details_index++, *return_value); 731 details->set(details_index++, *return_value);
732 } 732 }
733 733
734 // Add the receiver (same as in function frame). 734 // Add the receiver (same as in function frame).
735 Handle<Object> receiver(it.frame()->receiver(), isolate); 735 Handle<Object> receiver = frame_inspector.summary().receiver();
736 DCHECK(function->shared()->IsUserJavaScript()); 736 DCHECK(function->shared()->IsUserJavaScript());
737 DCHECK_IMPLIES(is_sloppy(shared->language_mode()), receiver->IsJSReceiver()); 737 // Optimized frames only restore the receiver as best-effort (see
738 // OptimizedFrame::Summarize).
739 DCHECK_IMPLIES(!is_optimized && is_sloppy(shared->language_mode()),
740 receiver->IsJSReceiver());
738 details->set(kFrameDetailsReceiverIndex, *receiver); 741 details->set(kFrameDetailsReceiverIndex, *receiver);
739 742
740 DCHECK_EQ(details_size, details_index); 743 DCHECK_EQ(details_size, details_index);
741 return *isolate->factory()->NewJSArrayWithElements(details); 744 return *isolate->factory()->NewJSArrayWithElements(details);
742 } 745 }
743 746
744 747
745 RUNTIME_FUNCTION(Runtime_GetScopeCount) { 748 RUNTIME_FUNCTION(Runtime_GetScopeCount) {
746 HandleScope scope(isolate); 749 HandleScope scope(isolate);
747 DCHECK_EQ(2, args.length()); 750 DCHECK_EQ(2, args.length());
(...skipping 1224 matching lines...) Expand 10 before | Expand all | Expand 10 after
1972 if (enable) { 1975 if (enable) {
1973 Coverage::EnablePrecise(isolate); 1976 Coverage::EnablePrecise(isolate);
1974 } else { 1977 } else {
1975 Coverage::DisablePrecise(isolate); 1978 Coverage::DisablePrecise(isolate);
1976 } 1979 }
1977 return isolate->heap()->undefined_value(); 1980 return isolate->heap()->undefined_value();
1978 } 1981 }
1979 1982
1980 } // namespace internal 1983 } // namespace internal
1981 } // namespace v8 1984 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | test/debugger/debugger.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698