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

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

Issue 1264993002: Debugger: refactor ScopeIterator, FrameInspector and DebugEvaluate. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: readd include Created 5 years, 4 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
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/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/arguments.h" 7 #include "src/arguments.h"
8 #include "src/debug/debug.h" 8 #include "src/debug/debug.h"
9 #include "src/debug/debug-frames.h"
9 #include "src/debug/liveedit.h" 10 #include "src/debug/liveedit.h"
10 #include "src/runtime/runtime.h" 11 #include "src/runtime/runtime.h"
11 #include "src/runtime/runtime-utils.h" 12 #include "src/runtime/runtime-utils.h"
12 13
13 namespace v8 { 14 namespace v8 {
14 namespace internal { 15 namespace internal {
15 16
16 17
17 static int FindSharedFunctionInfosForScript(HeapIterator* iterator, 18 static int FindSharedFunctionInfosForScript(HeapIterator* iterator,
18 Script* script, 19 Script* script,
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 Heap* heap = isolate->heap(); 274 Heap* heap = isolate->heap();
274 275
275 // Find the relevant frame with the requested index. 276 // Find the relevant frame with the requested index.
276 StackFrame::Id id = isolate->debug()->break_frame_id(); 277 StackFrame::Id id = isolate->debug()->break_frame_id();
277 if (id == StackFrame::NO_ID) { 278 if (id == StackFrame::NO_ID) {
278 // If there are no JavaScript stack frames return undefined. 279 // If there are no JavaScript stack frames return undefined.
279 return heap->undefined_value(); 280 return heap->undefined_value();
280 } 281 }
281 282
282 JavaScriptFrameIterator it(isolate, id); 283 JavaScriptFrameIterator it(isolate, id);
283 int inlined_jsframe_index = Runtime::FindIndexedNonNativeFrame(&it, index); 284 int inlined_jsframe_index =
285 DebugFrameHelper::FindIndexedNonNativeFrame(&it, index);
284 if (inlined_jsframe_index == -1) return heap->undefined_value(); 286 if (inlined_jsframe_index == -1) return heap->undefined_value();
285 // We don't really care what the inlined frame index is, since we are 287 // We don't really care what the inlined frame index is, since we are
286 // throwing away the entire frame anyways. 288 // throwing away the entire frame anyways.
287 const char* error_message = LiveEdit::RestartFrame(it.frame()); 289 const char* error_message = LiveEdit::RestartFrame(it.frame());
288 if (error_message) { 290 if (error_message) {
289 return *(isolate->factory()->InternalizeUtf8String(error_message)); 291 return *(isolate->factory()->InternalizeUtf8String(error_message));
290 } 292 }
291 return heap->true_value(); 293 return heap->true_value();
292 } 294 }
293 } // namespace internal 295 } // namespace internal
294 } // namespace v8 296 } // namespace v8
OLDNEW
« src/debug/debug-scopes.cc ('K') | « src/runtime/runtime-debug.cc ('k') | src/scopeinfo.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698