Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
2ea23923
Commit
2ea23923
authored
Sep 29, 2009
by
Jacek Caban
Committed by
Alexandre Julliard
Sep 29, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Added ActiveXObject constructor stub implementation.
parent
2e92c726
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
64 additions
and
3 deletions
+64
-3
Makefile.in
dlls/jscript/Makefile.in
+1
-0
activex.c
dlls/jscript/activex.c
+50
-0
global.c
dlls/jscript/global.c
+8
-3
jscript.h
dlls/jscript/jscript.h
+2
-0
api.js
dlls/jscript/tests/api.js
+3
-0
No files found.
dlls/jscript/Makefile.in
View file @
2ea23923
...
...
@@ -16,6 +16,7 @@ RC_SRCS = \
rsrc.rc
C_SRCS
=
\
activex.c
\
array.c
\
bool.c
\
date.c
\
...
...
dlls/jscript/activex.c
0 → 100644
View file @
2ea23923
/*
* Copyright 2009 Jacek Caban for CodeWeavers
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include "wine/port.h"
#include "jscript.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
jscript
);
static
HRESULT
ActiveXObject_value
(
script_ctx_t
*
ctx
,
vdisp_t
*
jsthis
,
WORD
flags
,
DISPPARAMS
*
dp
,
VARIANT
*
retv
,
jsexcept_t
*
ei
,
IServiceProvider
*
caller
)
{
FIXME
(
"
\n
"
);
return
E_NOTIMPL
;
}
HRESULT
create_activex_constr
(
script_ctx_t
*
ctx
,
DispatchEx
**
ret
)
{
DispatchEx
*
prototype
;
HRESULT
hres
;
static
const
WCHAR
ActiveXObjectW
[]
=
{
'A'
,
'c'
,
't'
,
'i'
,
'v'
,
'e'
,
'X'
,
'O'
,
'b'
,
'j'
,
'e'
,
'c'
,
't'
,
0
};
hres
=
create_object
(
ctx
,
NULL
,
&
prototype
);
if
(
FAILED
(
hres
))
return
hres
;
hres
=
create_builtin_function
(
ctx
,
ActiveXObject_value
,
ActiveXObjectW
,
NULL
,
PROPF_CONSTR
,
prototype
,
ret
);
jsdisp_release
(
prototype
);
return
hres
;
}
dlls/jscript/global.c
View file @
2ea23923
...
...
@@ -274,8 +274,9 @@ static HRESULT JSGlobal_RegExp(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, D
static
HRESULT
JSGlobal_ActiveXObject
(
script_ctx_t
*
ctx
,
vdisp_t
*
jsthis
,
WORD
flags
,
DISPPARAMS
*
dp
,
VARIANT
*
retv
,
jsexcept_t
*
ei
,
IServiceProvider
*
sp
)
{
FIXME
(
"
\n
"
);
return
E_NOTIMPL
;
TRACE
(
"
\n
"
);
return
constructor_call
(
ctx
->
activex_constr
,
flags
,
dp
,
retv
,
ei
,
sp
);
}
static
HRESULT
JSGlobal_VBArray
(
script_ctx_t
*
ctx
,
vdisp_t
*
jsthis
,
WORD
flags
,
DISPPARAMS
*
dp
,
...
...
@@ -770,7 +771,7 @@ static HRESULT JSGlobal_encodeURI(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags
}
static
const
builtin_prop_t
JSGlobal_props
[]
=
{
{
ActiveXObjectW
,
JSGlobal_ActiveXObject
,
PROPF_
METHOD
},
{
ActiveXObjectW
,
JSGlobal_ActiveXObject
,
PROPF_
CONSTR
},
{
ArrayW
,
JSGlobal_Array
,
PROPF_CONSTR
},
{
BooleanW
,
JSGlobal_Boolean
,
PROPF_CONSTR
},
{
CollectGarbageW
,
JSGlobal_CollectGarbage
,
PROPF_METHOD
},
...
...
@@ -828,6 +829,10 @@ static HRESULT init_constructors(script_ctx_t *ctx, DispatchEx *object_prototype
if
(
FAILED
(
hres
))
return
hres
;
hres
=
create_activex_constr
(
ctx
,
&
ctx
->
activex_constr
);
if
(
FAILED
(
hres
))
return
hres
;
hres
=
create_array_constr
(
ctx
,
object_prototype
,
&
ctx
->
array_constr
);
if
(
FAILED
(
hres
))
return
hres
;
...
...
dlls/jscript/jscript.h
View file @
2ea23923
...
...
@@ -268,6 +268,7 @@ struct _script_ctx_t {
DispatchEx
*
global
;
DispatchEx
*
function_constr
;
DispatchEx
*
activex_constr
;
DispatchEx
*
array_constr
;
DispatchEx
*
bool_constr
;
DispatchEx
*
date_constr
;
...
...
@@ -296,6 +297,7 @@ HRESULT init_global(script_ctx_t*);
HRESULT
init_function_constr
(
script_ctx_t
*
,
DispatchEx
*
);
HRESULT
create_object_prototype
(
script_ctx_t
*
,
DispatchEx
**
);
HRESULT
create_activex_constr
(
script_ctx_t
*
,
DispatchEx
**
);
HRESULT
create_array_constr
(
script_ctx_t
*
,
DispatchEx
*
,
DispatchEx
**
);
HRESULT
create_bool_constr
(
script_ctx_t
*
,
DispatchEx
*
,
DispatchEx
**
);
HRESULT
create_date_constr
(
script_ctx_t
*
,
DispatchEx
*
,
DispatchEx
**
);
...
...
dlls/jscript/tests/api.js
View file @
2ea23923
...
...
@@ -1532,6 +1532,9 @@ ok(bool.toString() === "true", "bool.toString() = " + bool.toString());
ok
(
bool
.
valueOf
()
===
Boolean
(
1
),
"bool.valueOf() = "
+
bool
.
valueOf
());
ok
(
bool
.
toLocaleString
()
===
bool
.
toString
(),
"bool.toLocaleString() = "
+
bool
.
toLocaleString
());
ok
(
ActiveXObject
instanceof
Function
,
"ActiveXObject is not instance of Function"
);
ok
(
ActiveXObject
.
prototype
instanceof
Object
,
"ActiveXObject.prototype is not instance of Object"
);
ok
(
Error
.
prototype
!==
TypeError
.
prototype
,
"Error.prototype === TypeError.prototype"
);
ok
(
RangeError
.
prototype
!==
TypeError
.
prototype
,
"RangeError.prototype === TypeError.prototype"
);
ok
(
Error
.
prototype
.
toLocaleString
===
Object
.
prototype
.
toLocaleString
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment