Backed out changeset 64d5b7cdeb69 - bug 476643 because of Windows bustage (js_LeaveTrace is not a friend API)
authorBenjamin Smedberg <benjamin@smedbergs.us>
Thu, 05 Feb 2009 20:20:03 -0500
changeset 24690 1dabc169a3c4f6afea7acec07e2fe983bdce6186
parent 24689 64d5b7cdeb698e8fc8543ff863680d22fce7748c
child 24691 50e934e4979ba4fa63dd9617ac35cceaacdf580b
push id5169
push userbsmedberg@mozilla.com
push dateFri, 06 Feb 2009 01:20:20 +0000
treeherdermozilla-central@1dabc169a3c4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs476643
milestone1.9.2a1pre
backs out64d5b7cdeb698e8fc8543ff863680d22fce7748c
Backed out changeset 64d5b7cdeb69 - bug 476643 because of Windows bustage (js_LeaveTrace is not a friend API)
dom/src/base/nsJSEnvironment.cpp
dom/src/base/nsJSEnvironment.h
js/src/xpconnect/src/xpcprivate.h
js/src/xpconnect/src/xpcwrappedjsclass.cpp
--- a/dom/src/base/nsJSEnvironment.cpp
+++ b/dom/src/base/nsJSEnvironment.cpp
@@ -72,17 +72,16 @@
 #include "nsIPrompt.h"
 #include "nsIObserverService.h"
 #include "nsGUIEvent.h"
 #include "nsThreadUtils.h"
 #include "nsITimer.h"
 #include "nsIAtom.h"
 #include "nsContentUtils.h"
 #include "jscntxt.h"
-#include "jstracer.h"
 #include "nsEventDispatcher.h"
 #include "nsIContent.h"
 #include "nsCycleCollector.h"
 #include "nsNetUtil.h"
 #include "nsXPCOMCIDInternal.h"
 #include "nsIXULRuntime.h"
 
 // For locale aware string methods
@@ -372,17 +371,17 @@ public:
 private:
   void *mPtr;
 };
 
 class AutoFreeJSStack {
 public:
   AutoFreeJSStack(JSContext *ctx, void *aPtr) : mContext(ctx), mStack(aPtr) {
   }
-  JS_REQUIRES_STACK ~AutoFreeJSStack() {
+  ~AutoFreeJSStack() {
     if (mContext && mStack)
       js_FreeStack(mContext, mStack);
   }
 private:
   JSContext *mContext;
   void *mStack;
 };
 
@@ -2523,18 +2522,16 @@ nsJSContext::SetProperty(void *aTarget, 
 nsresult
 nsJSContext::ConvertSupportsTojsvals(nsISupports *aArgs,
                                      void *aScope,
                                      PRUint32 *aArgc, void **aArgv,
                                      void **aMarkp)
 {
   nsresult rv = NS_OK;
 
-  js_LeaveTrace(mContext);
-
   // If the array implements nsIJSArgArray, just grab the values directly.
   nsCOMPtr<nsIJSArgArray> fastArray = do_QueryInterface(aArgs);
   if (fastArray != nsnull) {
     *aMarkp = nsnull;
     return fastArray->GetArgs(aArgc, aArgv);
   }
   // Take the slower path converting each item.
   // Handle only nsIArray and nsIVariant.  nsIArray is only needed for
--- a/dom/src/base/nsJSEnvironment.h
+++ b/dom/src/base/nsJSEnvironment.h
@@ -195,21 +195,20 @@ public:
   // Calls CC() if user is currently inactive, otherwise MaybeCC(PR_TRUE)
   static void CCIfUserInactive();
 protected:
   nsresult InitializeExternalClasses();
   // aHolder should be holding our global object
   nsresult FindXPCNativeWrapperClass(nsIXPConnectJSObjectHolder *aHolder);
 
   // Helper to convert xpcom datatypes to jsvals.
-  JS_FORCES_STACK nsresult ConvertSupportsTojsvals(nsISupports *aArgs,
-                                                   void *aScope,
-                                                   PRUint32 *aArgc,
-                                                   void **aArgv,
-                                                   void **aMarkp);
+  nsresult ConvertSupportsTojsvals(nsISupports *aArgs,
+                                   void *aScope,
+                                   PRUint32 *aArgc, void **aArgv,
+                                   void **aMarkp);
 
   nsresult AddSupportsPrimitiveTojsvals(nsISupports *aArg, jsval *aArgv);
 
   void FireGCTimer(PRBool aLoadInProgress);
 
   // given an nsISupports object (presumably an event target or some other
   // DOM object), get (or create) the JSObject wrapping it.
   nsresult JSObjectFromInterface(nsISupports *aSup, void *aScript, 
--- a/js/src/xpconnect/src/xpcprivate.h
+++ b/js/src/xpconnect/src/xpcprivate.h
@@ -77,17 +77,16 @@
 #include "jsapi.h"
 #include "jsdhash.h"
 #include "jsprf.h"
 #include "prprf.h"
 #include "jsinterp.h"
 #include "jscntxt.h"
 #include "jsdbgapi.h"
 #include "jsgc.h"
-#include "jstracer.h"
 #include "xptinfo.h"
 #include "xpcforwards.h"
 #include "xpclog.h"
 #include "xpccomponents.h"
 #include "xpcexception.h"
 #include "xpcjsid.h"
 #include "prlong.h"
 #include "prmem.h"
--- a/js/src/xpconnect/src/xpcwrappedjsclass.cpp
+++ b/js/src/xpconnect/src/xpcwrappedjsclass.cpp
@@ -1256,18 +1256,16 @@ nsXPCWrappedJSClass::CallMethod(nsXPCWra
     xpcc->SetException(nsnull);
     ccx.GetThreadData()->SetException(nsnull);
 
     // We use js_AllocStack, js_Invoke, and js_FreeStack so that the gcthings
     // we use as args will be rooted by the engine as we do conversions and
     // prepare to do the function call. This adds a fair amount of complexity,
     // but is a good optimization compared to calling JS_AddRoot for each item.
 
-    js_LeaveTrace(cx);
-
     // setup stack
 
     // if this isn't a function call then we don't need to push extra stuff
     if(XPT_MD_IS_GETTER(info->flags) || XPT_MD_IS_SETTER(info->flags))
     {
         stack_size = argc;
     }
     else