mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 482370 - after noupdate documents are associated with the wrong application cache. r+sr=jst
This commit is contained in:
parent
bb3fad06d5
commit
2ddf9e1741
@ -20,8 +20,14 @@ function manifestUpdated()
|
||||
window.opener.OfflineTest.ok(true, "Unable to fetch unlisted resource, properly associated.");
|
||||
}
|
||||
|
||||
window.opener.OfflineTest.checkCache("http://localhost:8888/tests/dom/tests/mochitest/ajax/offline/updatingImplicit.html",
|
||||
true);
|
||||
req = new XMLHttpRequest;
|
||||
req.open("GET", "updatingImplicit.html", false);
|
||||
try {
|
||||
req.send(null);
|
||||
window.opener.OfflineTest.ok(true, "Able to fetch listed resource, properly associated.");
|
||||
} catch(ex) {
|
||||
window.opener.OfflineTest.ok(false, "Unable to fetch listed resource, not properly associated.");
|
||||
}
|
||||
|
||||
window.opener.implicitLoaded(window, false);
|
||||
}
|
||||
|
@ -1371,7 +1371,7 @@ nsOfflineCacheUpdate::LoadCompleted()
|
||||
mSucceeded = PR_FALSE;
|
||||
|
||||
for (PRInt32 i = 0; i < mDocuments.Count(); i++) {
|
||||
AssociateDocument(mDocuments[i]);
|
||||
AssociateDocument(mDocuments[i], mPreviousApplicationCache);
|
||||
}
|
||||
|
||||
ScheduleImplicit();
|
||||
@ -1870,7 +1870,8 @@ nsOfflineCacheUpdate::ScheduleImplicit()
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsOfflineCacheUpdate::AssociateDocument(nsIDOMDocument *aDocument)
|
||||
nsOfflineCacheUpdate::AssociateDocument(nsIDOMDocument *aDocument,
|
||||
nsIApplicationCache *aApplicationCache)
|
||||
{
|
||||
// Check that the document that requested this update was
|
||||
// previously associated with an application cache. If not, it
|
||||
@ -1885,8 +1886,18 @@ nsOfflineCacheUpdate::AssociateDocument(nsIDOMDocument *aDocument)
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
if (!existingCache) {
|
||||
LOG(("Update %p: associating app cache %s to document %p", this, mClientID.get(), aDocument));
|
||||
rv = container->SetApplicationCache(mApplicationCache);
|
||||
#if defined(PR_LOGGING)
|
||||
if (LOG_ENABLED()) {
|
||||
nsCAutoString clientID;
|
||||
if (aApplicationCache) {
|
||||
aApplicationCache->GetClientID(clientID);
|
||||
}
|
||||
LOG(("Update %p: associating app cache %s to document %p",
|
||||
this, clientID.get(), aDocument));
|
||||
}
|
||||
#endif
|
||||
|
||||
rv = container->SetApplicationCache(aApplicationCache);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
}
|
||||
|
||||
@ -1923,7 +1934,7 @@ nsOfflineCacheUpdate::Finish()
|
||||
}
|
||||
|
||||
for (PRInt32 i = 0; i < mDocuments.Count(); i++) {
|
||||
AssociateDocument(mDocuments[i]);
|
||||
AssociateDocument(mDocuments[i], mApplicationCache);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -256,7 +256,8 @@ private:
|
||||
nsresult NotifyDownloading();
|
||||
nsresult NotifyStarted(nsOfflineCacheUpdateItem *aItem);
|
||||
nsresult NotifyCompleted(nsOfflineCacheUpdateItem *aItem);
|
||||
nsresult AssociateDocument(nsIDOMDocument *aDocument);
|
||||
nsresult AssociateDocument(nsIDOMDocument *aDocument,
|
||||
nsIApplicationCache *aApplicationCache);
|
||||
nsresult ScheduleImplicit();
|
||||
nsresult Finish();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user