Go to http://www.pcmag.com/article2/0,2817,2354369,00.asp then save the page as a webarchive. Crash! Thread 0 Crashed: Dispatch queue: com.apple.main-thread 0 com.apple.WebCore 0x0000000101ba29fc WTF::RefPtr<WebCore::StyleList>::operator WebCore::StyleList* WTF::RefPtr<WebCore::StyleList>::*() const + 12 (RefPtr.h:72) 1 com.apple.WebCore 0x0000000101ba23e3 WebCore::CSSRuleList::length() const + 25 (CSSRuleList.cpp:54) 2 com.apple.WebCore 0x0000000101bee366 WebCore::CSSStyleSheet::addSubresourceStyleURLs(WTF::ListHashSet<WebCore::KURL, WebCore::KURLHash>&) + 254 (CSSStyleSheet.cpp:235) 3 com.apple.WebCore 0x0000000101e72e69 WebCore::HTMLLinkElement::addSubresourceAttributeURLs(WTF::ListHashSet<WebCore::KURL, WebCore::KURLHash>&) const + 143 (HTMLLinkElement.cpp:424) 4 com.apple.WebCore 0x00000001021b9152 WebCore::Node::getSubresourceURLs(WTF::ListHashSet<WebCore::KURL, WebCore::KURLHash>&) const + 42 (Node.cpp:2282) 5 com.apple.WebCore 0x0000000102172490 WebCore::LegacyWebArchive::create(WebCore::String const&, WebCore::Frame*, WTF::Vector<WebCore::Node*, 0ul> const&) + 882 (LegacyWebArchive.cpp:516) 6 com.apple.WebCore 0x00000001021730d1 WebCore::LegacyWebArchive::create(WebCore::Node*) + 315 (LegacyWebArchive.cpp:430) 7 com.apple.WebKit 0x00000001015828c9 -[DOMNode(WebDOMNodeOperations) webArchive] + 70 (WebDOMOperations.mm:53) ... We're walking a CSSStyleSheet looking for subresource URLs. The CSSRuleList we get is null do to a failed security origin check. We should just walk the stylesheet directly.
<rdar://problem/7381219>
Created attachment 42904 [details] Fix + layout test
http://trac.webkit.org/changeset/50587
http://trac.webkit.org/changeset/50778