Bug 60798 - WebURLResponse should not make NULL File objects
Summary: WebURLResponse should not make NULL File objects
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit API (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Brett Wilson (Google)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-13 13:42 PDT by Brett Wilson (Google)
Modified: 2011-05-18 17:32 PDT (History)
5 users (show)

See Also:


Attachments
Patch (1.24 KB, patch)
2011-05-13 13:46 PDT, Brett Wilson (Google)
no flags Details | Formatted Diff | Diff
Patch (style fixed) (1.24 KB, patch)
2011-05-13 16:13 PDT, Brett Wilson (Google)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brett Wilson (Google) 2011-05-13 13:42:45 PDT
My fix for bug 60281 created File objects for download files. This is almost never necessary, and has some IPC overhead. Even if Chromium removed the unnecessary IPC for empty file objects, the allocation is still a waste of time.
Comment 1 Brett Wilson (Google) 2011-05-13 13:46:58 PDT
Created attachment 93503 [details]
Patch
Comment 2 WebKit Review Bot 2011-05-13 13:49:07 PDT
Attachment 93503 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebKit/chromium/ChangeLog', u'Sourc..." exit_code: 1

Source/WebKit/chromium/src/WebURLResponse.cpp:376:  Use 0 instead of NULL.  [readability/null] [5]
Total errors found: 1 in 2 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Brett Wilson (Google) 2011-05-13 16:13:55 PDT
Created attachment 93527 [details]
Patch (style fixed)
Comment 4 Michael Nordman 2011-05-13 18:17:03 PDT
lgtm... thnx!
Comment 5 Michael Nordman 2011-05-16 19:46:33 PDT
i'm surprised the bug tracker let me flip that bit
Comment 6 Adam Barth 2011-05-18 13:08:58 PDT
Comment on attachment 93527 [details]
Patch (style fixed)

It's too bad we can't test changes like this.  They're easy to regress.
Comment 7 WebKit Commit Bot 2011-05-18 15:17:24 PDT
Comment on attachment 93527 [details]
Patch (style fixed)

Clearing flags on attachment: 93527

Committed r86799: <http://trac.webkit.org/changeset/86799>
Comment 8 WebKit Commit Bot 2011-05-18 15:17:29 PDT
All reviewed patches have been landed.  Closing bug.
Comment 9 Michael Nordman 2011-05-18 17:32:40 PDT
Seems like there could be a unit test for this setter...
WebKit\Source\WebKit\chromium\tests