Bug 16487 - KURL doesn't preserve isNull when constructed with a DeprecatedString
Summary: KURL doesn't preserve isNull when constructed with a DeprecatedString
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC All
: P2 Normal
Assignee: Brett Wilson (Google)
URL:
Keywords:
Depends on:
Blocks: 16480 16538
  Show dependency treegraph
 
Reported: 2007-12-17 14:48 PST by Brett Wilson (Google)
Modified: 2008-02-16 08:18 PST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Brett Wilson (Google) 2007-12-17 14:48:40 PST
This means for this code:
  KURL empty;
  KURL second(empty.url());
then empty.isNull() != second.isNull().

This is the pattern executed in DocLoader::requestResource when it does completeURL(). See bug 16480 for this extra string->KURL conversion.

The issue is that if completeURL generated an empty KURL, the urlString will be NULL (as in fast/loader/simultaneous-reloads-assert.html where the base is a data: URL), and then completeURL will convert it to a [Depricated]String, which will then be used to create a new KURL that is now empty but not NULL.

This masks bug 16485, where DocLoader::checkForReload will crash if the string isNull.