[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:46:18 PDT 2010
https://bugs.webkit.org/show_bug.cgi?id=44891
--- Comment #12 from Adam Barth <abarth at webkit.org> 2010-09-01 00:46:18 PST ---
(In reply to comment #11)
> 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>?
Can't we just make completeURL a free function like it currently is? It can be templated on T without having a class to back it up.
> > > 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);
I think we should go back to what you had before and just pass the literal values and remember that we should do this global cleanup another day.
--
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