Title: [89428] trunk/Source/WebCore
- Revision
- 89428
- Author
- [email protected]
- Date
- 2011-06-22 07:08:34 -0700 (Wed, 22 Jun 2011)
Log Message
2011-06-22 Pavel Podivilov <[email protected]>
Reviewed by Yury Semikhatsky.
Web Inspector: fix exceptions in scripts panel.
https://bugs.webkit.org/show_bug.cgi?id=62865
Resource.requestContent callback may be fired after navigation when scripts panel
is already reset.
* inspector/front-end/DebuggerPresentationModel.js:
(WebInspector.DebuggerPresentationModel.prototype._addScript.contentChanged):
(WebInspector.DebuggerPresentationModel.prototype._addScript):
* inspector/front-end/ScriptsPanel.js:
(WebInspector.ScriptsPanel.prototype._showSourceFrameAndAddToHistory):
(WebInspector.ScriptsPanel.prototype._filesSelectChanged):
* inspector/front-end/SourceFile.js:
(WebInspector.SourceFile.prototype.reload):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (89427 => 89428)
--- trunk/Source/WebCore/ChangeLog 2011-06-22 14:01:12 UTC (rev 89427)
+++ trunk/Source/WebCore/ChangeLog 2011-06-22 14:08:34 UTC (rev 89428)
@@ -1,3 +1,22 @@
+2011-06-22 Pavel Podivilov <[email protected]>
+
+ Reviewed by Yury Semikhatsky.
+
+ Web Inspector: fix exceptions in scripts panel.
+ https://bugs.webkit.org/show_bug.cgi?id=62865
+
+ Resource.requestContent callback may be fired after navigation when scripts panel
+ is already reset.
+
+ * inspector/front-end/DebuggerPresentationModel.js:
+ (WebInspector.DebuggerPresentationModel.prototype._addScript.contentChanged):
+ (WebInspector.DebuggerPresentationModel.prototype._addScript):
+ * inspector/front-end/ScriptsPanel.js:
+ (WebInspector.ScriptsPanel.prototype._showSourceFrameAndAddToHistory):
+ (WebInspector.ScriptsPanel.prototype._filesSelectChanged):
+ * inspector/front-end/SourceFile.js:
+ (WebInspector.SourceFile.prototype.reload):
+
2011-06-21 Michael Saboff <[email protected]>
Reviewed by Adam Roben.
Modified: trunk/Source/WebCore/inspector/front-end/ConsoleView.js (89427 => 89428)
--- trunk/Source/WebCore/inspector/front-end/ConsoleView.js 2011-06-22 14:01:12 UTC (rev 89427)
+++ trunk/Source/WebCore/inspector/front-end/ConsoleView.js 2011-06-22 14:08:34 UTC (rev 89428)
@@ -979,8 +979,10 @@
messageTextElement.appendChild(document.createTextNode(functionName));
content.appendChild(messageTextElement);
- var urlElement = WebInspector.linkifyResourceAsNode(frame.url, "scripts", frame.lineNumber, "console-message-url");
- content.appendChild(urlElement);
+ if (frame.url) {
+ var urlElement = WebInspector.linkifyResourceAsNode(frame.url, "scripts", frame.lineNumber, "console-message-url");
+ content.appendChild(urlElement);
+ }
var treeElement = new TreeElement(content);
parentTreeElement.appendChild(treeElement);
Modified: trunk/Source/WebCore/inspector/front-end/DebuggerPresentationModel.js (89427 => 89428)
--- trunk/Source/WebCore/inspector/front-end/DebuggerPresentationModel.js 2011-06-22 14:01:12 UTC (rev 89427)
+++ trunk/Source/WebCore/inspector/front-end/DebuggerPresentationModel.js 2011-06-22 14:08:34 UTC (rev 89428)
@@ -139,7 +139,8 @@
function contentChanged(sourceFile)
{
- this.dispatchEventToListeners(WebInspector.DebuggerPresentationModel.Events.SourceFileChanged, this._sourceFiles[sourceFileId]);
+ if (this._sourceFiles[sourceFileId] === sourceFile)
+ this.dispatchEventToListeners(WebInspector.DebuggerPresentationModel.Events.SourceFileChanged, this._sourceFiles[sourceFileId]);
}
if (!this._formatSourceFiles)
sourceFile = new WebInspector.SourceFile(sourceFileId, script, contentChanged.bind(this));
Modified: trunk/Source/WebCore/inspector/front-end/ScriptsPanel.js (89427 => 89428)
--- trunk/Source/WebCore/inspector/front-end/ScriptsPanel.js 2011-06-22 14:01:12 UTC (rev 89427)
+++ trunk/Source/WebCore/inspector/front-end/ScriptsPanel.js 2011-06-22 14:08:34 UTC (rev 89428)
@@ -557,6 +557,9 @@
_showSourceFrameAndAddToHistory: function(sourceFileId)
{
+ if (!(sourceFileId in this._sourceFileIdToFilesSelectOption))
+ return;
+
var sourceFrame = this._showSourceFrame(sourceFileId);
var oldIndex = this._currentBackForwardIndex;
@@ -684,6 +687,9 @@
_filesSelectChanged: function()
{
+ if (this._filesSelectElement.selectedIndex === -1)
+ return;
+
var sourceFileId = this._filesSelectElement[this._filesSelectElement.selectedIndex]._sourceFileId;
this._showSourceFrameAndAddToHistory(sourceFileId);
},
Modified: trunk/Source/WebCore/inspector/front-end/SourceFile.js (89427 => 89428)
--- trunk/Source/WebCore/inspector/front-end/SourceFile.js 2011-06-22 14:01:12 UTC (rev 89427)
+++ trunk/Source/WebCore/inspector/front-end/SourceFile.js 2011-06-22 14:08:34 UTC (rev 89428)
@@ -105,7 +105,7 @@
{
if (this._contentLoaded) {
this._contentLoaded = false;
- this._contentChangedDelegate();
+ this._contentChangedDelegate(this);
} else if (this._contentRequested)
this._reloadContent = true;
else if (this._requestContentCallbacks.length)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes