<rdar://problem/8044645> and https://bugs.webkit.org/show_bug.cgi?id=41082
authorbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 24 Jun 2010 18:38:59 +0000 (18:38 +0000)
committerbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 24 Jun 2010 18:38:59 +0000 (18:38 +0000)
commitd00dc8ab2fbfc8da32573ca1b3521e8a9dfc69bd
tree40ddc400c68f0cf8e5d4665ddfff8fca6b194217
parent53ba6f45fcddcfcc9bc4c52ff92557fca3947317
<rdar://problem/8044645> and https://bugs.webkit.org/show_bug.cgi?id=41082

Reviewed by Sam Weinig.

Webarchives will null main resource cause a repro crash.

WebCore:

Test: webarchive/loading/mainresource-null-mimetype-crash.html

* loader/archive/cf/LegacyWebArchive.cpp:
(WebCore::LegacyWebArchive::createResource): Fail to create the archive resource if the main resource's
  mime type is null.

LayoutTests:

* webarchive/loading/mainresource-null-mimetype-crash-expected.txt: Added.
* webarchive/loading/mainresource-null-mimetype-crash.html: Added.
* webarchive/loading/resources/mainresource-null-mimetype.webarchive: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@61781 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/webarchive/loading/mainresource-null-mimetype-crash-expected.txt [new file with mode: 0644]
LayoutTests/webarchive/loading/mainresource-null-mimetype-crash.html [new file with mode: 0644]
LayoutTests/webarchive/loading/resources/mainresource-null-mimetype.webarchive [new file with mode: 0644]
WebCore/ChangeLog
WebCore/loader/archive/cf/LegacyWebArchive.cpp