Piotr Caban : jscript: Inherit some Function functions from Object.

Alexandre Julliard julliard at winehq.org
Fri Aug 14 09:00:30 CDT 2009


Module: wine
Branch: master
Commit: 8d6d266977c9a6a93532f560f94630f4a1d61528
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=8d6d266977c9a6a93532f560f94630f4a1d61528

Author: Piotr Caban <piotr.caban at gmail.com>
Date:   Fri Aug 14 11:58:31 2009 +0200

jscript: Inherit some Function functions from Object.

---

 dlls/jscript/function.c   |   36 ------------------------------------
 dlls/jscript/tests/api.js |    1 +
 2 files changed, 1 insertions(+), 36 deletions(-)

diff --git a/dlls/jscript/function.c b/dlls/jscript/function.c
index 6ac668c..661b93c 100644
--- a/dlls/jscript/function.c
+++ b/dlls/jscript/function.c
@@ -40,12 +40,8 @@ static const WCHAR prototypeW[] = {'p','r','o','t','o','t', 'y', 'p','e',0};
 
 static const WCHAR lengthW[] = {'l','e','n','g','t','h',0};
 static const WCHAR toStringW[] = {'t','o','S','t','r','i','n','g',0};
-static const WCHAR toLocaleStringW[] = {'t','o','L','o','c','a','l','e','S','t','r','i','n','g',0};
 static const WCHAR applyW[] = {'a','p','p','l','y',0};
 static const WCHAR callW[] = {'c','a','l','l',0};
-static const WCHAR hasOwnPropertyW[] = {'h','a','s','O','w','n','P','r','o','p','e','r','t','y',0};
-static const WCHAR propertyIsEnumerableW[] = {'p','r','o','p','e','r','t','y','I','s','E','n','u','m','e','r','a','b','l','e',0};
-static const WCHAR isPrototypeOfW[] = {'i','s','P','r','o','t','o','t','y','p','e','O','f',0};
 
 static IDispatch *get_this(DISPPARAMS *dp)
 {
@@ -290,13 +286,6 @@ static HRESULT Function_toString(DispatchEx *dispex, LCID lcid, WORD flags, DISP
     return S_OK;
 }
 
-static HRESULT Function_toLocaleString(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAMS *dp,
-        VARIANT *retv, jsexcept_t *ei, IServiceProvider *sp)
-{
-    FIXME("\n");
-    return E_NOTIMPL;
-}
-
 static HRESULT Function_apply(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAMS *dp,
         VARIANT *retv, jsexcept_t *ei, IServiceProvider *sp)
 {
@@ -311,27 +300,6 @@ static HRESULT Function_call(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARA
     return E_NOTIMPL;
 }
 
-static HRESULT Function_hasOwnProperty(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAMS *dp,
-        VARIANT *retv, jsexcept_t *ei, IServiceProvider *sp)
-{
-    FIXME("\n");
-    return E_NOTIMPL;
-}
-
-static HRESULT Function_propertyIsEnumerable(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAMS *dp,
-        VARIANT *retv, jsexcept_t *ei, IServiceProvider *sp)
-{
-    FIXME("\n");
-    return E_NOTIMPL;
-}
-
-static HRESULT Function_isPrototypeOf(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAMS *dp,
-        VARIANT *retv, jsexcept_t *ei, IServiceProvider *sp)
-{
-    FIXME("\n");
-    return E_NOTIMPL;
-}
-
 HRESULT Function_value(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAMS *dp,
         VARIANT *retv, jsexcept_t *ei, IServiceProvider *caller)
 {
@@ -394,11 +362,7 @@ static void Function_destructor(DispatchEx *dispex)
 static const builtin_prop_t Function_props[] = {
     {applyW,                 Function_apply,                 PROPF_METHOD},
     {callW,                  Function_call,                  PROPF_METHOD},
-    {hasOwnPropertyW,        Function_hasOwnProperty,        PROPF_METHOD},
-    {isPrototypeOfW,         Function_isPrototypeOf,         PROPF_METHOD},
     {lengthW,                Function_length,                0},
-    {propertyIsEnumerableW,  Function_propertyIsEnumerable,  PROPF_METHOD},
-    {toLocaleStringW,        Function_toLocaleString,        PROPF_METHOD},
     {toStringW,              Function_toString,              PROPF_METHOD}
 };
 
diff --git a/dlls/jscript/tests/api.js b/dlls/jscript/tests/api.js
index 4c1e24f..7273309 100644
--- a/dlls/jscript/tests/api.js
+++ b/dlls/jscript/tests/api.js
@@ -1393,5 +1393,6 @@ testObjectInherit(new Date(), false, false, false);
 testObjectInherit(new Boolean(true), false, true, false);
 testObjectInherit(new Array(), false, false, true);
 testObjectInherit(new Error(), false, true, true);
+testObjectInherit(testObjectInherit, false, true, true);
 
 reportSuccess();




More information about the wine-cvs mailing list