OLD | NEW |
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 InspectorTest = {}; | 5 InspectorTest = {}; |
6 InspectorTest._dispatchTable = new Map(); | 6 InspectorTest._dispatchTable = new Map(); |
7 InspectorTest._requestId = 0; | 7 InspectorTest._requestId = 0; |
8 InspectorTest._dumpInspectorProtocolMessages = false; | 8 InspectorTest._dumpInspectorProtocolMessages = false; |
9 InspectorTest._eventHandler = {}; | 9 InspectorTest._eventHandler = {}; |
10 | 10 |
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
226 var handler = InspectorTest._dispatchTable.get(messageId); | 226 var handler = InspectorTest._dispatchTable.get(messageId); |
227 if (handler) { | 227 if (handler) { |
228 handler(messageObject); | 228 handler(messageObject); |
229 InspectorTest._dispatchTable.delete(messageId); | 229 InspectorTest._dispatchTable.delete(messageId); |
230 } | 230 } |
231 } else { | 231 } else { |
232 var eventName = messageObject["method"]; | 232 var eventName = messageObject["method"]; |
233 var eventHandler = InspectorTest._eventHandler[eventName]; | 233 var eventHandler = InspectorTest._eventHandler[eventName]; |
234 if (InspectorTest._scriptMap && eventName === "Debugger.scriptParsed") | 234 if (InspectorTest._scriptMap && eventName === "Debugger.scriptParsed") |
235 InspectorTest._scriptMap.set(messageObject.params.scriptId, JSON.parse(J
SON.stringify(messageObject.params))); | 235 InspectorTest._scriptMap.set(messageObject.params.scriptId, JSON.parse(J
SON.stringify(messageObject.params))); |
| 236 if (eventName === "Debugger.scriptParsed" && messageObject.params.url ===
"wait-pending-tasks.js") |
| 237 return; |
236 if (eventHandler) | 238 if (eventHandler) |
237 eventHandler(messageObject); | 239 eventHandler(messageObject); |
238 } | 240 } |
239 } catch (e) { | 241 } catch (e) { |
240 InspectorTest.log("Exception when dispatching message: " + e + "\n" + e.stac
k + "\n message = " + JSON.stringify(messageObject, null, 2)); | 242 InspectorTest.log("Exception when dispatching message: " + e + "\n" + e.stac
k + "\n message = " + JSON.stringify(messageObject, null, 2)); |
241 InspectorTest.completeTest(); | 243 InspectorTest.completeTest(); |
242 } | 244 } |
243 } | 245 } |
OLD | NEW |