jscript: Added QueryService(SID_VariantConversion) implementation.
This commit is contained in:
parent
bac7c1ef36
commit
c6360c3e6e
@ -72,6 +72,7 @@ void script_release(script_ctx_t *ctx)
|
|||||||
jsheap_free(&ctx->tmp_heap);
|
jsheap_free(&ctx->tmp_heap);
|
||||||
SysFreeString(ctx->last_match);
|
SysFreeString(ctx->last_match);
|
||||||
|
|
||||||
|
ctx->jscaller->ctx = NULL;
|
||||||
IServiceProvider_Release(&ctx->jscaller->IServiceProvider_iface);
|
IServiceProvider_Release(&ctx->jscaller->IServiceProvider_iface);
|
||||||
|
|
||||||
heap_free(ctx);
|
heap_free(ctx);
|
||||||
@ -411,8 +412,10 @@ static ULONG WINAPI JScript_Release(IActiveScript *iface)
|
|||||||
if(!ref) {
|
if(!ref) {
|
||||||
if(This->ctx && This->ctx->state != SCRIPTSTATE_CLOSED)
|
if(This->ctx && This->ctx->state != SCRIPTSTATE_CLOSED)
|
||||||
IActiveScript_Close(&This->IActiveScript_iface);
|
IActiveScript_Close(&This->IActiveScript_iface);
|
||||||
if(This->ctx)
|
if(This->ctx) {
|
||||||
|
This->ctx->active_script = NULL;
|
||||||
script_release(This->ctx);
|
script_release(This->ctx);
|
||||||
|
}
|
||||||
heap_free(This);
|
heap_free(This);
|
||||||
unlock_module();
|
unlock_module();
|
||||||
}
|
}
|
||||||
@ -709,6 +712,7 @@ static HRESULT WINAPI JScriptParse_InitNew(IActiveScriptParse *iface)
|
|||||||
|
|
||||||
ctx->ref = 1;
|
ctx->ref = 1;
|
||||||
ctx->state = SCRIPTSTATE_UNINITIALIZED;
|
ctx->state = SCRIPTSTATE_UNINITIALIZED;
|
||||||
|
ctx->active_script = &This->IActiveScript_iface;
|
||||||
ctx->safeopt = This->safeopt;
|
ctx->safeopt = This->safeopt;
|
||||||
ctx->version = This->version;
|
ctx->version = This->version;
|
||||||
jsheap_init(&ctx->tmp_heap);
|
jsheap_init(&ctx->tmp_heap);
|
||||||
|
@ -293,6 +293,7 @@ struct _script_ctx_t {
|
|||||||
LONG ref;
|
LONG ref;
|
||||||
|
|
||||||
SCRIPTSTATE state;
|
SCRIPTSTATE state;
|
||||||
|
IActiveScript *active_script;
|
||||||
|
|
||||||
exec_ctx_t *exec_ctx;
|
exec_ctx_t *exec_ctx;
|
||||||
named_item_t *named_items;
|
named_item_t *named_items;
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
#include "wine/port.h"
|
#include "wine/port.h"
|
||||||
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
#include <assert.h>
|
||||||
|
|
||||||
#include "jscript.h"
|
#include "jscript.h"
|
||||||
#include "engine.h"
|
#include "engine.h"
|
||||||
@ -769,8 +770,10 @@ static ULONG WINAPI JSCaller_Release(IServiceProvider *iface)
|
|||||||
|
|
||||||
TRACE("(%p) ref=%d\n", This, ref);
|
TRACE("(%p) ref=%d\n", This, ref);
|
||||||
|
|
||||||
if(!ref)
|
if(!ref) {
|
||||||
|
assert(!This->ctx);
|
||||||
heap_free(This);
|
heap_free(This);
|
||||||
|
}
|
||||||
|
|
||||||
return ref;
|
return ref;
|
||||||
}
|
}
|
||||||
@ -780,6 +783,11 @@ static HRESULT WINAPI JSCaller_QueryService(IServiceProvider *iface, REFGUID gui
|
|||||||
{
|
{
|
||||||
JSCaller *This = impl_from_IServiceProvider(iface);
|
JSCaller *This = impl_from_IServiceProvider(iface);
|
||||||
|
|
||||||
|
if(IsEqualGUID(guidService, &SID_VariantConversion) && This->ctx && This->ctx->active_script) {
|
||||||
|
TRACE("(%p)->(SID_VariantConversion)\n", This);
|
||||||
|
return IActiveScript_QueryInterface(This->ctx->active_script, riid, ppv);
|
||||||
|
}
|
||||||
|
|
||||||
FIXME("(%p)->(%s %s %p)\n", This, debugstr_guid(guidService), debugstr_guid(riid), ppv);
|
FIXME("(%p)->(%s %s %p)\n", This, debugstr_guid(guidService), debugstr_guid(riid), ppv);
|
||||||
|
|
||||||
*ppv = NULL;
|
*ppv = NULL;
|
||||||
@ -803,6 +811,7 @@ HRESULT create_jscaller(script_ctx_t *ctx)
|
|||||||
|
|
||||||
ret->IServiceProvider_iface.lpVtbl = &ServiceProviderVtbl;
|
ret->IServiceProvider_iface.lpVtbl = &ServiceProviderVtbl;
|
||||||
ret->ref = 1;
|
ret->ref = 1;
|
||||||
|
ret->ctx = ctx;
|
||||||
|
|
||||||
ctx->jscaller = ret;
|
ctx->jscaller = ret;
|
||||||
return S_OK;
|
return S_OK;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user