Bug 614347 - 'XPConnect-wrapped JSObjects must clear their gray bit when they are handed out'. r=peterv+gal, a=blocking. Bustage fix.
authorBen Turner <bent.mozilla@gmail.com>
Tue, 08 Feb 2011 20:12:48 -0800
changeset 62388 050d216ec2a2699c9f9d6adbc512a07d11797f56
parent 62387 bfadd87432812ff131a3980ed4c2b75c7fe92959
child 62389 42063595d1865b4a7b44b381dd481b5e81cc45d1
push id18712
push usercleary@mozilla.com
push dateFri, 11 Feb 2011 17:56:41 +0000
treeherdermozilla-central@987efc5f8ba7 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspeterv, blocking
bugs614347
milestone2.0b12pre
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 614347 - 'XPConnect-wrapped JSObjects must clear their gray bit when they are handed out'. r=peterv+gal, a=blocking. Bustage fix.
js/src/xpconnect/src/xpcprivate.h
--- a/js/src/xpconnect/src/xpcprivate.h
+++ b/js/src/xpconnect/src/xpcprivate.h
@@ -4331,17 +4331,17 @@ public:
     static XPCVariant* newVariant(XPCCallContext& ccx, jsval aJSVal);
 
     /**
      * This getter clears the gray bit before handing out the jsval if the jsval
      * represents a JSObject. That means that the object is guaranteed to be
      * kept alive past the next CC.
      */
     jsval GetJSVal() const
-        {if(JSVAL_IS_OBJECT(mJSVal))
+        {if(!JSVAL_IS_PRIMITIVE(mJSVal))
              JSVAL_TO_OBJECT(mJSVal)->unmark(XPC_GC_COLOR_GRAY);
          return mJSVal;}
 
     /**
      * This getter does not change the color of the jsval (if it represents a
      * JSObject) meaning that the value returned is not guaranteed to be kept
      * alive past the next CC.
      *