1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

SpiderMonkey: do not remember context. Maybe this time it won't hung.

This commit is contained in:
witekfl 2006-03-01 18:17:16 +01:00 committed by
parent 8f329a9b3c
commit 30a60caa12

View File

@ -317,7 +317,6 @@ window_open(JSContext *ctx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
int i;
#define NUMBER_OF_URLS_TO_REMEMBER 8
static struct {
JSContext *ctx;
JSString *url;
JSString *frame;
} strings[NUMBER_OF_URLS_TO_REMEMBER];
@ -325,14 +324,12 @@ window_open(JSContext *ctx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
target = jsval_to_string(ctx, &argv[1]);
for (i = 0; i < NUMBER_OF_URLS_TO_REMEMBER; i++) {
if (!(strings[i].ctx && strings[i].url && strings[i].frame))
if (!(strings[i].url && strings[i].frame))
continue;
if (ctx == strings[i].ctx
&& !JS_CompareStrings(url_string, strings[i].url)
if (!JS_CompareStrings(url_string, strings[i].url)
&& !JS_CompareStrings(target_string, strings[i].frame))
return JS_TRUE;
}
strings[indeks].ctx = ctx;
strings[indeks].url = JS_InternString(ctx, url);
strings[indeks].frame = JS_InternString(ctx, target);
indeks++;