Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Unified Diff: third_party/WebKit/Source/core/loader/appcache/ApplicationCacheHost.cpp

Issue 2415373002: Loading: bulk style errors fix in core/loader (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/core/loader/appcache/ApplicationCache.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/loader/appcache/ApplicationCacheHost.cpp
diff --git a/third_party/WebKit/Source/core/loader/appcache/ApplicationCacheHost.cpp b/third_party/WebKit/Source/core/loader/appcache/ApplicationCacheHost.cpp
index e2f55c8b7830394223d6682416b3f9d96f6ad2e9..729baba79c5be3b5873a8ded0c3ecdc92aaff932 100644
--- a/third_party/WebKit/Source/core/loader/appcache/ApplicationCacheHost.cpp
+++ b/third_party/WebKit/Source/core/loader/appcache/ApplicationCacheHost.cpp
@@ -98,10 +98,11 @@ void ApplicationCacheHost::willStartLoadingMainResource(
if (!spawningFrame || !spawningFrame->isLocalFrame())
spawningFrame = &frame;
if (DocumentLoader* spawningDocLoader =
- toLocalFrame(spawningFrame)->loader().documentLoader())
+ toLocalFrame(spawningFrame)->loader().documentLoader()) {
spawningHost = spawningDocLoader->applicationCacheHost()
? spawningDocLoader->applicationCacheHost()->m_host.get()
: nullptr;
+ }
m_host->willStartMainResourceRequest(wrapped, spawningHost);
@@ -198,9 +199,10 @@ void ApplicationCacheHost::notifyApplicationCache(
const String& errorURL,
int errorStatus,
const String& errorMessage) {
- if (id != kProgressEvent)
+ if (id != kProgressEvent) {
InspectorInstrumentation::updateApplicationCacheStatus(
m_documentLoader->frame());
+ }
if (m_defersEvents) {
// Event dispatching is deferred until document.onload has fired.
@@ -265,13 +267,14 @@ void ApplicationCacheHost::dispatchDOMEvent(
if (eventType.isEmpty() || !m_domApplicationCache->getExecutionContext())
return;
Event* event = nullptr;
- if (id == kProgressEvent)
+ if (id == kProgressEvent) {
event = ProgressEvent::create(eventType, true, progressDone, progressTotal);
- else if (id == kErrorEvent)
+ } else if (id == kErrorEvent) {
event = ApplicationCacheErrorEvent::create(errorReason, errorURL,
errorStatus, errorMessage);
- else
+ } else {
event = Event::create(eventType);
+ }
m_domApplicationCache->dispatchEvent(event);
}
@@ -285,9 +288,10 @@ bool ApplicationCacheHost::update() {
bool ApplicationCacheHost::swapCache() {
bool success = m_host ? m_host->swapCache() : false;
- if (success)
+ if (success) {
InspectorInstrumentation::updateApplicationCacheStatus(
m_documentLoader->frame());
+ }
return success;
}
« no previous file with comments | « third_party/WebKit/Source/core/loader/appcache/ApplicationCache.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698