Jacek Caban (@jacek) commented about dlls/mshtml/nsio.c:
channelbsc_set_channel(bscallback, This, listener, context); if(is_doc_channel) {
doc_object_service = window->base.outer_window->browser->doc->doc_object_service;
if (doc_object_service)
{
hres = fire_beforenavigate2(This, doc_object_service, window);
if (FAILED(hres))
return hres;
}
I think that with this patch we may fire the before-navigate event twice in cases when loading is initiated by us (like in `put_href` handler). In such case, we'd have `navigate_uri` call it too. It'd be tricky to somehow use common logic for those cases, but you could probably just check `This->uri->channel_bsc` for NULL to catch only Gecko-initiated binding here.