@@ -109,6 +109,8 @@ inherits(V8Debug, EventEmitter);
109
109
function V8Debug ( ) {
110
110
if ( ! ( this instanceof V8Debug ) ) return new V8Debug ( ) ;
111
111
112
+ this . _Debug = this . get ( 'Debug' ) ;
113
+
112
114
this . _webkitProtocolEnabled = false ;
113
115
114
116
// NOTE: Call `_setDebugEventListener` before all other changes in Debug Context.
@@ -129,15 +131,13 @@ function V8Debug() {
129
131
}
130
132
131
133
V8Debug . prototype . _setDebugEventListener = function ( ) {
132
- var Debug = this . get ( 'Debug' ) ;
133
- Debug . setListener ( function ( _ , execState , event ) {
134
+ this . _Debug . setListener ( function ( _ , execState , event ) {
134
135
// TODO(3y3): Handle events here
135
136
} ) ;
136
137
} ;
137
138
138
139
V8Debug . prototype . _unsetDebugEventListener = function ( ) {
139
- var Debug = this . get ( 'Debug' ) ;
140
- Debug . setListener ( null ) ;
140
+ this . _Debug . setListener ( null ) ;
141
141
} ;
142
142
143
143
V8Debug . prototype . _shareSecurityToken = function ( ) {
@@ -160,8 +160,8 @@ V8Debug.prototype._wrapDebugCommandProcessor = function() {
160
160
proto . extendedProcessDebugJSONRequestHandles_ [ 'disconnect' ] = function ( request , response ) {
161
161
this . emit ( 'close' ) ;
162
162
proto . _DebugCommandProcessor ;
163
- proto . processDebugJSONRequest ( request , response ) ;
164
- return true ;
163
+ // proto.processDebugJSONRequest(request, response);
164
+ // return true;
165
165
} . bind ( this ) ;
166
166
} ;
167
167
@@ -173,6 +173,14 @@ V8Debug.prototype._unwrapDebugCommandProcessor = function() {
173
173
proto . extendedProcessDebugJSONRequestAsyncHandles_ = { } ;
174
174
} ;
175
175
176
+ V8Debug . prototype . setPauseOnNextStatement = function ( pause ) {
177
+ binding . setPauseOnNextStatement ( pause === true ) ;
178
+ } ;
179
+
180
+ V8Debug . prototype . scripts = function ( ) {
181
+ return this . _Debug . scripts ( ) ;
182
+ } ;
183
+
176
184
V8Debug . prototype . register =
177
185
V8Debug . prototype . registerCommand = function ( name , func ) {
178
186
var proto = this . _DebugCommandProcessor ;
0 commit comments