зеркало из https://github.com/mozilla/pjs.git
Bug 692722 - implement xpcshell -d for running in debug mode (r=mrbkap)
--HG-- extra : rebase_source : e54e3ccd8dc9da4e75629963f6702b4d3e7a95b2
This commit is contained in:
Родитель
c0eb2d7162
Коммит
e58689eb87
|
@ -1233,6 +1233,9 @@ ProcessArgs(JSContext *cx, JSObject *obj, char **argv, int argc)
|
|||
case 'x':
|
||||
JS_ToggleOptions(cx, JSOPTION_XML);
|
||||
break;
|
||||
case 'd':
|
||||
xpc_ActivateDebugMode();
|
||||
break;
|
||||
case 'P':
|
||||
if (JS_GET_CLASS(cx, JS_GetPrototype(cx, obj)) != &global_class) {
|
||||
JSObject *gobj;
|
||||
|
|
|
@ -2578,6 +2578,14 @@ fail:
|
|||
gDesiredDebugMode = gDebugMode = JS_FALSE;
|
||||
}
|
||||
|
||||
NS_EXPORT_(void)
|
||||
xpc_ActivateDebugMode()
|
||||
{
|
||||
XPCJSRuntime* rt = nsXPConnect::GetRuntimeInstance();
|
||||
nsXPConnect::GetXPConnect()->SetDebugModeWhenPossible(true, true);
|
||||
nsXPConnect::CheckForDebugMode(rt->GetJSRuntime());
|
||||
}
|
||||
|
||||
/* JSContext Pop (); */
|
||||
NS_IMETHODIMP
|
||||
nsXPConnect::Pop(JSContext * *_retval)
|
||||
|
|
|
@ -595,6 +595,8 @@ public:
|
|||
return gReportAllJSExceptions > 0;
|
||||
}
|
||||
|
||||
static void CheckForDebugMode(JSRuntime *rt);
|
||||
|
||||
protected:
|
||||
nsXPConnect();
|
||||
|
||||
|
@ -624,7 +626,6 @@ private:
|
|||
static PRUint32 gReportAllJSExceptions;
|
||||
static JSBool gDebugMode;
|
||||
static JSBool gDesiredDebugMode;
|
||||
static inline void CheckForDebugMode(JSRuntime *rt);
|
||||
|
||||
public:
|
||||
static nsIScriptSecurityManager *gScriptSecurityManager;
|
||||
|
|
|
@ -182,6 +182,11 @@ xpc_UnmarkGrayObject(JSObject *obj)
|
|||
xpc_UnmarkGrayObjectRecursive(obj);
|
||||
}
|
||||
|
||||
// No JS can be on the stack when this is called. Probably only useful from
|
||||
// xpcshell.
|
||||
NS_EXPORT_(void)
|
||||
xpc_ActivateDebugMode();
|
||||
|
||||
class nsIMemoryMultiReporterCallback;
|
||||
|
||||
namespace mozilla {
|
||||
|
|
Загрузка…
Ссылка в новой задаче