@@ -182,7 +182,7 @@ function sendCommand(name, attributes, userdata) {
182
182
seq : 0 ,
183
183
type : 'request' ,
184
184
command : name ,
185
- arguments : attributes || { }
185
+ arguments : attributes
186
186
} ;
187
187
binding . sendCommand ( JSON . stringify ( message ) ) ;
188
188
} ;
@@ -256,9 +256,9 @@ V8Debug.prototype.enableWebkitProtocol = function() {
256
256
InjectedScriptHost = this . runInDebugContext ( InjectedScriptHostSource ) ( binding , DebuggerScript ) ;
257
257
258
258
JavaScriptCallFrameSource = fs . readFileSync ( JavaScriptCallFrameLink , 'utf8' ) ;
259
- JavaScriptCallFrame = this . runInDebugContext ( JavaScriptCallFrameSource ) ( binding , DebuggerScript ) ;
259
+ JavaScriptCallFrame = this . runInDebugContext ( JavaScriptCallFrameSource ) ( binding ) ;
260
260
261
- var injectedScript = InjectedScript ( InjectedScriptHost , global , 1 ) ;
261
+ var injectedScript = InjectedScript ( InjectedScriptHost , global , process . pid ) ;
262
262
263
263
this . registerAgentCommand = function ( command , parameters , callback ) {
264
264
if ( typeof parameters === 'function' ) {
@@ -274,8 +274,16 @@ V8Debug.prototype.enableWebkitProtocol = function() {
274
274
275
275
if ( maximumLimit < 0 ) throw new Error ( 'Incorrect stack trace limit.' ) ;
276
276
var data = ( maximumLimit << scopeBits ) | scopeDetails ;
277
+ var currentCallFrame = DebuggerScript . currentCallFrame ( execState , data ) ;
278
+ return new JavaScriptCallFrame ( currentCallFrame ) ;
279
+ } ;
280
+
281
+ this . releaseObject = function ( name ) {
282
+ return InjectedScriptHost . releaseObject ( name ) ;
283
+ } ;
277
284
278
- return JavaScriptCallFrame . currentCallFrame ( execState , data ) ; ;
285
+ this . releaseObjectGroup = function ( name ) {
286
+ return InjectedScriptHost . releaseObjectGroup ( name ) ;
279
287
} ;
280
288
281
289
this . _webkitProtocolEnabled = true ;
@@ -295,6 +303,8 @@ V8Debug.prototype.enableWebkitProtocol = function() {
295
303
}
296
304
} ;
297
305
306
+ V8Debug . prototype . releaseObject =
307
+ V8Debug . prototype . releaseObjectGroup =
298
308
V8Debug . prototype . wrapCallFrames =
299
309
V8Debug . prototype . registerAgentCommand = function ( command , parameters , callback ) {
300
310
throw new Error ( 'Use "enableWebkitProtocol" before using this method' ) ;
0 commit comments