Changeset 207323 in webkit


Ignore:
Timestamp:
Oct 13, 2016 10:39:07 PM (8 years ago)
Author:
achristensen@apple.com
Message:

Fix API test after r207318.
https://bugs.webkit.org/show_bug.cgi?id=162951

This fixes the API test WebKit2.PendingAPIRequestURL which asserted when trying to hash a null String.

  • loader/DocumentLoader.cpp:

(WebCore::isRemoteWebArchive):
If the mimeType is a null String, it is not in the set webArchiveMIMETypes, so return false instead of hashing it.

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r207321 r207323  
     12016-10-13  Alex Christensen  <achristensen@webkit.org>
     2
     3        Fix API test after r207318.
     4        https://bugs.webkit.org/show_bug.cgi?id=162951
     5
     6        This fixes the API test WebKit2.PendingAPIRequestURL which asserted when trying to hash a null String.
     7
     8        * loader/DocumentLoader.cpp:
     9        (WebCore::isRemoteWebArchive):
     10        If the mimeType is a null String, it is not in the set webArchiveMIMETypes, so return false instead of hashing it.
     11
    1122016-10-13  Alex Christensen  <achristensen@webkit.org>
    213
  • trunk/Source/WebCore/loader/DocumentLoader.cpp

    r207318 r207323  
    764764
    765765    const ResourceResponse& response = documentLoader.response();
    766     if (!webArchiveMIMETypes.get().contains(response.mimeType()))
     766    String mimeType = response.mimeType();
     767    if (mimeType.isNull() || !webArchiveMIMETypes.get().contains(mimeType))
    767768        return false;
    768769
Note: See TracChangeset for help on using the changeset viewer.