0
0
mirror of https://github.com/rkd77/elinks.git synced 2025-06-30 22:19:29 -04:00

SEE: do not do check_class for alert, open and setTimeout.

Do not do check_class when functions called by the global object.
This commit is contained in:
Witold Filipczyk 2007-04-14 23:32:14 +02:00 committed by Witold Filipczyk
parent 182812352b
commit cd982d7d65

View File

@ -211,6 +211,7 @@ js_window_alert(struct SEE_interpreter *interp, struct SEE_object *self,
struct view_state *vs = win->vs;
unsigned char *string;
if (thisobj != interp->Global)
see_check_class(interp, thisobj, &js_window_object_class);
SEE_SET_BOOLEAN(res, 1);
@ -248,6 +249,7 @@ js_window_open(struct SEE_interpreter *interp, struct SEE_object *self,
static int ratelimit_count;
#endif
if (thisobj != interp->Global)
see_check_class(interp, thisobj, &js_window_object_class);
SEE_SET_OBJECT(res, (struct SEE_object *)win);
@ -341,6 +343,7 @@ js_setTimeout(struct SEE_interpreter *interp, struct SEE_object *self,
unsigned char *code;
int timeout;
if (thisobj != interp->Global)
see_check_class(interp, thisobj, &js_window_object_class);
if (argc != 2) return;