Fix --enable-functiontimer build, bug 690943.
authorBrian Hackett <bhackett1024@gmail.com>
Thu, 06 Oct 2011 07:54:35 -0700
changeset 79589 5c044658352c04b10bc9a2a787aa13bb141cf46e
parent 79588 6255643f422f78159ec640d9d866ba50fe3aae38
child 79590 bacc2c7eee29d9bcf4b01ebf481f461e85bf44cd
push idunknown
push userunknown
push dateunknown
bugs690943
milestone10.0a1
Fix --enable-functiontimer build, bug 690943.
dom/base/nsJSEnvironment.cpp
--- a/dom/base/nsJSEnvironment.cpp
+++ b/dom/base/nsJSEnvironment.cpp
@@ -1868,18 +1868,18 @@ nsJSContext::CallEventHandler(nsISupport
 
   if (!mScriptsEnabled) {
     return NS_OK;
   }
 
 #ifdef NS_FUNCTION_TIMER
   {
     JSObject *obj = static_cast<JSObject *>(aHandler);
-    if (obj->isFunctionProxy())
-      obj = obj->unwrap(NULL);
+    if (js::IsFunctionProxy(obj))
+      obj = js::UnwrapObject(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);