[PATCH resend 1/2] msscript: Cache state of IActiveScript in ScriptHost struct.
Nikolay Sivov
nsivov at codeweavers.com
Mon Sep 16 08:24:04 CDT 2019
On 9/15/19 4:29 PM, Jactry Zeng wrote:
> @@ -987,9 +999,12 @@ static HRESULT WINAPI ScriptControl_Eval(IScriptControl *iface, BSTR expression,
> if (!This->host || This->state != Initialized)
> return E_FAIL;
>
> - hr = IActiveScript_SetScriptState(This->host->script, SCRIPTSTATE_STARTED);
> - if (FAILED(hr))
> - return hr;
> + if (This->host->script_state != SCRIPTSTATE_STARTED)
> + {
> + hr = set_script_state(This->host, SCRIPTSTATE_STARTED);
> + if (FAILED(hr))
> + return hr;
> + }
Is it possible to move this condition to your new helper, i.e. does it
call SetScriptState() with same state repeatedly only for some methods?
More information about the wine-devel
mailing list