[Webkit-unassigned] [Bug 44891] [V8] Share bindings logic for location.replace between V8 and JSC

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Sep 1 00:40:39 PDT 2010


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





--- Comment #11 from Dominic Cooney <dominicc at google.com>  2010-09-01 00:40:39 PST ---
I would like to move BindingFrame::completeURL onto State, but that needs to call getFirstFrame in the specialization (State<JSBinding>, etc.) which is blocked by State<GenericBinding>. Should State<GenericBinding> use CRTP and shared functions downcast to the specialization? Or should I nix State<GenericBinding> and make completeURL templatized on State<T>?

> > WebCore/bindings/js/JSLocationCustom.cpp:192
> > +    JSBindingState state(exec);
> > +    JSBinding::Frame::navigateIfAllowed(&state, frame, url, lockHistory ? JSBinding::Frame::LockedHistory : JSBinding::Frame::UnlockedHistory, lockBackForwardList ? JSBinding::Frame::LockedBackForwardList : JSBinding::Frame::UnlockedBackForwardList);
> What do you think?  Is this better?

It is ugly. What would you prescribe? FIXME to move the enums into WebCore? Or explain at the call site with variables:

bool lockHistory = true;
bool lockBackForwardList = true;
JSBinding::Frame::NavigateIfAllowed(&state, frame, url, lockHistory, lockBackForwardList);

-- 
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