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