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

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

Issue 2621873003: [heap, debugger] Introduce out-of-memory listener for debugger. (Closed)
Patch Set: remove isolate parameter of the callback 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 data the parameter provided during callback installation.
146 */
147 typedef void (*OutOfMemoryCallback)(void* data);
148 void SetOutOfMemoryCallback(Isolate* isolate, OutOfMemoryCallback callback,
149 void* data);
150
151 /**
142 * Native wrapper around v8::internal::Script object. 152 * Native wrapper around v8::internal::Script object.
143 */ 153 */
144 class Script { 154 class Script {
145 public: 155 public:
146 v8::Isolate* GetIsolate() const; 156 v8::Isolate* GetIsolate() const;
147 157
148 ScriptOriginOptions OriginOptions() const; 158 ScriptOriginOptions OriginOptions() const;
149 bool WasCompiled() const; 159 bool WasCompiled() const;
150 int Id() const; 160 int Id() const;
151 int LineOffset() const; 161 int LineOffset() const;
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 199
190 void GetLoadedScripts(Isolate* isolate, PersistentValueVector<Script>& scripts); 200 void GetLoadedScripts(Isolate* isolate, PersistentValueVector<Script>& scripts);
191 201
192 MaybeLocal<UnboundScript> CompileInspectorScript(Isolate* isolate, 202 MaybeLocal<UnboundScript> CompileInspectorScript(Isolate* isolate,
193 Local<String> source); 203 Local<String> source);
194 204
195 } // namespace debug 205 } // namespace debug
196 } // namespace v8 206 } // namespace v8
197 207
198 #endif // V8_DEBUG_DEBUG_INTERFACE_H_ 208 #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