Title: [198542] trunk/Source/WebCore
- Revision
- 198542
- Author
- [email protected]
- Date
- 2016-03-22 12:12:32 -0700 (Tue, 22 Mar 2016)
Log Message
Add null check in CachedResourceLoader::determineRevalidationPolicy
https://bugs.webkit.org/show_bug.cgi?id=155758
rdar://problem/25108408
Patch by Alex Christensen <[email protected]> on 2016-03-22
Reviewed by Jer Noble.
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::frame):
(WebCore::CachedResourceLoader::determineRevalidationPolicy):
Null-check frame() before dereferencing it.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (198541 => 198542)
--- trunk/Source/WebCore/ChangeLog 2016-03-22 19:08:43 UTC (rev 198541)
+++ trunk/Source/WebCore/ChangeLog 2016-03-22 19:12:32 UTC (rev 198542)
@@ -1,3 +1,16 @@
+2016-03-22 Alex Christensen <[email protected]>
+
+ Add null check in CachedResourceLoader::determineRevalidationPolicy
+ https://bugs.webkit.org/show_bug.cgi?id=155758
+ rdar://problem/25108408
+
+ Reviewed by Jer Noble.
+
+ * loader/cache/CachedResourceLoader.cpp:
+ (WebCore::CachedResourceLoader::frame):
+ (WebCore::CachedResourceLoader::determineRevalidationPolicy):
+ Null-check frame() before dereferencing it.
+
2016-03-22 Daniel Bates <[email protected]>
CSP: Check inline event handlers on each run, not only the first
Modified: trunk/Source/WebCore/loader/cache/CachedResourceLoader.cpp (198541 => 198542)
--- trunk/Source/WebCore/loader/cache/CachedResourceLoader.cpp 2016-03-22 19:08:43 UTC (rev 198541)
+++ trunk/Source/WebCore/loader/cache/CachedResourceLoader.cpp 2016-03-22 19:12:32 UTC (rev 198542)
@@ -162,7 +162,7 @@
Frame* CachedResourceLoader::frame() const
{
- return m_documentLoader ? m_documentLoader->frame() : 0;
+ return m_documentLoader ? m_documentLoader->frame() : nullptr;
}
SessionID CachedResourceLoader::sessionID() const
@@ -755,7 +755,7 @@
// FIXME: We should use the same cache policy for all resource types. The raw resource policy is overly strict
// while the normal subresource policy is too loose.
- if (existingResource->isMainOrMediaOrRawResource()) {
+ if (existingResource->isMainOrMediaOrRawResource() && frame()) {
bool strictPolicyDisabled = frame()->loader().isStrictRawResourceValidationPolicyDisabledForTesting();
bool canReuseRawResource = strictPolicyDisabled || downcast<CachedRawResource>(*existingResource).canReuse(request);
if (!canReuseRawResource)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes