Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
2010-02-15 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
Reviewed by Xan Lopez. [GTK] Crashes when going back to a page that has data: URIs, with page cache enabled https://bugs.webkit.org/show_bug.cgi?id=34944 Set the URL in the newly created response, when parsing data: URIs. Test: fast/harness/page-cache-crash-on-data-urls.html * platform/network/soup/ResourceHandleSoup.cpp: (WebCore::parseDataUrl): Canonical link: https://commits.webkit.org/46093@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@54786 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Showing
6 changed files
with
97 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -0,0 +1,8 @@ | ||
This tests that going back in history with page cache enabled is not going to crash/ASSERT when the previous page has data:// URLs. | ||
|
||
open page with data urls | ||
page with data urls, about to navigate to page-2. | ||
page-2, about to go back to page-1 | ||
Back on page with data urls, timer is still firing. | ||
PASS. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -0,0 +1,36 @@ | ||
<html> | ||
<script> | ||
window.finish = function() | ||
{ | ||
if (layoutTestController) | ||
layoutTestController.notifyDone(); | ||
} | ||
|
||
window.log = function(message) { | ||
document.getElementById("result").innerHTML += message + "<br>"; | ||
} | ||
|
||
window.failure = function(message) { | ||
log("FAIL: " + message); | ||
finish(); | ||
} | ||
|
||
function test() | ||
{ | ||
if (window.layoutTestController) { | ||
layoutTestController.dumpAsText(); | ||
layoutTestController.waitUntilDone(); | ||
layoutTestController.setCanOpenWindows(); | ||
layoutTestController.overridePreference("WebKitUsesPageCachePreferenceKey", 1); | ||
} | ||
log("open page with data urls"); | ||
window.open("resources/cached-page-with-data-urls.html"); | ||
} | ||
</script> | ||
|
||
<body onload="test()"> | ||
<p>This tests that going back in history with page cache enabled is | ||
not going to crash/ASSERT when the previous page has data:// URLs.</p> | ||
<div id="result"></div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -0,0 +1,26 @@ | ||
<script> | ||
|
||
var intervalId; | ||
function check() { | ||
// This flag is set by cached-page-2 when it loads. | ||
// If the timer is fired before cached-page-2 loads, just bail and wait. | ||
if (!window.opener.canExit) | ||
return; | ||
|
||
clearInterval(intervalId); | ||
window.opener.log("Back on page with data urls, timer is still firing."); | ||
window.opener.log("PASS."); | ||
window.opener.finish(); | ||
} | ||
|
||
function loadNext() | ||
{ | ||
intervalId = setInterval(check, 10); | ||
|
||
window.opener.log("page with data urls, about to navigate to page-2.") | ||
location.href = "cached-page-2.html"; | ||
} | ||
</script> | ||
<body onload="loadNext()"> | ||
<img src="data:image/jpg;base64,/9j/4AAQSkZJRgABAQEASABIAAD//gATQ3JlYXRlZCB3aXRoIEdJTVD/2wBDAAUDBAQEAwUEBAQFBQUGBwwIBwcHBw8LCwkMEQ8SEhEPERETFhwXExQaFRERGCEYGh0dHx8fExciJCIeJBweHx7/2wBDAQUFBQcGBw4ICA4eFBEUHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh7/wAARCAAnAFsDASIAAhEBAxEB/8QAHQAAAwEAAgMBAAAAAAAAAAAAAAcICQQGAQIDBf/EADgQAAIBAgQEBAQEAwkAAAAAAAECAwQFAAYHEQgSITETQVFhCSJxgRQjcoIyM5EVNEJikpOhwcL/xAAUAQEAAAAAAAAAAAAAAAAAAAAA/8QAFBEBAAAAAAAAAAAAAAAAAAAA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ltFoo7VQxCKlo4EghQdlRVAA/oMST8PrS2tt61epV5pHgNTCaa1rIuzGM7F5R7HYAH0B9cWDgJB+IfpuKq1UWptD4ayUfJQ3BSQC8bN+W49SGO30YemIop5paeeOeCR4pY2Do6HZlYHcEHyIODBgGRnHXfVPN2Uxla+5pmntZRUljSCON5gu2wd1UM3bruevnvhaopdwqjck7DBgwGoXCtp6NOtHrXbaiNFulcPxtwZTvvI/ULuCQeVeVenToT545HEppjHqpprUWOORIblTv+Jt8r9hKoI5T7MCR/z5YMGAzCv9prrFequz3OEQ1tHM0MyBwwVlOxG4JB+2ODgwYAxXPCTw1RXuKjz5n2KKW2sBLb7aHDCfzDy7H+H/AC+fn6YMGAtyCGKngSCCNIoo1CoiDYKB2AHkMe+DBgP/2Q=="/> | ||
</body> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters