[Webkit-unassigned] [Bug 65694] Make it possible to explicitly prevent a preflight via ThreadableLoaderOptions

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Aug 4 14:47:02 PDT 2011


https://bugs.webkit.org/show_bug.cgi?id=65694


Alexey Proskuryakov <ap at webkit.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #102966|review?                     |review+
               Flag|                            |




--- Comment #13 from Alexey Proskuryakov <ap at webkit.org>  2011-08-04 14:47:02 PST ---
(From update of attachment 102966)
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"?

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list