[webkit-reviews] review granted: [Bug 63301] Refactor ThreadableLoaderOptions and use it in ResourceLoader. : [Attachment 105202] 2 constructors, allowCredentials back to ThreadableLoaderOptions

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Aug 25 09:58:29 PDT 2011


David Levin <levin at chromium.org> has granted Nate Chapin
<japhet at chromium.org>'s request for review:
Bug 63301: Refactor ThreadableLoaderOptions and use it in ResourceLoader.
https://bugs.webkit.org/show_bug.cgi?id=63301

Attachment 105202: 2 constructors, allowCredentials back to
ThreadableLoaderOptions
https://bugs.webkit.org/attachment.cgi?id=105202&action=review

------- Additional Comments from David Levin <levin at chromium.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=105202&action=review


> Source/WebCore/loader/ResourceLoaderOptions.h:38
> +    ResourceLoaderOptions(bool sendLoadCallbacksArg, bool sniffContentArg,
bool shouldBufferDataArg) : sendLoadCallbacks(sendLoadCallbacksArg),
sniffContent(sniffContentArg), shouldBufferData(shouldBufferDataArg) { }

I loathe this -- 3 bool arguments in a row. It makes all call sites impossible
to read.

What does this do (without looking above):
  ResourceLoaderOptions(true, false, true);

Anyway this is basically what was there before so ok. If you add more bools in
here, you should consider making them enums. (Even in a future patch,
converting these to enums would be awesome.)


More information about the webkit-reviews mailing list