Index: third_party/WebKit/Source/core/fetch/Resource.cpp |
diff --git a/third_party/WebKit/Source/core/fetch/Resource.cpp b/third_party/WebKit/Source/core/fetch/Resource.cpp |
index cf9ef1e62c497b4ebc069d841b93025ee0e89b3c..22ce5c5ab7d60305fa1af48fd78a26cdd808f542 100644 |
--- a/third_party/WebKit/Source/core/fetch/Resource.cpp |
+++ b/third_party/WebKit/Source/core/fetch/Resource.cpp |
@@ -324,24 +324,27 @@ void Resource::markClientsAndObserversFinished() |
} |
} |
-void Resource::error(Resource::Status status) |
+void Resource::error(const ResourceError& error) |
{ |
+ ASSERT(!error.isNull()); |
+ m_error = error; |
if (!m_revalidatingRequest.isNull()) |
m_revalidatingRequest = ResourceRequest(); |
- if (!m_error.isNull() && (m_error.isCancellation() || !isPreloaded())) |
+ if (m_error.isCancellation() || !isPreloaded()) |
memoryCache()->remove(this); |
- setStatus(status); |
+ setStatus(LoadError); |
ASSERT(errorOccurred()); |
m_data.clear(); |
checkNotify(); |
markClientsAndObserversFinished(); |
} |
-void Resource::finish() |
+void Resource::finish(double loadFinishTime) |
{ |
ASSERT(m_revalidatingRequest.isNull()); |
+ m_loadFinishTime = loadFinishTime; |
if (!errorOccurred()) |
yhirano
2016/05/02 09:31:34
The CL description suggests we can make this branc
Nate Chapin
2016/05/02 19:32:24
I don't think it's guaranteed, because a DecodeErr
|
m_status = Cached; |
checkNotify(); |