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
8482abe2
Commit
8482abe2
authored
Sep 10, 2008
by
Jacek Caban
Committed by
Alexandre Julliard
Sep 10, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Added String constructor object.
parent
dd01f8b8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
14 additions
and
4 deletions
+14
-4
Makefile.in
dlls/jscript/Makefile.in
+2
-1
global.c
dlls/jscript/global.c
+7
-2
jscript.h
dlls/jscript/jscript.h
+4
-1
string.c
dlls/jscript/string.c
+0
-0
lang.js
dlls/jscript/tests/lang.js
+1
-0
No files found.
dlls/jscript/Makefile.in
View file @
8482abe2
...
...
@@ -16,7 +16,8 @@ C_SRCS = \
jscript_main.c
\
jsutils.c
\
lex.c
\
object.c
object.c
\
string.c
IDL_TLB_SRCS
=
jsglobal.idl
...
...
dlls/jscript/global.c
View file @
8482abe2
...
...
@@ -125,8 +125,9 @@ static HRESULT JSGlobal_Object(DispatchEx *dispex, LCID lcid, WORD flags, DISPPA
static
HRESULT
JSGlobal_String
(
DispatchEx
*
dispex
,
LCID
lcid
,
WORD
flags
,
DISPPARAMS
*
dp
,
VARIANT
*
retv
,
jsexcept_t
*
ei
,
IServiceProvider
*
sp
)
{
FIXME
(
"
\n
"
);
return
E_NOTIMPL
;
TRACE
(
"
\n
"
);
return
constructor_call
(
dispex
->
ctx
->
string_constr
,
lcid
,
flags
,
dp
,
retv
,
ei
,
sp
);
}
static
HRESULT
JSGlobal_RegExp
(
DispatchEx
*
dispex
,
LCID
lcid
,
WORD
flags
,
DISPPARAMS
*
dp
,
...
...
@@ -301,6 +302,10 @@ static HRESULT init_constructors(script_ctx_t *ctx)
if
(
FAILED
(
hres
))
return
hres
;
hres
=
create_string_constr
(
ctx
,
&
ctx
->
string_constr
);
if
(
FAILED
(
hres
))
return
hres
;
return
S_OK
;
}
...
...
dlls/jscript/jscript.h
View file @
8482abe2
...
...
@@ -51,7 +51,8 @@ typedef enum {
JSCLASS_NONE
,
JSCLASS_FUNCTION
,
JSCLASS_GLOBAL
,
JSCLASS_OBJECT
JSCLASS_OBJECT
,
JSCLASS_STRING
}
jsclass_t
;
typedef
HRESULT
(
*
builtin_invoke_t
)(
DispatchEx
*
,
LCID
,
WORD
,
DISPPARAMS
*
,
VARIANT
*
,
jsexcept_t
*
,
IServiceProvider
*
);
...
...
@@ -128,6 +129,7 @@ struct _script_ctx_t {
DispatchEx
*
script_disp
;
DispatchEx
*
global
;
DispatchEx
*
object_constr
;
DispatchEx
*
string_constr
;
};
void
script_release
(
script_ctx_t
*
);
...
...
@@ -140,6 +142,7 @@ static inline void script_addref(script_ctx_t *ctx)
HRESULT
init_global
(
script_ctx_t
*
);
HRESULT
create_object_constr
(
script_ctx_t
*
,
DispatchEx
**
);
HRESULT
create_string_constr
(
script_ctx_t
*
,
DispatchEx
**
);
const
char
*
debugstr_variant
(
const
VARIANT
*
);
...
...
dlls/jscript/string.c
0 → 100644
View file @
8482abe2
This diff is collapsed.
Click to expand it.
dlls/jscript/tests/lang.js
View file @
8482abe2
...
...
@@ -48,5 +48,6 @@ ok(testFunc1.length === 2, "testFunc1.length is not 2");
ok
(
Object
.
prototype
!==
undefined
,
"Object.prototype is undefined"
);
ok
(
Object
.
prototype
.
prototype
===
undefined
,
"Object.prototype is not undefined"
);
ok
(
String
.
prototype
!==
undefined
,
"String.prototype is undefined"
);
reportSuccess
();
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