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 77708 d6eab9dde6bd19cefdf59b1f3d477149b9a89ebc
parent 77707 1a29139e6bafb68172bebb92f4208762aa939367
child 77709 df264cbf7b9cbbdba635420da8d9e64529b77ca2
push id78
push userclegnitto@mozilla.com
push dateFri, 16 Dec 2011 17:32:24 +0000
treeherdermozilla-release@79d24e644fdd [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs513014
milestone9.0a1
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
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;