From 7a3390709cc39318cd2946b55712e69848ee628d Mon Sep 17 00:00:00 2001 From: "mrbkap%gmail.com" Date: Fri, 14 Apr 2006 18:14:43 +0000 Subject: [PATCH] Only avoid calling toObject when v is null. bug 333911, r=brendan --- js/narcissus/jsexec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/narcissus/jsexec.js b/js/narcissus/jsexec.js index 883c747c0b7..f7048a5dd46 100644 --- a/js/narcissus/jsexec.js +++ b/js/narcissus/jsexec.js @@ -354,7 +354,7 @@ function execute(n, x) { v = getValue(s); // ECMA erratum: allow for (i in null) - t = v && toObject(v, s, n.object); + t = (v === null) ? v : toObject(v, s, n.object); a = []; for (i in t) a.push(i);