Title: [185301] trunk/Source/WebCore
Revision
185301
Author
[email protected]
Date
2015-06-07 07:42:28 -0700 (Sun, 07 Jun 2015)

Log Message

CrashTracer: [USER] com.apple.WebKit.WebContent.Development at com.apple.WebCore: WebCore::FrameLoader::subresourceCachePolicy const + 11
https://bugs.webkit.org/show_bug.cgi?id=145736
rdar://problem/21246971

Reviewed by David Kilzer.

No repro, no test.

* html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::setCSSStyleSheet):

    Null check frame. It may be null during frame teardown.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (185300 => 185301)


--- trunk/Source/WebCore/ChangeLog	2015-06-07 08:48:28 UTC (rev 185300)
+++ trunk/Source/WebCore/ChangeLog	2015-06-07 14:42:28 UTC (rev 185301)
@@ -1,3 +1,18 @@
+2015-06-07  Antti Koivisto  <[email protected]>
+
+        CrashTracer: [USER] com.apple.WebKit.WebContent.Development at com.apple.WebCore: WebCore::FrameLoader::subresourceCachePolicy const + 11
+        https://bugs.webkit.org/show_bug.cgi?id=145736
+        rdar://problem/21246971
+
+        Reviewed by David Kilzer.
+
+        No repro, no test.
+
+        * html/HTMLLinkElement.cpp:
+        (WebCore::HTMLLinkElement::setCSSStyleSheet):
+
+            Null check frame. It may be null during frame teardown.
+
 2015-06-06  Anders Carlsson  <[email protected]>
 
         Remove support from getting plug-in information from Carbon resources

Modified: trunk/Source/WebCore/html/HTMLLinkElement.cpp (185300 => 185301)


--- trunk/Source/WebCore/html/HTMLLinkElement.cpp	2015-06-07 08:48:28 UTC (rev 185300)
+++ trunk/Source/WebCore/html/HTMLLinkElement.cpp	2015-06-07 14:42:28 UTC (rev 185301)
@@ -317,11 +317,15 @@
         ASSERT(!m_sheet);
         return;
     }
+    auto* frame = document().frame();
+    if (!frame)
+        return;
+
     // Completing the sheet load may cause scripts to execute.
     Ref<HTMLLinkElement> protect(*this);
 
     CSSParserContext parserContext(document(), baseURL, charset);
-    auto cachePolicy = document().frame()->loader().subresourceCachePolicy();
+    auto cachePolicy = frame->loader().subresourceCachePolicy();
 
     if (RefPtr<StyleSheetContents> restoredSheet = const_cast<CachedCSSStyleSheet*>(cachedStyleSheet)->restoreParsedStyleSheet(parserContext, cachePolicy)) {
         ASSERT(restoredSheet->isCacheable());
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to