Backed out changeset 2a9cfbab0adc (bug 1053999) for Windows build bustage on a CLOSED TREE

This commit is contained in:
Wes Kocher 2014-08-20 16:08:04 -07:00
parent 0e8672c225
commit f1646bf5bb
4 changed files with 6 additions and 22 deletions

View File

@ -2424,9 +2424,8 @@ nsGlobalWindow::SetNewDocument(nsIDocument* aDocument,
bool thisChrome = IsChromeWindow();
// Check if we're near the stack limit before we get anywhere near the
// transplanting code. We use a conservative check since we'll use a little
// more space before we actually hit the critical "can't fail" path.
JS_CHECK_RECURSION_CONSERVATIVE(cx, return NS_ERROR_FAILURE);
// transplanting code.
JS_CHECK_RECURSION(cx, return NS_ERROR_FAILURE);
nsCOMPtr<WindowStateHolder> wsh = do_QueryInterface(aState);
NS_ASSERTION(!aState || wsh, "What kind of weird state are you giving me here?");

View File

@ -1741,9 +1741,8 @@ ReparentWrapper(JSContext* aCx, JS::Handle<JSObject*> aObjArg)
js::AssertSameCompartment(aCx, aObjArg);
// Check if we're near the stack limit before we get anywhere near the
// transplanting code. We use a conservative check since we'll use a little
// more space before we actually hit the critical "can't fail" path.
JS_CHECK_RECURSION_CONSERVATIVE(aCx, return NS_ERROR_FAILURE);
// transplanting code.
JS_CHECK_RECURSION(aCx, return NS_ERROR_FAILURE);
JS::Rooted<JSObject*> aObj(aCx, aObjArg);
const DOMJSClass* domClass = GetDOMClass(aObj);

View File

@ -995,7 +995,6 @@ GetNativeStackLimit(JSContext *cx)
* These macros report a stack overflow and run |onerror| if we are close to
* using up the C stack. The JS_CHECK_CHROME_RECURSION variant gives us a little
* extra space so that we can ensure that crucial code is able to run.
* JS_CHECK_RECURSION_CONSERVATIVE gives us a little less space.
*/
#define JS_CHECK_RECURSION(cx, onerror) \
@ -1042,18 +1041,6 @@ GetNativeStackLimit(JSContext *cx)
} \
JS_END_MACRO
#define JS_CHECK_RECURSION_CONSERVATIVE(cx, onerror) \
JS_BEGIN_MACRO \
int stackDummy_; \
if (!JS_CHECK_STACK_SIZE_WITH_TOLERANCE(js::GetNativeStackLimit(cx), \
&stackDummy_, \
-1024 * sizeof(size_t))) \
{ \
js_ReportOverRecursed(cx); \
onerror; \
} \
JS_END_MACRO
JS_FRIEND_API(void)
StartPCCountProfiling(JSContext *cx);

View File

@ -1073,10 +1073,9 @@ XPCWrappedNative::ReparentWrapperIfFound(XPCWrappedNativeScope* aOldScope,
nsISupports* aCOMObj)
{
// Check if we're near the stack limit before we get anywhere near the
// transplanting code. We use a conservative check since we'll use a little
// more space before we actually hit the critical "can't fail" path.
// transplanting code.
AutoJSContext cx;
JS_CHECK_RECURSION_CONSERVATIVE(cx, return NS_ERROR_FAILURE);
JS_CHECK_RECURSION(cx, return NS_ERROR_FAILURE);
XPCNativeInterface* iface = XPCNativeInterface::GetISupports();
if (!iface)