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?