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

Side by Side Diff: test/inspector/protocol-test.js

Issue 2391323002: [inspector] command line api debug and monitor works with bound functions (Closed)
Patch Set: addressed comments Created 4 years, 2 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 | « test/inspector/debugger/command-line-api-with-bound-function-expected.txt ('k') | no next file » | 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 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 18 matching lines...) Expand all
29 } 29 }
30 }); 30 });
31 31
32 InspectorTest.log = print.bind(null); 32 InspectorTest.log = print.bind(null);
33 33
34 InspectorTest.logMessage = function(message) 34 InspectorTest.logMessage = function(message)
35 { 35 {
36 if (message.id) 36 if (message.id)
37 message.id = "<messageId>"; 37 message.id = "<messageId>";
38 38
39 const nonStableFields = new Set(["objectId", "scriptId", "exceptionId", "times tamp", "executionContextId"]); 39 const nonStableFields = new Set(["objectId", "scriptId", "exceptionId", "times tamp", "executionContextId", "callFrameId"]);
40 var objects = [ message ]; 40 var objects = [ message ];
41 while (objects.length) { 41 while (objects.length) {
42 var object = objects.shift(); 42 var object = objects.shift();
43 for (var key in object) { 43 for (var key in object) {
44 if (nonStableFields.has(key)) 44 if (nonStableFields.has(key))
45 object[key] = `<${key}>`; 45 object[key] = `<${key}>`;
46 else if (typeof object[key] === "object") 46 else if (typeof object[key] === "object")
47 objects.push(object[key]); 47 objects.push(object[key]);
48 } 48 }
49 } 49 }
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 var eventName = messageObject["method"]; 201 var eventName = messageObject["method"];
202 var eventHandler = InspectorTest._eventHandler[eventName]; 202 var eventHandler = InspectorTest._eventHandler[eventName];
203 if (eventHandler) 203 if (eventHandler)
204 eventHandler(messageObject); 204 eventHandler(messageObject);
205 } 205 }
206 } catch (e) { 206 } catch (e) {
207 InspectorTest.log("Exception when dispatching message: " + e + "\n" + e.stac k + "\n message = " + JSON.stringify(messageObject, null, 2)); 207 InspectorTest.log("Exception when dispatching message: " + e + "\n" + e.stac k + "\n message = " + JSON.stringify(messageObject, null, 2));
208 InspectorTest.completeTest(); 208 InspectorTest.completeTest();
209 } 209 }
210 } 210 }
OLDNEW
« no previous file with comments | « test/inspector/debugger/command-line-api-with-bound-function-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698