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

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

Issue 2687013003: Revert of [debugger] expose side-effect free evaluate to inspector. (Closed)
Patch Set: 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 | src/debug/debug-evaluate.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 #ifndef V8_DEBUG_DEBUG_EVALUATE_H_ 5 #ifndef V8_DEBUG_DEBUG_EVALUATE_H_
6 #define V8_DEBUG_DEBUG_EVALUATE_H_ 6 #define V8_DEBUG_DEBUG_EVALUATE_H_
7 7
8 #include "src/frames.h" 8 #include "src/frames.h"
9 #include "src/objects.h" 9 #include "src/objects.h"
10 10
11 namespace v8 { 11 namespace v8 {
12 namespace internal { 12 namespace internal {
13 13
14 class DebugEvaluate : public AllStatic { 14 class DebugEvaluate : public AllStatic {
15 public: 15 public:
16 static MaybeHandle<Object> Global(Isolate* isolate, Handle<String> source); 16 static MaybeHandle<Object> Global(Isolate* isolate, Handle<String> source);
17 17
18 // Evaluate a piece of JavaScript in the context of a stack frame for 18 // Evaluate a piece of JavaScript in the context of a stack frame for
19 // debugging. Things that need special attention are: 19 // debugging. Things that need special attention are:
20 // - Parameters and stack-allocated locals need to be materialized. Altered 20 // - Parameters and stack-allocated locals need to be materialized. Altered
21 // values need to be written back to the stack afterwards. 21 // values need to be written back to the stack afterwards.
22 // - The arguments object needs to materialized. 22 // - The arguments object needs to materialized.
23 static MaybeHandle<Object> Local(Isolate* isolate, StackFrame::Id frame_id, 23 static MaybeHandle<Object> Local(Isolate* isolate, StackFrame::Id frame_id,
24 int inlined_jsframe_index, 24 int inlined_jsframe_index,
25 Handle<String> source, 25 Handle<String> source);
26 bool throw_on_side_effect);
27 26
28 static bool FunctionHasNoSideEffect(Handle<SharedFunctionInfo> info); 27 static bool FunctionHasNoSideEffect(Handle<SharedFunctionInfo> info);
29 static bool CallbackHasNoSideEffect(Address function_addr); 28 static bool CallbackHasNoSideEffect(Address function_addr);
30 29
31 private: 30 private:
32 // This class builds a context chain for evaluation of expressions 31 // This class builds a context chain for evaluation of expressions
33 // in debugger. 32 // in debugger.
34 // The scope chain leading up to a breakpoint where evaluation occurs 33 // The scope chain leading up to a breakpoint where evaluation occurs
35 // looks like: 34 // looks like:
36 // - [a mix of with, catch and block scopes] 35 // - [a mix of with, catch and block scopes]
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 List<ContextChainElement> context_chain_; 79 List<ContextChainElement> context_chain_;
81 Isolate* isolate_; 80 Isolate* isolate_;
82 JavaScriptFrame* frame_; 81 JavaScriptFrame* frame_;
83 int inlined_jsframe_index_; 82 int inlined_jsframe_index_;
84 }; 83 };
85 84
86 static MaybeHandle<Object> Evaluate(Isolate* isolate, 85 static MaybeHandle<Object> Evaluate(Isolate* isolate,
87 Handle<SharedFunctionInfo> outer_info, 86 Handle<SharedFunctionInfo> outer_info,
88 Handle<Context> context, 87 Handle<Context> context,
89 Handle<Object> receiver, 88 Handle<Object> receiver,
90 Handle<String> source, 89 Handle<String> source);
91 bool throw_on_side_effect);
92 }; 90 };
93 91
94 92
95 } // namespace internal 93 } // namespace internal
96 } // namespace v8 94 } // namespace v8
97 95
98 #endif // V8_DEBUG_DEBUG_EVALUATE_H_ 96 #endif // V8_DEBUG_DEBUG_EVALUATE_H_
OLDNEW
« no previous file with comments | « no previous file | src/debug/debug-evaluate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698