Bug 57815 - Remove duplicate API from WKContext
Summary: Remove duplicate API from WKContext
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Other OS X 10.5
: P2 Normal
Assignee: Sam Weinig
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-04 22:20 PDT by Sam Weinig
Modified: 2011-04-06 05:07 PDT (History)
3 users (show)

See Also:


Attachments
Patch (31.20 KB, patch)
2011-04-04 22:29 PDT, Sam Weinig
bweinstein: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sam Weinig 2011-04-04 22:20:19 PDT
Remove duplicate API from WKContext
Comment 1 Sam Weinig 2011-04-04 22:29:44 PDT
Created attachment 88185 [details]
Patch
Comment 2 WebKit Review Bot 2011-04-04 22:33:07 PDT
Attachment 88185 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style']" exit_code: 1

Source/WebKit2/WebProcess/WebProcess.h:122:  The parameter name "cachesToClear" adds no information, so it should be removed.  [readability/parameter_name] [5]
Total errors found: 1 in 13 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Brian Weinstein 2011-04-04 22:37:05 PDT
Comment on attachment 88185 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=88185&action=review

> Source/WebKit2/WebProcess/WebProcess.messages.in:59
> +    DownloadRequest(uint64_t downloadID, uint64_t initiatingPageID, WebCore::ResourceRequest request)

Does removing the void change the code in any way? I see a couple voids above this (Start and StopMemorySampler), should those be changed too?
Comment 4 Sam Weinig 2011-04-04 22:37:39 PDT
(In reply to comment #3)
> (From update of attachment 88185 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=88185&action=review
> 
> > Source/WebKit2/WebProcess/WebProcess.messages.in:59
> > +    DownloadRequest(uint64_t downloadID, uint64_t initiatingPageID, WebCore::ResourceRequest request)
> 
> Does removing the void change the code in any way? I see a couple voids above this (Start and StopMemorySampler), should those be changed too?

No, it was just wrong.  The void has no meaning in that syntax.
Comment 5 Sam Weinig 2011-04-04 22:38:55 PDT
Landed in r82906.
Comment 6 Csaba Osztrogonác 2011-04-05 00:26:36 PDT
(In reply to comment #5)
> Landed in r82906.

And a buildfix landed in http://trac.webkit.org/changeset/82907

:(
Comment 7 Darin Adler 2011-04-05 09:37:37 PDT
This wont work when people use newer compilers, because on some of them, UNUSED_PARAM actually warns if the variable is used.

So the UNUSED_PARAM needs to be inside the conditional, not unconditional. I also suggest using UNUSED_PARAM on cachesToClear, not on the local variable, and putting the local variable inside the conditional too.
Comment 8 Csaba Osztrogonác 2011-04-06 05:07:41 PDT
(In reply to comment #7)
> This wont work when people use newer compilers, because on some of them, UNUSED_PARAM actually warns if the variable is used.
> 
> So the UNUSED_PARAM needs to be inside the conditional, not unconditional. I also suggest using UNUSED_PARAM on cachesToClear, not on the local variable, and putting the local variable inside the conditional too.

Thanks for the advice, I didn't know if it can cause problem 
with newer compilers.

I filed a new bug and uploaded a patch based on your suggestion: https://bugs.webkit.org/show_bug.cgi?id=57940