Commit 9efb87ea authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

jscript: Added IActiveScript::Close implementation.

parent 268a92be
......@@ -120,10 +120,10 @@ static ULONG WINAPI JScript_Release(IActiveScript *iface)
TRACE("(%p) ref=%d\n", iface, ref);
if(!ref) {
if(This->ctx && This->ctx->state != SCRIPTSTATE_CLOSED)
IActiveScript_Close(ACTSCRIPT(This));
if(This->ctx)
script_release(This->ctx);
if(This->site)
IActiveScriptSite_Release(This->site);
heap_free(This);
unlock_module();
}
......@@ -191,8 +191,21 @@ static HRESULT WINAPI JScript_GetScriptState(IActiveScript *iface, SCRIPTSTATE *
static HRESULT WINAPI JScript_Close(IActiveScript *iface)
{
JScript *This = ACTSCRIPT_THIS(iface);
FIXME("(%p)->()\n", This);
return E_NOTIMPL;
TRACE("(%p)->()\n", This);
if(This->thread_id != GetCurrentThreadId())
return E_UNEXPECTED;
if(This->ctx)
change_state(This, SCRIPTSTATE_CLOSED);
if(This->site) {
IActiveScriptSite_Release(This->site);
This->site = NULL;
}
return S_OK;
}
static HRESULT WINAPI JScript_AddNamedItem(IActiveScript *iface,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment