Commit 6a03b38f authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

jscript: Use already running interpreter for eval() execution.

parent 889f2657
...@@ -377,7 +377,7 @@ static HRESULT invoke_prop_func(jsdisp_t *This, IDispatch *jsthis, dispex_prop_t ...@@ -377,7 +377,7 @@ static HRESULT invoke_prop_func(jsdisp_t *This, IDispatch *jsthis, dispex_prop_t
if(prop->name || This->builtin_info->class != JSCLASS_FUNCTION) { if(prop->name || This->builtin_info->class != JSCLASS_FUNCTION) {
vdisp_t vthis; vdisp_t vthis;
if(This->builtin_info->class != JSCLASS_FUNCTION) if(This->builtin_info->class != JSCLASS_FUNCTION && prop->u.p->invoke != JSGlobal_eval)
flags &= ~DISPATCH_JSCRIPT_INTERNAL_MASK; flags &= ~DISPATCH_JSCRIPT_INTERNAL_MASK;
if(jsthis) if(jsthis)
set_disp(&vthis, jsthis); set_disp(&vthis, jsthis);
......
...@@ -185,7 +185,7 @@ static HRESULT JSGlobal_escape(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, u ...@@ -185,7 +185,7 @@ static HRESULT JSGlobal_escape(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, u
} }
/* ECMA-262 3rd Edition 15.1.2.1 */ /* ECMA-262 3rd Edition 15.1.2.1 */
static HRESULT JSGlobal_eval(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, HRESULT JSGlobal_eval(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv,
jsval_t *r) jsval_t *r)
{ {
call_frame_t *frame; call_frame_t *frame;
...@@ -226,6 +226,8 @@ static HRESULT JSGlobal_eval(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, uns ...@@ -226,6 +226,8 @@ static HRESULT JSGlobal_eval(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, uns
if(frame->flags & EXEC_GLOBAL) if(frame->flags & EXEC_GLOBAL)
exec_flags |= EXEC_GLOBAL; exec_flags |= EXEC_GLOBAL;
if(flags & DISPATCH_JSCRIPT_CALLEREXECSSOURCE)
exec_flags |= EXEC_RETURN_TO_INTERP;
hres = exec_source(ctx, exec_flags, code, &code->global_code, frame->scope, hres = exec_source(ctx, exec_flags, code, &code->global_code, frame->scope,
frame->this_obj, NULL, frame->variable_obj, NULL, r); frame->this_obj, NULL, frame->variable_obj, NULL, r);
release_bytecode(code); release_bytecode(code);
......
...@@ -475,6 +475,8 @@ HRESULT regexp_string_match(script_ctx_t*,jsdisp_t*,jsstr_t*,jsval_t*) DECLSPEC_ ...@@ -475,6 +475,8 @@ HRESULT regexp_string_match(script_ctx_t*,jsdisp_t*,jsstr_t*,jsval_t*) DECLSPEC_
BOOL bool_obj_value(jsdisp_t*) DECLSPEC_HIDDEN; BOOL bool_obj_value(jsdisp_t*) DECLSPEC_HIDDEN;
unsigned array_get_length(jsdisp_t*) DECLSPEC_HIDDEN; unsigned array_get_length(jsdisp_t*) DECLSPEC_HIDDEN;
HRESULT JSGlobal_eval(script_ctx_t*,vdisp_t*,WORD,unsigned,jsval_t*,jsval_t*) DECLSPEC_HIDDEN;
static inline BOOL is_class(jsdisp_t *jsdisp, jsclass_t class) static inline BOOL is_class(jsdisp_t *jsdisp, jsclass_t class)
{ {
return jsdisp->builtin_info->class == class; return jsdisp->builtin_info->class == class;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment