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

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

Issue 2721633004: [inspector] fixed crash on attempt to access empty scope_info on break (Closed)
Patch Set: better test Created 3 years, 9 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/step-into-arrow-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 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 .then(dumpSourceWithLocation); 127 .then(dumpSourceWithLocation);
128 } 128 }
129 return Promise.resolve().then(dumpSourceWithLocation); 129 return Promise.resolve().then(dumpSourceWithLocation);
130 130
131 function dumpSourceWithLocation() { 131 function dumpSourceWithLocation() {
132 var location = callFrame.location; 132 var location = callFrame.location;
133 var lines = script.scriptSource.split('\n'); 133 var lines = script.scriptSource.split('\n');
134 var line = lines[location.lineNumber]; 134 var line = lines[location.lineNumber];
135 line = line.slice(0, location.columnNumber) + '#' + (line.slice(location.col umnNumber) || ''); 135 line = line.slice(0, location.columnNumber) + '#' + (line.slice(location.col umnNumber) || '');
136 lines[location.lineNumber] = line; 136 lines[location.lineNumber] = line;
137 lines = lines.filter(line => line.indexOf('//# sourceURL=') === -1);
137 InspectorTest.log(lines.slice(Math.max(location.lineNumber - 1, 0), location .lineNumber + 2).join('\n')); 138 InspectorTest.log(lines.slice(Math.max(location.lineNumber - 1, 0), location .lineNumber + 2).join('\n'));
138 InspectorTest.log(''); 139 InspectorTest.log('');
139 } 140 }
140 } 141 }
141 142
142 InspectorTest.logAsyncStackTrace = function(asyncStackTrace) 143 InspectorTest.logAsyncStackTrace = function(asyncStackTrace)
143 { 144 {
144 while (asyncStackTrace) { 145 while (asyncStackTrace) {
145 if (asyncStackTrace.promiseCreationFrame) { 146 if (asyncStackTrace.promiseCreationFrame) {
146 var frame = asyncStackTrace.promiseCreationFrame; 147 var frame = asyncStackTrace.promiseCreationFrame;
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 } 267 }
267 } catch (e) { 268 } catch (e) {
268 InspectorTest.log("Exception when dispatching message: " + e + "\n" + e.stac k + "\n message = " + JSON.stringify(messageObject, null, 2)); 269 InspectorTest.log("Exception when dispatching message: " + e + "\n" + e.stac k + "\n message = " + JSON.stringify(messageObject, null, 2));
269 InspectorTest.completeTest(); 270 InspectorTest.completeTest();
270 } 271 }
271 } 272 }
272 273
273 InspectorTest.loadScript = function(fileName) { 274 InspectorTest.loadScript = function(fileName) {
274 InspectorTest.addScript(read(fileName)); 275 InspectorTest.addScript(read(fileName));
275 } 276 }
OLDNEW
« no previous file with comments | « test/inspector/debugger/step-into-arrow-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698