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

Unified Diff: third_party/WebKit/Source/core/inspector/InspectorPageAgent.cpp

Issue 2727393002: DevTools: fix FrameResource.lastModified to be optional when not present (Closed)
Patch Set: use std::isnan Created 3 years, 10 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 | « no previous file | 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/inspector/InspectorPageAgent.cpp
diff --git a/third_party/WebKit/Source/core/inspector/InspectorPageAgent.cpp b/third_party/WebKit/Source/core/inspector/InspectorPageAgent.cpp
index f0f7669c868d0aa7f6d2f852119c60b0291c3740..64ae29daaaf159d13f9b8b34bb5b18b9b961d7d1 100644
--- a/third_party/WebKit/Source/core/inspector/InspectorPageAgent.cpp
+++ b/third_party/WebKit/Source/core/inspector/InspectorPageAgent.cpp
@@ -781,9 +781,11 @@ InspectorPageAgent::buildObjectForFrameTree(LocalFrame* frame) {
.setUrl(urlWithoutFragment(cachedResource->url()).getString())
.setType(cachedResourceTypeJson(*cachedResource))
.setMimeType(cachedResource->response().mimeType())
- .setLastModified(cachedResource->response().lastModified())
.setContentSize(cachedResource->response().decodedBodyLength())
.build();
+ double lastModified = cachedResource->response().lastModified();
+ if (!std::isnan(lastModified))
+ resourceObject->setLastModified(lastModified);
if (cachedResource->wasCanceled())
resourceObject->setCanceled(true);
else if (cachedResource->getStatus() == ResourceStatus::LoadError)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698