On Wed Jun 5 23:33:45 2024 +0000, Jacek Caban wrote:
> Setting the timeout on the socket is quite expensive (requires a
> wineserver call). Maybe we could store the last set timeout separate
> from configure timeout and update socket timeout only when they don't match?
Would this proposal be only for `read_more_data` or in the broader scope of any call to `NETCON_set_timeout`?
If it is for the latter, it could be tracked in `netconn_t`. I can add that into a separate merge.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/3518#note_72609
On Wed Jun 5 23:33:45 2024 +0000, Jacek Caban wrote:
> Do we still need it? I think that with implementation in both
> `set_global_option` and `INET_SetOption`, we could simply remove those
> cases from `InternetSetOptionW` fallback.
If we can assume that `vtbl->SetOption` is guaranteed to handle its own implementation of each timeout (or fallback to `INET_SetOption`), I could see dropping these cases from `InternetSetOptionW`.
I'll amend those changes.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/3518#note_72608
> Well, I expect them to behave like JS functions. If it were a JS function, it would check to see if the object type matches, and then do its thing. If you think of it like this, it wouldn't make much sense for it to use another object type's function.
I'm not talking about another objects' functions, I'm talking about separate objects having the same prototypes in JS sense but being otherwise separate implementations of the same interfaces in C.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5444#note_72607
On Thu Jun 6 19:05:56 2024 +0000, Jacek Caban wrote:
> > In such case, instead of failing, it would call the other function
> that was looked up, since it matches in IID and DISPID. It won't crash,
> but I don't think it would be quite correct, either.
> That's the whole point, the reason it's safe and I don't see why you
> think it's incorrect. BTW, IID is intentionally abstract in my proposal;
> a bit closer to the actual meaning would be to use something like
> prototype ID once we have those (interface ID is just already available
> and close enough).
> > Continuing the above, IMO the following would make it the most robust:
> we look it up as mentioned from the func_info_t's dispid and IID, and
> then compare to see if it's the same `func_info_t` pointer.
> Sure, but it can't compare `func_info_t`s by a pointer, it would need to
> compare IID or something like that anyway. So in your proposal, the
> opaque pointer serves as (ID,IID) carrier, nothing else.
> > BTW, is there a reason you renamed `IWineJSDispatchHost` to just
> `IJSDispatchHost` when it's Wine's own interface? I thought it's better
> to avoid ambiguity with a native interface, especially if we're to
> extend it (obviously we can't touch native interfaces), makes it a lot
> more obvious.
> It's all Wine code, I don't see how putting "wine" in random places
> makes it any cleaner, but it's not a strong preference and I won't
> insist either way.
Well, I expect them to behave like JS functions. If it were a JS
function, it would check to see if the object type matches, and then do
its thing. If you think of it like this, it wouldn't make much sense for
it to use another object type's function.
As for Wine prefix, we typically have that already for our own custom
interfaces in mshtml, and even though it's all Wine code, it makes it
clearer for someone unfamiliar to understand that the interface is not
something from Windows—so they can find its documentation/code in Wine
code with grep instead of a Google search, and can freely change them
around, etc.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5444#note_72606
> In such case, instead of failing, it would call the other function that was looked up, since it matches in IID and DISPID. It won't crash, but I don't think it would be quite correct, either.
That's the whole point, the reason it's safe and I don't see why you think it's incorrect. BTW, IID is intentionally abstract in my proposal; a bit closer to the actual meaning would be to use something like prototype ID once we have those (interface ID is just already available and close enough).
> Continuing the above, IMO the following would make it the most robust: we look it up as mentioned from the func_info_t's dispid and IID, and then compare to see if it's the same `func_info_t` pointer.
Sure, but it can't compare `func_info_t`s by a pointer, it would need to compare IID or something like that anyway. So in your proposal, the opaque pointer serves as (ID,IID) carrier, nothing else.
> BTW, is there a reason you renamed `IWineJSDispatchHost` to just `IJSDispatchHost` when it's Wine's own interface? I thought it's better to avoid ambiguity with a native interface, especially if we're to extend it (obviously we can't touch native interfaces), makes it a lot more obvious.
It's all Wine code, I don't see how putting "wine" in random places makes it any cleaner, but it's not a strong preference and I won't insist either way.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5444#note_72605