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
ae8c45c6
Commit
ae8c45c6
authored
May 14, 2018
by
Jacek Caban
Committed by
Alexandre Julliard
May 14, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Use jsdisp_define_property for Error object properties.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
827f4590
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
+9
-4
error.c
dlls/jscript/error.c
+9
-4
No files found.
dlls/jscript/error.c
View file @
ae8c45c6
...
...
@@ -193,15 +193,19 @@ static HRESULT create_error(script_ctx_t *ctx, jsdisp_t *constr,
if
(
FAILED
(
hres
))
return
hres
;
hres
=
jsdisp_propput_dontenum
(
err
,
numberW
,
jsval_number
((
INT
)
number
));
hres
=
jsdisp_define_data_property
(
err
,
numberW
,
PROPF_WRITABLE
|
PROPF_CONFIGURABLE
,
jsval_number
((
INT
)
number
));
if
(
FAILED
(
hres
))
{
jsdisp_release
(
err
);
return
hres
;
}
hres
=
jsdisp_propput_name
(
err
,
messageW
,
jsval_string
(
msg
));
hres
=
jsdisp_define_data_property
(
err
,
messageW
,
PROPF_WRITABLE
|
PROPF_ENUMERABLE
|
PROPF_CONFIGURABLE
,
jsval_string
(
msg
));
if
(
SUCCEEDED
(
hres
))
hres
=
jsdisp_propput_dontenum
(
err
,
descriptionW
,
jsval_string
(
msg
));
hres
=
jsdisp_define_data_property
(
err
,
descriptionW
,
PROPF_WRITABLE
|
PROPF_CONFIGURABLE
,
jsval_string
(
msg
));
if
(
FAILED
(
hres
))
{
jsdisp_release
(
err
);
return
hres
;
...
...
@@ -355,7 +359,8 @@ HRESULT init_error_constr(script_ctx_t *ctx, jsdisp_t *object_prototype)
return
E_OUTOFMEMORY
;
}
hres
=
jsdisp_propput_dontenum
(
err
,
nameW
,
jsval_string
(
str
));
hres
=
jsdisp_define_data_property
(
err
,
nameW
,
PROPF_WRITABLE
|
PROPF_CONFIGURABLE
,
jsval_string
(
str
));
jsstr_release
(
str
);
if
(
SUCCEEDED
(
hres
))
hres
=
create_builtin_constructor
(
ctx
,
constr_val
[
i
],
names
[
i
],
NULL
,
...
...
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