From cd982d7d650f4310c2425e1710abfb3acbe224b8 Mon Sep 17 00:00:00 2001 From: Witold Filipczyk Date: Sat, 14 Apr 2007 23:32:14 +0200 Subject: [PATCH] SEE: do not do check_class for alert, open and setTimeout. Do not do check_class when functions called by the global object. --- src/ecmascript/see/window.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/ecmascript/see/window.c b/src/ecmascript/see/window.c index 36587d771..749a2ba95 100644 --- a/src/ecmascript/see/window.c +++ b/src/ecmascript/see/window.c @@ -211,7 +211,8 @@ js_window_alert(struct SEE_interpreter *interp, struct SEE_object *self, struct view_state *vs = win->vs; unsigned char *string; - see_check_class(interp, thisobj, &js_window_object_class); + if (thisobj != interp->Global) + see_check_class(interp, thisobj, &js_window_object_class); SEE_SET_BOOLEAN(res, 1); if (argc < 1) @@ -248,7 +249,8 @@ js_window_open(struct SEE_interpreter *interp, struct SEE_object *self, static int ratelimit_count; #endif - see_check_class(interp, thisobj, &js_window_object_class); + if (thisobj != interp->Global) + see_check_class(interp, thisobj, &js_window_object_class); SEE_SET_OBJECT(res, (struct SEE_object *)win); if (get_opt_bool("ecmascript.block_window_opening")) { @@ -341,7 +343,8 @@ js_setTimeout(struct SEE_interpreter *interp, struct SEE_object *self, unsigned char *code; int timeout; - see_check_class(interp, thisobj, &js_window_object_class); + if (thisobj != interp->Global) + see_check_class(interp, thisobj, &js_window_object_class); if (argc != 2) return; ei = ((struct global_object *)interp)->interpreter;