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

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

Issue 1282793002: Debugger: load debugger builtins as normal native JS. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: use InstallFunctions and InstallConstants 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
« no previous file with comments | « src/debug/debug.js ('k') | src/debug/liveedit.js » ('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-evaluate.h" 5 #include "src/debug/debug-evaluate.h"
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/contexts.h" 8 #include "src/contexts.h"
9 #include "src/debug/debug.h" 9 #include "src/debug/debug.h"
10 #include "src/debug/debug-frames.h" 10 #include "src/debug/debug-frames.h"
11 #include "src/debug/debug-scopes.h" 11 #include "src/debug/debug-scopes.h"
12 #include "src/isolate.h" 12 #include "src/isolate.h"
13 13
14 namespace v8 { 14 namespace v8 {
15 namespace internal { 15 namespace internal {
16 16
17
18 static inline bool IsDebugContext(Isolate* isolate, Context* context) { 17 static inline bool IsDebugContext(Isolate* isolate, Context* context) {
19 // Try to unwrap script context if it exist. 18 return context->native_context() == *isolate->debug()->debug_context();
20 if (context->IsScriptContext()) context = context->previous();
21 DCHECK_NOT_NULL(context);
22 return context == *isolate->debug()->debug_context();
23 } 19 }
24 20
25 21
26 MaybeHandle<Object> DebugEvaluate::Global(Isolate* isolate, 22 MaybeHandle<Object> DebugEvaluate::Global(Isolate* isolate,
27 Handle<String> source, 23 Handle<String> source,
28 bool disable_break, 24 bool disable_break,
29 Handle<Object> context_extension) { 25 Handle<Object> context_extension) {
30 // Handle the processing of break. 26 // Handle the processing of break.
31 DisableBreak disable_break_scope(isolate->debug(), disable_break); 27 DisableBreak disable_break_scope(isolate->debug(), disable_break);
32 28
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 // to materialize. 304 // to materialize.
309 return target; 305 return target;
310 } 306 }
311 307
312 return isolate_->factory()->NewCatchContext( 308 return isolate_->factory()->NewCatchContext(
313 function, target, isolate_->factory()->this_string(), receiver); 309 function, target, isolate_->factory()->this_string(), receiver);
314 } 310 }
315 311
316 } // namespace internal 312 } // namespace internal
317 } // namespace v8 313 } // namespace v8
OLDNEW
« no previous file with comments | « src/debug/debug.js ('k') | src/debug/liveedit.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698