[webkit-reviews] review granted: [Bug 65694] Make it possible to explicitly prevent a preflight via ThreadableLoaderOptions : [Attachment 102966] updated patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Aug 4 14:47:01 PDT 2011
Alexey Proskuryakov <ap at webkit.org> has granted Per-Erik Brodin
<per-erik.brodin at ericsson.com>'s request for review:
Bug 65694: Make it possible to explicitly prevent a preflight via
ThreadableLoaderOptions
https://bugs.webkit.org/show_bug.cgi?id=65694
Attachment 102966: updated patch
https://bugs.webkit.org/attachment.cgi?id=102966&action=review
------- Additional Comments from Alexey Proskuryakov <ap at webkit.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=102966&action=review
r=me assuming build fix and a better name for enum value.
> Source/WebCore/loader/DocumentThreadableLoader.cpp:101
> + if ((m_options.preflightPolicy == ConditionPreflight &&
isSimpleCrossOriginAccessRequest(crossOriginRequest->httpMethod(),
crossOriginRequest->httpHeaderFields())) || m_options.preflightPolicy ==
PreventPreflight)
I'd order this differently to avoid calling into
isSimpleCrossOriginAccessRequest() when PreventPreflight is specified.
> Source/WebCore/loader/DocumentThreadableLoader.cpp:115
> + ASSERT(m_options.preflightPolicy == PreventPreflight ||
isSimpleCrossOriginAccessRequest(request.httpMethod(),
request.httpHeaderFields()));
Please add ASSERT(m_options.preflightPolicy != ForcePreflight) for
completeness.
> Source/WebCore/loader/ThreadableLoader.h:60
> + ConditionPreflight,
Condition as a verb has a different meaning than you want here. Maybe
"MayUsePreflight" or "AllowPreflight"?
More information about the webkit-reviews
mailing list