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
77e27441
Commit
77e27441
authored
Dec 20, 2017
by
Jacek Caban
Committed by
Alexandre Julliard
Dec 20, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Use WARN for exception traces instead of separated debug channel.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
079d63e6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
18 deletions
+13
-18
engine.c
dlls/jscript/engine.c
+13
-18
No files found.
dlls/jscript/engine.c
View file @
77e27441
...
...
@@ -28,7 +28,6 @@
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
jscript
);
WINE_DECLARE_DEBUG_CHANNEL
(
jscript_except
);
static
const
WCHAR
booleanW
[]
=
{
'b'
,
'o'
,
'o'
,
'l'
,
'e'
,
'a'
,
'n'
,
0
};
static
const
WCHAR
functionW
[]
=
{
'f'
,
'u'
,
'n'
,
'c'
,
't'
,
'i'
,
'o'
,
'n'
,
0
};
...
...
@@ -2666,29 +2665,27 @@ static void print_backtrace(script_ctx_t *ctx)
call_frame_t
*
frame
;
for
(
frame
=
ctx
->
call_ctx
;
frame
;
frame
=
frame
->
prev_frame
)
{
TRACE_
(
jscript_except
)
(
"%u
\t
"
,
depth
);
WARN
(
"%u
\t
"
,
depth
);
depth
++
;
if
(
frame
->
this_obj
&&
frame
->
this_obj
!=
to_disp
(
ctx
->
global
)
&&
frame
->
this_obj
!=
ctx
->
host_global
)
TRACE_
(
jscript_except
)
(
"%p->"
,
frame
->
this_obj
);
TRACE_
(
jscript_except
)
(
"%s("
,
frame
->
function
->
name
?
debugstr_w
(
frame
->
function
->
name
)
:
"[unnamed]"
);
WARN
(
"%p->"
,
frame
->
this_obj
);
WARN
(
"%s("
,
frame
->
function
->
name
?
debugstr_w
(
frame
->
function
->
name
)
:
"[unnamed]"
);
if
(
frame
->
base_scope
&&
frame
->
base_scope
->
frame
)
{
for
(
i
=
0
;
i
<
frame
->
argc
;
i
++
)
{
if
(
i
<
frame
->
function
->
param_cnt
)
TRACE_
(
jscript_except
)(
"%s%s=%s"
,
i
?
", "
:
""
,
debugstr_w
(
frame
->
function
->
params
[
i
]),
debugstr_jsval
(
ctx
->
stack
[
local_off
(
frame
,
-
i
-
1
)]));
WARN
(
"%s%s=%s"
,
i
?
", "
:
""
,
debugstr_w
(
frame
->
function
->
params
[
i
]),
debugstr_jsval
(
ctx
->
stack
[
local_off
(
frame
,
-
i
-
1
)]));
else
TRACE_
(
jscript_except
)(
"%s%s"
,
i
?
", "
:
""
,
debugstr_jsval
(
ctx
->
stack
[
local_off
(
frame
,
-
i
-
1
)]));
WARN
(
"%s%s"
,
i
?
", "
:
""
,
debugstr_jsval
(
ctx
->
stack
[
local_off
(
frame
,
-
i
-
1
)]));
}
}
else
{
TRACE_
(
jscript_except
)
(
"[detached frame]"
);
WARN
(
"[detached frame]"
);
}
TRACE_
(
jscript_except
)
(
")
\n
"
);
WARN
(
")
\n
"
);
if
(
!
(
frame
->
flags
&
EXEC_RETURN_TO_INTERP
))
{
TRACE_
(
jscript_except
)
(
"%u
\t
[native code]
\n
"
,
depth
);
WARN
(
"%u
\t
[native code]
\n
"
,
depth
);
depth
++
;
}
}
...
...
@@ -2702,26 +2699,24 @@ static HRESULT unwind_exception(script_ctx_t *ctx, HRESULT exception_hres)
unsigned
catch_off
;
HRESULT
hres
;
TRACE
(
"%08x
\n
"
,
exception_hres
);
if
(
TRACE_ON
(
jscript_except
))
{
if
(
WARN_ON
(
jscript
))
{
jsdisp_t
*
error_obj
;
jsval_t
msg
;
static
const
WCHAR
messageW
[]
=
{
'm'
,
'e'
,
's'
,
's'
,
'a'
,
'g'
,
'e'
,
0
};
TRACE_
(
jscript_except
)
(
"Exception %08x %s"
,
exception_hres
,
debugstr_jsval
(
ctx
->
ei
.
val
));
WARN
(
"Exception %08x %s"
,
exception_hres
,
debugstr_jsval
(
ctx
->
ei
.
val
));
if
(
jsval_type
(
ctx
->
ei
.
val
)
==
JSV_OBJECT
)
{
error_obj
=
to_jsdisp
(
get_object
(
ctx
->
ei
.
val
));
if
(
error_obj
)
{
hres
=
jsdisp_propget_name
(
error_obj
,
messageW
,
&
msg
);
if
(
SUCCEEDED
(
hres
))
{
TRACE_
(
jscript_except
)
(
" (message %s)"
,
debugstr_jsval
(
msg
));
WARN
(
" (message %s)"
,
debugstr_jsval
(
msg
));
jsval_release
(
msg
);
}
}
}
TRACE_
(
jscript_except
)
(
" in:
\n
"
);
WARN
(
" in:
\n
"
);
print_backtrace
(
ctx
);
}
...
...
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