--- old/modules/web/src/main/native/Source/WebCore/loader/cache/CachedResourceLoader.cpp 2016-03-21 23:40:28.888523400 +0530 +++ new/modules/web/src/main/native/Source/WebCore/loader/cache/CachedResourceLoader.cpp 2016-03-21 23:40:28.118523400 +0530 @@ -290,6 +290,10 @@ return 0; } + // Don't load for user cancel or stop + if (m_documentLoader && !m_documentLoader->mainDocumentError().isNull() && m_documentLoader->mainDocumentError().isCancellation()) + return false; + // FIXME: Convert this to check the isolated world's Content Security Policy once webkit.org/b/104520 is solved. bool shouldBypassMainWorldContentSecurityPolicy = (frame() && frame()->script().shouldBypassMainWorldContentSecurityPolicy()); @@ -781,6 +785,11 @@ { checkForPendingPreloads(); + // PostLoad might trigger async resource request which is not required for Canceled Main Document + // caused by user cancel or stop + if (m_documentLoader && !m_documentLoader->mainDocumentError().isNull() && m_documentLoader->mainDocumentError().isCancellation()) + return; + platformStrategies()->loaderStrategy()->resourceLoadScheduler()->servePendingRequests(); }