Title: [93036] branches/chromium/835/Source/WebCore/inspector/front-end/ResourcesPanel.js
Revision
93036
Author
vse...@chromium.org
Date
2011-08-15 03:00:58 -0700 (Mon, 15 Aug 2011)

Log Message

Merge 92835 - Web Inspector: [REGRESSION] Resources panel search fails when search result is found in a resource used in several frames.
https://bugs.webkit.org/show_bug.cgi?id=66007

Reviewed by Pavel Feldman.

* inspector/front-end/ResourcesPanel.js:
(WebInspector.ResourcesPanel.prototype.performSearch.callback):
(WebInspector.ResourcesPanel.prototype.performSearch):
(WebInspector.FrameTreeElement.prototype.resourceByURL):

TBR=vse...@chromium.org
BUG=92405
Review URL: http://codereview.chromium.org/7648029

Modified Paths

Diff

Modified: branches/chromium/835/Source/WebCore/inspector/front-end/ResourcesPanel.js (93035 => 93036)


--- branches/chromium/835/Source/WebCore/inspector/front-end/ResourcesPanel.js	2011-08-15 09:26:41 UTC (rev 93035)
+++ branches/chromium/835/Source/WebCore/inspector/front-end/ResourcesPanel.js	2011-08-15 10:00:58 UTC (rev 93036)
@@ -726,6 +726,12 @@
                         continue;
                     var resource = frameTreeElement.resourceByURL(searchResult.url);
 
+                    // FIXME: When the same script is used in several frames and this script contains at least 
+                    // one search result then some search results can not be matched with a resource on panel.
+                    // https://bugs.webkit.org/show_bug.cgi?id=66005 
+                    if (!resource)
+                        continue;
+                    
                     if (resource.history.length > 0)
                         continue; // Skip edited resources.
                     this._findTreeElementForResource(resource).searchMatchesFound(searchResult.matchesCount);
@@ -1130,7 +1136,8 @@
 
     resourceByURL: function(url)
     {
-        return this._treeElementForResource[url].representedObject;
+        var treeElement = this._treeElementForResource[url];
+        return treeElement ? treeElement.representedObject : null;
     },
 
     appendChild: function(treeElement)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to