зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1267075
- Part 3: cancel imgRequestProxy if asyncOpen2 failed. r=tnikkel
The problem is if we found a cache hit, then we could go through ValidateRequestWithNewChannel to validate the cache. Then if the CSP check fail(asyncOpen2() will fail), then the imgRequestProxy will remain there, and cause the timeout. I run into problem when running mochitest browser/base/content/test/general/browser_aboutHome.js in non-e10s mode. In the beginning, browser.xul will load defaultFavicon.png, will create an image cache there. Next time when the test starts to run, when it loads about:home, then it will try to load defaultFavicon.png, it will found an image cache hit (loaded previously by browser.xul), and call ValidateRequestWithNewChannel there, however the asyncOpen2 call failed, and the imgRequestProxy is added to the loadGroup of about:home, and never be notified until timeout.
This commit is contained in:
Родитель
83ef929df9
Коммит
0da35daccc
|
@ -1747,9 +1747,9 @@ imgLoader::ValidateRequestWithNewChannel(imgRequest* request,
|
|||
|
||||
mozilla::net::PredictorLearn(aURI, aInitialDocumentURI,
|
||||
nsINetworkPredictor::LEARN_LOAD_SUBRESOURCE, aLoadGroup);
|
||||
|
||||
rv = newChannel->AsyncOpen2(listener);
|
||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||
req->CancelAndForgetObserver(rv);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче