Title: [199432] releases/WebKitGTK/webkit-2.12/Source/WebCore
Revision
199432
Author
[email protected]
Date
2016-04-13 01:46:20 -0700 (Wed, 13 Apr 2016)

Log Message

Merge r198542 - 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: releases/WebKitGTK/webkit-2.12/Source/WebCore/ChangeLog (199431 => 199432)


--- releases/WebKitGTK/webkit-2.12/Source/WebCore/ChangeLog	2016-04-13 08:43:25 UTC (rev 199431)
+++ releases/WebKitGTK/webkit-2.12/Source/WebCore/ChangeLog	2016-04-13 08:46:20 UTC (rev 199432)
@@ -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  Brent Fulgham  <[email protected]>
 
         SharedBuffer::copy() can cause a segmentation fault.

Modified: releases/WebKitGTK/webkit-2.12/Source/WebCore/loader/cache/CachedResourceLoader.cpp (199431 => 199432)


--- releases/WebKitGTK/webkit-2.12/Source/WebCore/loader/cache/CachedResourceLoader.cpp	2016-04-13 08:43:25 UTC (rev 199431)
+++ releases/WebKitGTK/webkit-2.12/Source/WebCore/loader/cache/CachedResourceLoader.cpp	2016-04-13 08:46:20 UTC (rev 199432)
@@ -161,7 +161,7 @@
 
 Frame* CachedResourceLoader::frame() const
 {
-    return m_documentLoader ? m_documentLoader->frame() : 0;
+    return m_documentLoader ? m_documentLoader->frame() : nullptr;
 }
 
 SessionID CachedResourceLoader::sessionID() const
@@ -742,7 +742,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->isMainOrRawResource()) {
+    if (existingResource->isMainOrRawResource() && 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

Reply via email to