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

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

Issue 2621873003: [heap, debugger] Introduce out-of-memory listener for debugger. (Closed)
Patch Set: use debug-interface 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/api.cc ('k') | src/heap/heap.h » ('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 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 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_INTERFACE_H_ 5 #ifndef V8_DEBUG_DEBUG_INTERFACE_H_
6 #define V8_DEBUG_DEBUG_INTERFACE_H_ 6 #define V8_DEBUG_DEBUG_INTERFACE_H_
7 7
8 #include "include/v8-debug.h" 8 #include "include/v8-debug.h"
9 #include "include/v8-util.h" 9 #include "include/v8-util.h"
10 #include "include/v8.h" 10 #include "include/v8.h"
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 StepNext = 1, // Step to the next statement in the current function. 132 StepNext = 1, // Step to the next statement in the current function.
133 StepIn = 2, // Step into new functions invoked or the next statement 133 StepIn = 2, // Step into new functions invoked or the next statement
134 // in the current function. 134 // in the current function.
135 StepFrame = 3 // Step into a new frame or return to previous frame. 135 StepFrame = 3 // Step into a new frame or return to previous frame.
136 }; 136 };
137 137
138 void PrepareStep(Isolate* isolate, StepAction action); 138 void PrepareStep(Isolate* isolate, StepAction action);
139 void ClearStepping(Isolate* isolate); 139 void ClearStepping(Isolate* isolate);
140 140
141 /** 141 /**
142 * Out-of-memory callback function.
143 * The function is invoked when the heap size is close to the hard limit.
144 *
145 * \param isolate the isolate on which the callback was installed.
146 * \param data the parameter provided during callback installation.
147 */
148 typedef void (*OutOfMemoryCallback)(Isolate* isolate, void* data);
kozy 2017/01/10 17:18:41 We don't really need isolate here since we'll pass
ulan 2017/01/10 17:22:00 Done.
149 void SetOutOfMemoryCallback(Isolate* isolate, OutOfMemoryCallback callback,
150 void* data);
151
152 /**
142 * Native wrapper around v8::internal::Script object. 153 * Native wrapper around v8::internal::Script object.
143 */ 154 */
144 class Script { 155 class Script {
145 public: 156 public:
146 v8::Isolate* GetIsolate() const; 157 v8::Isolate* GetIsolate() const;
147 158
148 ScriptOriginOptions OriginOptions() const; 159 ScriptOriginOptions OriginOptions() const;
149 bool WasCompiled() const; 160 bool WasCompiled() const;
150 int Id() const; 161 int Id() const;
151 int LineOffset() const; 162 int LineOffset() const;
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 200
190 void GetLoadedScripts(Isolate* isolate, PersistentValueVector<Script>& scripts); 201 void GetLoadedScripts(Isolate* isolate, PersistentValueVector<Script>& scripts);
191 202
192 MaybeLocal<UnboundScript> CompileInspectorScript(Isolate* isolate, 203 MaybeLocal<UnboundScript> CompileInspectorScript(Isolate* isolate,
193 Local<String> source); 204 Local<String> source);
194 205
195 } // namespace debug 206 } // namespace debug
196 } // namespace v8 207 } // namespace v8
197 208
198 #endif // V8_DEBUG_DEBUG_INTERFACE_H_ 209 #endif // V8_DEBUG_DEBUG_INTERFACE_H_
OLDNEW
« no previous file with comments | « src/api.cc ('k') | src/heap/heap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698