From 30a60caa12d6c1bf11827ca4269be232c9a74751 Mon Sep 17 00:00:00 2001 From: witekfl Date: Wed, 1 Mar 2006 18:17:16 +0100 Subject: [PATCH] SpiderMonkey: do not remember context. Maybe this time it won't hung. --- src/ecmascript/spidermonkey/window.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/ecmascript/spidermonkey/window.c b/src/ecmascript/spidermonkey/window.c index cbc92d443..214bfc9d4 100644 --- a/src/ecmascript/spidermonkey/window.c +++ b/src/ecmascript/spidermonkey/window.c @@ -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++;