Fix stranded use of recently-deleted GET_FUNCTION_PRIVATE macro, in #ifdef NS_FUNCTION_TIMER code, spotted by dietrich. See bug 513014 comment 1.
authorJason Orendorff <jorendorff@mozilla.com>
Thu, 01 Sep 2011 11:31:14 -0500
changeset 76397 d6eab9dde6bd19cefdf59b1f3d477149b9a89ebc
parent 76396 1a29139e6bafb68172bebb92f4208762aa939367
child 76398 df264cbf7b9cbbdba635420da8d9e64529b77ca2
push id3
push userfelipc@gmail.com
push dateFri, 30 Sep 2011 20:09:13 +0000
bugs513014
milestone9.0a1
Fix stranded use of recently-deleted GET_FUNCTION_PRIVATE macro, in #ifdef NS_FUNCTION_TIMER code, spotted by dietrich. See bug 513014 comment 1.
dom/base/nsJSEnvironment.cpp
--- a/dom/base/nsJSEnvironment.cpp
+++ b/dom/base/nsJSEnvironment.cpp
@@ -1839,17 +1839,17 @@ nsJSContext::CallEventHandler(nsISupport
     return NS_OK;
   }
 
 #ifdef NS_FUNCTION_TIMER
   {
     JSObject *obj = static_cast<JSObject *>(aHandler);
     if (obj->isFunctionProxy())
       obj = obj->unwrap(NULL);
-    JSString *id = JS_GetFunctionId(GET_FUNCTION_PRIVATE(mContext, obj));
+    JSString *id = JS_GetFunctionId(static_cast<JSFunction *>(JS_GetPrivate(mContext, obj)));
     JSAutoByteString bytes;
     const char *name = !id ? "anonymous" : bytes.encode(mContext, id) ? bytes.ptr() : "<error>";
     NS_TIME_FUNCTION_FMT(1.0, "%s (line %d) (function: %s)", MOZ_FUNCTION_NAME, __LINE__, name);
   }
 #endif
 
   JSAutoRequest ar(mContext);
   JSObject* target = nsnull;