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

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

Issue 2059173002: Reland of place all remaining Oddball checks with new function (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 unified diff | Download patch
« no previous file with comments | « src/debug/debug.cc ('k') | src/elements.cc » ('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 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/debug/debug-frames.h" 5 #include "src/debug/debug-frames.h"
6 6
7 #include "src/frames-inl.h" 7 #include "src/frames-inl.h"
8 8
9 namespace v8 { 9 namespace v8 {
10 namespace internal { 10 namespace internal {
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 // Second fill all stack locals. 131 // Second fill all stack locals.
132 for (int i = 0; i < scope_info->StackLocalCount(); ++i) { 132 for (int i = 0; i < scope_info->StackLocalCount(); ++i) {
133 Handle<String> name(scope_info->StackLocalName(i)); 133 Handle<String> name(scope_info->StackLocalName(i));
134 if (ScopeInfo::VariableIsSynthetic(*name)) continue; 134 if (ScopeInfo::VariableIsSynthetic(*name)) continue;
135 Handle<Object> value = GetExpression(scope_info->StackLocalIndex(i)); 135 Handle<Object> value = GetExpression(scope_info->StackLocalIndex(i));
136 // TODO(yangguo): We convert optimized out values to {undefined} when they 136 // TODO(yangguo): We convert optimized out values to {undefined} when they
137 // are passed to the debugger. Eventually we should handle them somehow. 137 // are passed to the debugger. Eventually we should handle them somehow.
138 if (value->IsTheHole(isolate_)) { 138 if (value->IsTheHole(isolate_)) {
139 value = isolate_->factory()->undefined_value(); 139 value = isolate_->factory()->undefined_value();
140 } 140 }
141 if (value->IsOptimizedOut()) value = isolate_->factory()->undefined_value(); 141 if (value->IsOptimizedOut(isolate_)) {
142 value = isolate_->factory()->undefined_value();
143 }
142 JSObject::SetOwnPropertyIgnoreAttributes(target, name, value, NONE).Check(); 144 JSObject::SetOwnPropertyIgnoreAttributes(target, name, value, NONE).Check();
143 } 145 }
144 } 146 }
145 147
146 148
147 void FrameInspector::MaterializeStackLocals(Handle<JSObject> target, 149 void FrameInspector::MaterializeStackLocals(Handle<JSObject> target,
148 Handle<JSFunction> function) { 150 Handle<JSFunction> function) {
149 Handle<SharedFunctionInfo> shared(function->shared()); 151 Handle<SharedFunctionInfo> shared(function->shared());
150 Handle<ScopeInfo> scope_info(shared->scope_info()); 152 Handle<ScopeInfo> scope_info(shared->scope_info());
151 MaterializeStackLocals(target, scope_info); 153 MaterializeStackLocals(target, scope_info);
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 if (!frames[i].function()->shared()->IsSubjectToDebugging()) continue; 221 if (!frames[i].function()->shared()->IsSubjectToDebugging()) continue;
220 if (++count == index) return i; 222 if (++count == index) return i;
221 } 223 }
222 } 224 }
223 return -1; 225 return -1;
224 } 226 }
225 227
226 228
227 } // namespace internal 229 } // namespace internal
228 } // namespace v8 230 } // namespace v8
OLDNEW
« no previous file with comments | « src/debug/debug.cc ('k') | src/elements.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698