Title: [97702] trunk
- Revision
- 97702
- Author
- [email protected]
- Date
- 2011-10-17 19:19:36 -0700 (Mon, 17 Oct 2011)
Log Message
Web Inspector: Search in resource crashes when there is no resource with given url.
https://bugs.webkit.org/show_bug.cgi?id=69767
Reviewed by Pavel Feldman.
Source/WebCore:
Test: http/tests/inspector/search/search-in-non-existing-resource.html
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::searchInResource):
LayoutTests:
* http/tests/inspector/search/search-in-non-existing-resource-expected.txt: Added.
* http/tests/inspector/search/search-in-non-existing-resource.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (97701 => 97702)
--- trunk/LayoutTests/ChangeLog 2011-10-18 02:17:25 UTC (rev 97701)
+++ trunk/LayoutTests/ChangeLog 2011-10-18 02:19:36 UTC (rev 97702)
@@ -1,3 +1,13 @@
+2011-10-17 Vsevolod Vlasov <[email protected]>
+
+ Web Inspector: Search in resource crashes when there is no resource with given url.
+ https://bugs.webkit.org/show_bug.cgi?id=69767
+
+ Reviewed by Pavel Feldman.
+
+ * http/tests/inspector/search/search-in-non-existing-resource-expected.txt: Added.
+ * http/tests/inspector/search/search-in-non-existing-resource.html: Added.
+
2011-10-17 Mihnea Ovidenie <[email protected]>
[CSS Regions]Change content:-webkit-from-flow to -webkit-flow-from
Added: trunk/LayoutTests/http/tests/inspector/search/search-in-non-existing-resource-expected.txt (0 => 97702)
--- trunk/LayoutTests/http/tests/inspector/search/search-in-non-existing-resource-expected.txt (rev 0)
+++ trunk/LayoutTests/http/tests/inspector/search/search-in-non-existing-resource-expected.txt 2011-10-18 02:19:36 UTC (rev 97702)
@@ -0,0 +1,6 @@
+Tests single resource search in inspector page agent with non existing resource url does not cause a crash.
+
+Bug 69767
+Search matches:
+
+
Added: trunk/LayoutTests/http/tests/inspector/search/search-in-non-existing-resource.html (0 => 97702)
--- trunk/LayoutTests/http/tests/inspector/search/search-in-non-existing-resource.html (rev 0)
+++ trunk/LayoutTests/http/tests/inspector/search/search-in-non-existing-resource.html 2011-10-18 02:19:36 UTC (rev 97702)
@@ -0,0 +1,34 @@
+<html>
+<head>
+<script src=""
+<script src=""
+<script src=""
+<script>
+function test()
+{
+ // This file should not match search query.
+ var text = "searchTest" + "UniqueString";
+ InspectorTest.runAfterResourcesAreFinished(["search.js"], step2);
+
+ function step2()
+ {
+ var resource = WebInspector.resourceForURL("http://127.0.0.1:8000/inspector/search/resources/search.js");
+ var url = ""
+ PageAgent.searchInResource(resource.frameId, url, text, step3);
+ }
+
+ function step3(error, searchMatches)
+ {
+ InspectorTest.dumpSearchMatches(searchMatches);
+ InspectorTest.completeTest();
+ }
+}
+</script>
+</head>
+<body>
+<p>Tests single resource search in inspector page agent with non existing resource url does not cause a crash.</p>
+<a href="" 69767</a>
+
+<iframe src="" _onload_="runTest()">
+</body>
+</html>
Modified: trunk/Source/WebCore/ChangeLog (97701 => 97702)
--- trunk/Source/WebCore/ChangeLog 2011-10-18 02:17:25 UTC (rev 97701)
+++ trunk/Source/WebCore/ChangeLog 2011-10-18 02:19:36 UTC (rev 97702)
@@ -1,3 +1,15 @@
+2011-10-17 Vsevolod Vlasov <[email protected]>
+
+ Web Inspector: Search in resource crashes when there is no resource with given url.
+ https://bugs.webkit.org/show_bug.cgi?id=69767
+
+ Reviewed by Pavel Feldman.
+
+ Test: http/tests/inspector/search/search-in-non-existing-resource.html
+
+ * inspector/InspectorPageAgent.cpp:
+ (WebCore::InspectorPageAgent::searchInResource):
+
2011-10-17 Mihnea Ovidenie <[email protected]>
[CSS Regions]Change content:-webkit-from-flow to -webkit-flow-from
Modified: trunk/Source/WebCore/inspector/InspectorPageAgent.cpp (97701 => 97702)
--- trunk/Source/WebCore/inspector/InspectorPageAgent.cpp 2011-10-18 02:17:25 UTC (rev 97701)
+++ trunk/Source/WebCore/inspector/InspectorPageAgent.cpp 2011-10-18 02:19:36 UTC (rev 97702)
@@ -503,7 +503,8 @@
if (!success) {
CachedResource* resource = cachedResource(frame, kurl);
- success = textContentForCachedResource(resource, &content);
+ if (resource)
+ success = textContentForCachedResource(resource, &content);
}
if (!success)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes