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

Side by Side Diff: test/inspector/debugger/asm-js-breakpoint-before-exec.js

Issue 2612013002: [asm.js] [inspector-test] Avoid breakpoint on "use asm" statement (Closed)
Patch Set: Created 3 years, 11 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 | « no previous file | test/inspector/debugger/asm-js-breakpoint-before-exec-expected.txt » ('j') | 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 // Flags: --validate-asm --allow-natives-syntax 5 // Flags: --validate-asm --allow-natives-syntax
6 6
7 InspectorTest.log( 7 InspectorTest.log(
8 'This test runs asm.js which calls back to JS. Before executing (after ' + 8 'This test runs asm.js which calls back to JS. Before executing (after ' +
9 'the script is parsed) we set breakpoints in the asm.js code.'); 9 'the script is parsed) we set breakpoints in the asm.js code.');
10 10
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 96
97 var numScripts = 0; 97 var numScripts = 0;
98 98
99 function handleScriptParsed(messageObject) 99 function handleScriptParsed(messageObject)
100 { 100 {
101 var scriptId = messageObject.params.scriptId; 101 var scriptId = messageObject.params.scriptId;
102 ++numScripts; 102 ++numScripts;
103 InspectorTest.log('Script nr ' + numScripts + ' parsed!'); 103 InspectorTest.log('Script nr ' + numScripts + ' parsed!');
104 if (numScripts > 1) return; 104 if (numScripts > 1) return;
105 105
106 var startLine = messageObject.params.startLine; 106 var startLine = messageObject.params.startLine + 3;
107 var endLine = messageObject.params.endLine; 107 var endLine = messageObject.params.endLine;
108 InspectorTest.log('First script; assuming testFunction.'); 108 InspectorTest.log('First script; assuming testFunction.');
109 InspectorTest.log( 109 InspectorTest.log(
110 'Flooding script with breakpoints for all lines (' + startLine + ' - ' + 110 'Flooding script with breakpoints for the lines ' + startLine + ' to ' +
111 endLine + ')...'); 111 endLine + '...');
112 var currentLine = startLine; 112 var currentLine = startLine;
113 function setNextBreakpoint(message) { 113 function setNextBreakpoint(message) {
114 if (message) InspectorTest.logMessage('error: ' + message.error); 114 if (message) InspectorTest.logMessage('error: ' + message.error);
115 if (currentLine == endLine) { 115 if (currentLine == endLine) {
116 afterScriptParsedCallback(); 116 afterScriptParsedCallback();
117 return; 117 return;
118 } 118 }
119 var thisLine = currentLine; 119 var thisLine = currentLine;
120 currentLine += 1; 120 currentLine += 1;
121 InspectorTest.log('Setting breakpoint on line ' + thisLine); 121 InspectorTest.log('Setting breakpoint on line ' + thisLine);
122 Protocol.Debugger 122 Protocol.Debugger
123 .setBreakpoint( 123 .setBreakpoint(
124 {'location': {'scriptId': scriptId, 'lineNumber': thisLine}}) 124 {'location': {'scriptId': scriptId, 'lineNumber': thisLine}})
125 .then(setNextBreakpoint); 125 .then(setNextBreakpoint);
126 } 126 }
127 setNextBreakpoint(); 127 setNextBreakpoint();
128 } 128 }
OLDNEW
« no previous file with comments | « no previous file | test/inspector/debugger/asm-js-breakpoint-before-exec-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698