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

Side by Side Diff: Source/WebCore/inspector/front-end/DebuggerPresentationModel.js

Issue 10548044: Merge 120214 - Web Inspector: Errors when pending console messages are attached to JavaScriptSource… (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1132/
Patch Set: Created 8 years, 6 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 | 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) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 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 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 { 249 {
250 var messages = this._pendingConsoleMessages[script.sourceURL]; 250 var messages = this._pendingConsoleMessages[script.sourceURL];
251 if (!messages) 251 if (!messages)
252 return; 252 return;
253 253
254 var pendingMessages = []; 254 var pendingMessages = [];
255 for (var i = 0; i < messages.length; i++) { 255 for (var i = 0; i < messages.length; i++) {
256 var message = messages[i]; 256 var message = messages[i];
257 var rawLocation = message.location(); 257 var rawLocation = message.location();
258 if (script.scriptId === rawLocation.scriptId) 258 if (script.scriptId === rawLocation.scriptId)
259 this._addConsoleMessageToScript(messages, rawLocation); 259 this._addConsoleMessageToScript(message, rawLocation);
260 else 260 else
261 pendingMessages.push(message); 261 pendingMessages.push(message);
262 } 262 }
263 263
264 if (pendingMessages.length) 264 if (pendingMessages.length)
265 this._pendingConsoleMessages[script.sourceURL] = pendingMessages; 265 this._pendingConsoleMessages[script.sourceURL] = pendingMessages;
266 else 266 else
267 delete this._pendingConsoleMessages[script.sourceURL]; 267 delete this._pendingConsoleMessages[script.sourceURL];
268 }, 268 },
269 269
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
394 this._presentationModel.setScriptSource(uiSourceCode, content, callback. bind(this)); 394 this._presentationModel.setScriptSource(uiSourceCode, content, callback. bind(this));
395 } 395 }
396 } 396 }
397 397
398 WebInspector.DebuggerPresentationModelResourceBinding.prototype.__proto__ = WebI nspector.ResourceDomainModelBinding.prototype; 398 WebInspector.DebuggerPresentationModelResourceBinding.prototype.__proto__ = WebI nspector.ResourceDomainModelBinding.prototype;
399 399
400 /** 400 /**
401 * @type {?WebInspector.DebuggerPresentationModel} 401 * @type {?WebInspector.DebuggerPresentationModel}
402 */ 402 */
403 WebInspector.debuggerPresentationModel = null; 403 WebInspector.debuggerPresentationModel = null;
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698