Fix stranded use of recently-deleted GET_FUNCTION_PRIVATE macro, in #ifdef NS_FUNCTION_TIMER code, spotted by dietrich. See bug 513014 comment 1.

This commit is contained in:
Jason Orendorff 2011-09-01 11:31:14 -05:00
parent 0c504c31ce
commit 4ebbd8142d

View File

@ -1844,7 +1844,7 @@ nsJSContext::CallEventHandler(nsISupports* aTarget, void *aScope, void *aHandler
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);