From 944fa2db0db69d2b64cf2b51aa0130a497231f5c Mon Sep 17 00:00:00 2001 From: "igor%mir2.org" Date: Sun, 1 Apr 2007 00:00:36 +0000 Subject: [PATCH] Bug 375999: fixing regression from bug 375808. r=brendan git-svn-id: svn://10.0.0.236/trunk@223962 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/js/src/jsfun.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/mozilla/js/src/jsfun.c b/mozilla/js/src/jsfun.c index 1c5cff66f5b..f19a4358fe4 100644 --- a/mozilla/js/src/jsfun.c +++ b/mozilla/js/src/jsfun.c @@ -972,8 +972,16 @@ static JSPropertySpec function_props[] = { void js_MarkFunction(JSContext *cx, JSFunction *fun) { - if (fun->object) - GC_MARK(cx, fun->object, "object"); + if (0) { + /* + * FIXME the following is not done to avoid dealing in the current + * XPCOM cycle collector with Object->JSFunction->Object loop. This + * is safe due to the current code practice, see bug 375999 and + * bug 375808. + */ + if (fun->object) + GC_MARK(cx, fun->object, "object"); + } if (fun->atom) GC_MARK_ATOM(cx, fun->atom); if (FUN_INTERPRETED(fun) && fun->u.i.script)