From 2e767b124c5764f3c629722e471e87745c57efea Mon Sep 17 00:00:00 2001 From: Andreas Gal Date: Thu, 21 Aug 2008 01:13:07 -0700 Subject: [PATCH] Convert undefined to NULL on tree entry if the tree wants an object type. --- js/src/jstracer.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/js/src/jstracer.cpp b/js/src/jstracer.cpp index 4dd2253b6eb..1e9a11e7cfd 100644 --- a/js/src/jstracer.cpp +++ b/js/src/jstracer.cpp @@ -905,6 +905,10 @@ ValueToNative(JSContext* cx, jsval v, uint8 type, double* slot) return true; default: JS_ASSERT(type == JSVAL_OBJECT); + if (v == JSVAL_VOID) { + *(JSObject**)slot = NULL; + return true; + } if (tag != JSVAL_OBJECT) { debug_only_v(printf("object != tag%u ", tag);) return false;