Bug 471227 - More debug spew.

This commit is contained in:
Dave Camp 2009-02-24 23:12:13 -08:00
parent bf4b7538a7
commit 6b55f44cfb
4 changed files with 38 additions and 2 deletions

View File

@ -963,6 +963,11 @@ nsContentSink::SelectDocAppCache(nsIApplicationCache *aLoadApplicationCache,
("Selection: assigning app cache %s to document %s", clientID.get(), docURISpec.get()));
#endif
{
// XXX: Debugging 471227
printf("(Bug 471227): setting application cache to %p for document >%p< from SelectDocAppCacheNoManifest\n",
aLoadApplicationCache, applicationCacheDocument.get());
}
rv = applicationCacheDocument->SetApplicationCache(aLoadApplicationCache);
NS_ENSURE_SUCCESS(rv, rv);
@ -1017,6 +1022,12 @@ nsContentSink::SelectDocAppCacheNoManifest(nsIApplicationCache *aLoadApplication
("Selection, no manifest: assigning app cache %s to document %s", clientID.get(), docURISpec.get()));
#endif
{
// XXX: Debugging 471227
printf("(Bug 471227): setting application cache to %p for document >%p< from SelectDocAppCacheNoManifest\n",
aLoadApplicationCache, applicationCacheDocument.get());
}
rv = applicationCacheDocument->SetApplicationCache(aLoadApplicationCache);
NS_ENSURE_SUCCESS(rv, rv);

View File

@ -2359,8 +2359,11 @@ nsXMLHttpRequest::OnStopRequest(nsIRequest *request, nsISupports *ctxt, nsresult
uri->GetSpec(spec);
}
printf("(Bug 471227): XHR failed for %s: status: %x, appcache: %p\n",
spec.get(), status, appCache.get());
nsCOMPtr<nsIApplicationCacheContainer> container;
NS_QueryNotificationCallbacks(channel, container);
printf("(Bug 471227): XHR failed for %s: status: %x, appcache: %p, doc: %p\n",
spec.get(), status, appCache.get(), container.get());
}
// By nulling out channel here we make it so that Send() can test

View File

@ -1603,6 +1603,13 @@ nsHttpChannel::OpenCacheEntry(PRBool offline, PRBool *delayed)
if (appCacheContainer) {
appCacheContainer->GetApplicationCache(getter_AddRefs(mApplicationCache));
{
// XXX: Debugging 471227
if (mApplicationCache) {
printf("(Bug 471227): picked up application cache %p from callbacks (%p)\n",
mApplicationCache.get(), appCacheContainer.get());
}
}
}
}
@ -1617,6 +1624,14 @@ nsHttpChannel::OpenCacheEntry(PRBool offline, PRBool *delayed)
nsresult rv = appCacheService->ChooseApplicationCache
(cacheKey, getter_AddRefs(mApplicationCache));
NS_ENSURE_SUCCESS(rv, rv);
{
// XXX: Debugging 471227
if (mApplicationCache) {
printf("(Bug 471227): chose application cache %p\n",
mApplicationCache.get());
}
}
}
}

View File

@ -1179,6 +1179,9 @@ nsOfflineCacheUpdate::Init(nsIURI *aManifestURI,
rv = mApplicationCache->GetClientID(mClientID);
NS_ENSURE_SUCCESS(rv, rv);
printf("(Bug 471227) Initializing cache update %p, created %p\n",
this, mApplicationCache.get());
mState = STATE_INITIALIZED;
return NS_OK;
}
@ -1852,6 +1855,10 @@ nsOfflineCacheUpdate::AssociateDocument(nsIDOMDocument *aDocument)
if (!existingCache) {
LOG(("Update %p: associating app cache %s to document %p", this, mClientID.get(), aDocument));
{
printf("(Bug 471227): associating app cache %p with document >%p< from nsOfflineCacheUpdate %p\n",
mApplicationCache.get(), container.get(), this);
}
rv = container->SetApplicationCache(mApplicationCache);
NS_ENSURE_SUCCESS(rv, rv);