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

Side by Side Diff: Source/devtools/front_end/sdk/PresentationConsoleMessageHelper.js

Issue 388793002: DevTools: Calculate number of warnings and errors and listen for pause in all targets (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master Created 6 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « Source/devtools/front_end/sdk/ConsoleModel.js ('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 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 var script = /** @type {!WebInspector.Script} */ (event.data); 129 var script = /** @type {!WebInspector.Script} */ (event.data);
130 130
131 var messages = this._pendingConsoleMessages[script.sourceURL]; 131 var messages = this._pendingConsoleMessages[script.sourceURL];
132 if (!messages) 132 if (!messages)
133 return; 133 return;
134 134
135 var pendingMessages = []; 135 var pendingMessages = [];
136 for (var i = 0; i < messages.length; i++) { 136 for (var i = 0; i < messages.length; i++) {
137 var message = messages[i]; 137 var message = messages[i];
138 var rawLocation = this._rawLocation(message); 138 var rawLocation = this._rawLocation(message);
139 if (script.scriptId === rawLocation.scriptId) 139 if (script.target() === message.target() && script.scriptId === rawL ocation.scriptId)
140 this._addConsoleMessageToScript(message, rawLocation); 140 this._addConsoleMessageToScript(message, rawLocation);
141 else 141 else
142 pendingMessages.push(message); 142 pendingMessages.push(message);
143 } 143 }
144 144
145 if (pendingMessages.length) 145 if (pendingMessages.length)
146 this._pendingConsoleMessages[script.sourceURL] = pendingMessages; 146 this._pendingConsoleMessages[script.sourceURL] = pendingMessages;
147 else 147 else
148 delete this._pendingConsoleMessages[script.sourceURL]; 148 delete this._pendingConsoleMessages[script.sourceURL];
149 }, 149 },
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 get lineNumber() 192 get lineNumber()
193 { 193 {
194 return this._uiLocation.lineNumber; 194 return this._uiLocation.lineNumber;
195 }, 195 },
196 196
197 dispose: function() 197 dispose: function()
198 { 198 {
199 this._liveLocation.dispose(); 199 this._liveLocation.dispose();
200 } 200 }
201 } 201 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/sdk/ConsoleModel.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698