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

Side by Side Diff: src/objects.cc

Issue 2647433002: Clarify the order of frame summaries and rename getters (Closed)
Patch Set: Fix bug Created 3 years, 11 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 | « src/frames.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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/objects.h" 5 #include "src/objects.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 #include <iomanip> 8 #include <iomanip>
9 #include <memory> 9 #include <memory>
10 #include <sstream> 10 #include <sstream>
(...skipping 12989 matching lines...) Expand 10 before | Expand all | Expand 10 after
13000 13000
13001 void Script::SetEvalOrigin(Handle<Script> script, 13001 void Script::SetEvalOrigin(Handle<Script> script,
13002 Handle<SharedFunctionInfo> outer_info, 13002 Handle<SharedFunctionInfo> outer_info,
13003 int eval_position) { 13003 int eval_position) {
13004 if (eval_position == kNoSourcePosition) { 13004 if (eval_position == kNoSourcePosition) {
13005 // If the position is missing, attempt to get the code offset from the 13005 // If the position is missing, attempt to get the code offset from the
13006 // current activation. Do not translate the code offset into source 13006 // current activation. Do not translate the code offset into source
13007 // position, but store it as negative value for lazy translation. 13007 // position, but store it as negative value for lazy translation.
13008 StackTraceFrameIterator it(script->GetIsolate()); 13008 StackTraceFrameIterator it(script->GetIsolate());
13009 if (!it.done() && it.is_javascript()) { 13009 if (!it.done() && it.is_javascript()) {
13010 FrameSummary summary = FrameSummary::GetFirst(it.javascript_frame()); 13010 FrameSummary summary = FrameSummary::GetTop(it.javascript_frame());
13011 script->set_eval_from_shared(summary.AsJavaScript().function()->shared()); 13011 script->set_eval_from_shared(summary.AsJavaScript().function()->shared());
13012 script->set_eval_from_position(-summary.code_offset()); 13012 script->set_eval_from_position(-summary.code_offset());
13013 return; 13013 return;
13014 } 13014 }
13015 eval_position = 0; 13015 eval_position = 0;
13016 } 13016 }
13017 script->set_eval_from_shared(*outer_info); 13017 script->set_eval_from_shared(*outer_info);
13018 script->set_eval_from_position(eval_position); 13018 script->set_eval_from_position(eval_position);
13019 } 13019 }
13020 13020
(...skipping 6895 matching lines...) Expand 10 before | Expand all | Expand 10 after
19916 // depend on this. 19916 // depend on this.
19917 return DICTIONARY_ELEMENTS; 19917 return DICTIONARY_ELEMENTS;
19918 } 19918 }
19919 DCHECK_LE(kind, LAST_ELEMENTS_KIND); 19919 DCHECK_LE(kind, LAST_ELEMENTS_KIND);
19920 return kind; 19920 return kind;
19921 } 19921 }
19922 } 19922 }
19923 19923
19924 } // namespace internal 19924 } // namespace internal
19925 } // namespace v8 19925 } // namespace v8
OLDNEW
« no previous file with comments | « src/frames.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698