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
f8afae75
Commit
f8afae75
authored
Dec 27, 2010
by
Jacek Caban
Committed by
Alexandre Julliard
Dec 27, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Added ScriptEngine*Version functions implementation.
parent
36fe9472
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
6 deletions
+28
-6
global.c
dlls/jscript/global.c
+21
-6
resource.h
dlls/jscript/resource.h
+4
-0
api.js
dlls/jscript/tests/api.js
+3
-0
No files found.
dlls/jscript/global.c
View file @
f8afae75
...
...
@@ -727,22 +727,37 @@ static HRESULT JSGlobal_ScriptEngine(script_ctx_t *ctx, vdisp_t *jsthis, WORD fl
static
HRESULT
JSGlobal_ScriptEngineMajorVersion
(
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
"
);
if
(
retv
)
{
V_VT
(
retv
)
=
VT_I4
;
V_I4
(
retv
)
=
JSCRIPT_MAJOR_VERSION
;
}
return
S_OK
;
}
static
HRESULT
JSGlobal_ScriptEngineMinorVersion
(
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
"
);
if
(
retv
)
{
V_VT
(
retv
)
=
VT_I4
;
V_I4
(
retv
)
=
JSCRIPT_MINOR_VERSION
;
}
return
S_OK
;
}
static
HRESULT
JSGlobal_ScriptEngineBuildVersion
(
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
"
);
if
(
retv
)
{
V_VT
(
retv
)
=
VT_I4
;
V_I4
(
retv
)
=
JSCRIPT_BUILD_VERSION
;
}
return
S_OK
;
}
static
HRESULT
JSGlobal_CollectGarbage
(
script_ctx_t
*
ctx
,
vdisp_t
*
jsthis
,
WORD
flags
,
DISPPARAMS
*
dp
,
...
...
dlls/jscript/resource.h
View file @
f8afae75
...
...
@@ -18,6 +18,10 @@
#include <windef.h>
#define JSCRIPT_MAJOR_VERSION 5
#define JSCRIPT_MINOR_VERSION 8
#define JSCRIPT_BUILD_VERSION 16475
#define IDS_TO_PRIMITIVE 0x0001
#define IDS_INVALID_CALL_ARG 0x0005
#define IDS_SUBSCRIPT_OUT_OF_RANGE 0x0009
...
...
dlls/jscript/tests/api.js
View file @
f8afae75
...
...
@@ -20,6 +20,9 @@ var tmp, i;
ok
(
ScriptEngine
()
===
"JScript"
,
"ScriptEngine() = "
+
ScriptEngine
());
ok
(
ScriptEngine
(
3
)
===
"JScript"
,
"ScriptEngine(3) = "
+
ScriptEngine
(
3
));
ok
(
ScriptEngineMajorVersion
()
===
ScriptEngineMajorVersion
(
2
),
"ScriptEngineMajorVersion() !== ScriptEngineMajorVersion(2)"
);
ok
(
ScriptEngineMinorVersion
()
===
ScriptEngineMinorVersion
(
2
),
"ScriptEngineMinorVersion() !== ScriptEngineMinorVersion(2)"
);
ok
(
ScriptEngineBuildVersion
()
===
ScriptEngineBuildVersion
(
2
),
"ScriptEngineBuildVersion() !== ScriptEngineBuildVersion(2)"
);
i
=
parseInt
(
"0"
);
ok
(
i
===
0
,
"parseInt('0') = "
+
i
);
...
...
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