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:
parent
8f329a9b3c
commit
30a60caa12
@ -317,7 +317,6 @@ window_open(JSContext *ctx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
|
|||||||
int i;
|
int i;
|
||||||
#define NUMBER_OF_URLS_TO_REMEMBER 8
|
#define NUMBER_OF_URLS_TO_REMEMBER 8
|
||||||
static struct {
|
static struct {
|
||||||
JSContext *ctx;
|
|
||||||
JSString *url;
|
JSString *url;
|
||||||
JSString *frame;
|
JSString *frame;
|
||||||
} strings[NUMBER_OF_URLS_TO_REMEMBER];
|
} 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]);
|
target = jsval_to_string(ctx, &argv[1]);
|
||||||
for (i = 0; i < NUMBER_OF_URLS_TO_REMEMBER; i++) {
|
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;
|
continue;
|
||||||
if (ctx == strings[i].ctx
|
if (!JS_CompareStrings(url_string, strings[i].url)
|
||||||
&& !JS_CompareStrings(url_string, strings[i].url)
|
|
||||||
&& !JS_CompareStrings(target_string, strings[i].frame))
|
&& !JS_CompareStrings(target_string, strings[i].frame))
|
||||||
return JS_TRUE;
|
return JS_TRUE;
|
||||||
}
|
}
|
||||||
strings[indeks].ctx = ctx;
|
|
||||||
strings[indeks].url = JS_InternString(ctx, url);
|
strings[indeks].url = JS_InternString(ctx, url);
|
||||||
strings[indeks].frame = JS_InternString(ctx, target);
|
strings[indeks].frame = JS_InternString(ctx, target);
|
||||||
indeks++;
|
indeks++;
|
||||||
|
Loading…
Reference in New Issue
Block a user