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
fa5d9b3d
Commit
fa5d9b3d
authored
Mar 25, 2016
by
Jacek Caban
Committed by
Alexandre Julliard
Mar 25, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Store exception frame in call_frame_t.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
53ecdb65
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
12 deletions
+12
-12
engine.c
dlls/jscript/engine.c
+10
-11
engine.h
dlls/jscript/engine.h
+2
-1
No files found.
dlls/jscript/engine.c
View file @
fa5d9b3d
...
...
@@ -764,6 +764,7 @@ static HRESULT interp_push_except(exec_ctx_t *ctx)
{
const
unsigned
arg1
=
get_op_uint
(
ctx
,
0
);
const
BSTR
arg2
=
get_op_bstr
(
ctx
,
1
);
call_frame_t
*
frame
=
ctx
->
script
->
call_ctx
;
except_frame_t
*
except
;
unsigned
stack_top
;
...
...
@@ -790,22 +791,23 @@ static HRESULT interp_push_except(exec_ctx_t *ctx)
except
->
scope
=
ctx
->
scope_chain
;
except
->
catch_off
=
arg1
;
except
->
ident
=
arg2
;
except
->
next
=
ctx
->
except_frame
;
ctx
->
except_frame
=
except
;
except
->
next
=
frame
->
except_frame
;
frame
->
except_frame
=
except
;
return
S_OK
;
}
/* ECMA-262 3rd Edition 12.14 */
static
HRESULT
interp_pop_except
(
exec_ctx_t
*
ctx
)
{
call_frame_t
*
frame
=
ctx
->
script
->
call_ctx
;
except_frame_t
*
except
;
TRACE
(
"
\n
"
);
except
=
ctx
->
except_frame
;
except
=
frame
->
except_frame
;
assert
(
except
!=
NULL
);
ctx
->
except_frame
=
except
->
next
;
frame
->
except_frame
=
except
->
next
;
heap_free
(
except
);
return
S_OK
;
}
...
...
@@ -2411,13 +2413,14 @@ static void release_call_frame(call_frame_t *frame)
static
HRESULT
unwind_exception
(
exec_ctx_t
*
ctx
)
{
call_frame_t
*
frame
=
ctx
->
script
->
call_ctx
;
except_frame_t
*
except_frame
;
jsval_t
except_val
;
BSTR
ident
;
HRESULT
hres
;
except_frame
=
ctx
->
except_frame
;
ctx
->
except_frame
=
except_frame
->
next
;
except_frame
=
frame
->
except_frame
;
frame
->
except_frame
=
except_frame
->
next
;
assert
(
except_frame
->
stack_top
<=
ctx
->
top
);
stack_popn
(
ctx
,
ctx
->
top
-
except_frame
->
stack_top
);
...
...
@@ -2463,7 +2466,6 @@ static HRESULT unwind_exception(exec_ctx_t *ctx)
static
HRESULT
enter_bytecode
(
script_ctx_t
*
ctx
,
function_code_t
*
func
,
jsval_t
*
ret
)
{
exec_ctx_t
*
exec_ctx
=
ctx
->
call_ctx
->
exec_ctx
;
except_frame_t
*
prev_except_frame
;
unsigned
prev_ip
,
prev_top
;
scope_chain_t
*
prev_scope
;
call_frame_t
*
frame
;
...
...
@@ -2475,10 +2477,8 @@ static HRESULT enter_bytecode(script_ctx_t *ctx, function_code_t *func, jsval_t
frame
=
ctx
->
call_ctx
;
prev_top
=
exec_ctx
->
top
;
prev_scope
=
exec_ctx
->
scope_chain
;
prev_except_frame
=
exec_ctx
->
except_frame
;
prev_ip
=
exec_ctx
->
ip
;
exec_ctx
->
ip
=
func
->
instr_off
;
exec_ctx
->
except_frame
=
NULL
;
while
(
exec_ctx
->
ip
!=
-
1
)
{
op
=
frame
->
bytecode
->
instrs
[
exec_ctx
->
ip
].
op
;
...
...
@@ -2486,7 +2486,7 @@ static HRESULT enter_bytecode(script_ctx_t *ctx, function_code_t *func, jsval_t
if
(
FAILED
(
hres
))
{
TRACE
(
"EXCEPTION %08x
\n
"
,
hres
);
if
(
!
exec_ctx
->
except_frame
)
if
(
!
frame
->
except_frame
)
break
;
hres
=
unwind_exception
(
exec_ctx
);
...
...
@@ -2498,7 +2498,6 @@ static HRESULT enter_bytecode(script_ctx_t *ctx, function_code_t *func, jsval_t
}
exec_ctx
->
ip
=
prev_ip
;
exec_ctx
->
except_frame
=
prev_except_frame
;
assert
(
ctx
->
call_ctx
==
frame
);
ctx
->
call_ctx
=
frame
->
prev_frame
;
...
...
dlls/jscript/engine.h
View file @
fa5d9b3d
...
...
@@ -191,6 +191,8 @@ typedef struct _except_frame_t except_frame_t;
struct
_parser_ctx_t
;
typedef
struct
_call_frame_t
{
except_frame_t
*
except_frame
;
bytecode_t
*
bytecode
;
function_code_t
*
function
;
...
...
@@ -210,7 +212,6 @@ struct _exec_ctx_t {
jsval_t
*
stack
;
unsigned
stack_size
;
unsigned
top
;
except_frame_t
*
except_frame
;
jsval_t
ret
;
unsigned
ip
;
...
...
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