Piotr Caban : jscript: Added Error_number and Error_description implementation.
Alexandre Julliard
julliard at winehq.org
Tue Jul 21 09:34:24 CDT 2009
Module: wine
Branch: master
Commit: f3eef0d4c8e1f019894cc77e0cd51d55753a87d8
URL: http://source.winehq.org/git/wine.git/?a=commit;h=f3eef0d4c8e1f019894cc77e0cd51d55753a87d8
Author: Piotr Caban <piotr.caban at gmail.com>
Date: Mon Jul 20 18:18:19 2009 +0200
jscript: Added Error_number and Error_description implementation.
---
dlls/jscript/error.c | 32 ++++++++++++++++++++++++++++----
1 files changed, 28 insertions(+), 4 deletions(-)
diff --git a/dlls/jscript/error.c b/dlls/jscript/error.c
index a9bcb55..076215f 100644
--- a/dlls/jscript/error.c
+++ b/dlls/jscript/error.c
@@ -42,15 +42,37 @@ static const WCHAR isPrototypeOfW[] = {'i','s','P','r','o','t','o','t','y','p','
static HRESULT Error_number(DispatchEx *dispex, LCID lcid, WORD flags,
DISPPARAMS *dp, VARIANT *retv, jsexcept_t *ei, IServiceProvider *sp)
{
- FIXME("\n");
- return E_NOTIMPL;
+ ErrorInstance *This = (ErrorInstance*)dispex;
+
+ TRACE("\n");
+
+ switch(flags) {
+ case DISPATCH_PROPERTYGET:
+ return VariantCopy(retv, &This->number);
+ case DISPATCH_PROPERTYPUT:
+ return VariantCopy(&This->number, get_arg(dp, 0));
+ default:
+ FIXME("unimplemented flags %x\n", flags);
+ return E_NOTIMPL;
+ }
}
static HRESULT Error_description(DispatchEx *dispex, LCID lcid, WORD flags,
DISPPARAMS *dp, VARIANT *retv, jsexcept_t *ei, IServiceProvider *sp)
{
- FIXME("\n");
- return E_NOTIMPL;
+ ErrorInstance *This = (ErrorInstance*)dispex;
+
+ TRACE("\n");
+
+ switch(flags) {
+ case DISPATCH_PROPERTYGET:
+ return VariantCopy(retv, &This->description);
+ case DISPATCH_PROPERTYPUT:
+ return VariantCopy(&This->description, get_arg(dp, 0));
+ default:
+ FIXME("unimplemented flags %x\n", flags);
+ return E_NOTIMPL;
+ }
}
/* ECMA-262 3rd Edition 15.11.4.3 */
@@ -123,6 +145,8 @@ static void Error_destructor(DispatchEx *dispex)
{
ErrorInstance *This = (ErrorInstance*)dispex;
+ VariantClear(&This->number);
+ VariantClear(&This->description);
VariantClear(&This->message);
heap_free(This);
}
More information about the wine-cvs
mailing list