Backed out changeset 6cc5a05281c3 (bug 976863) for xpcshell failures.

CLOSED TREE
This commit is contained in:
Ryan VanderMeulen 2014-03-05 15:36:26 -05:00
parent 2b37c097ed
commit d0df766a7d

View File

@ -32,22 +32,7 @@ let dir = Services.dirsvc.get("CurWorkD", Components.interfaces.nsILocalFile);
let file = dir.clone();
file.append(ctypes.libraryName("testcrasher"));
let lib = ctypes.open(file.path);
CrashTestUtils.crash = (crashType) => {
// CRASH_ABORT on Windows will bring up a dialog and hang until a user
// clicks a dialog. Tests are useless here. Detect that scenario and
// fail fast.
if (crashType == CrashTestUtils.CRASH_ABORT) {
if (Cc["@mozilla.org/xre/app-info;1"].getService(Ci.nsIXULRuntime).OS == "WINNT") {
throw new Error("CRASH_ABORT cannot be used on Windows because it " +
"launches a dialog that requires user interaction.");
}
}
return CrashTestUtils._crash(crashType);
};
CrashTestUtils._crash = lib.declare("Crash",
CrashTestUtils.crash = lib.declare("Crash",
ctypes.default_abi,
ctypes.void_t,
ctypes.int16_t);