Bug 1137325. Remove the parent() function from xpcshell. r=mrbkap

This commit is contained in:
Boris Zbarsky 2015-02-27 11:46:58 -05:00
parent 65d76a8a42
commit 8f84b4126c

View File

@ -534,25 +534,6 @@ Options(JSContext *cx, unsigned argc, jsval *vp)
return true;
}
static bool
Parent(JSContext *cx, unsigned argc, jsval *vp)
{
CallArgs args = CallArgsFromVp(argc, vp);
if (args.length() != 1) {
JS_ReportError(cx, "Wrong number of arguments");
return false;
}
Value v = args[0];
if (v.isPrimitive()) {
JS_ReportError(cx, "Only objects have parents!");
return false;
}
args.rval().setObjectOrNull(JS_GetParent(&v.toObject()));
return true;
}
static bool
Atob(JSContext *cx, unsigned argc, Value *vp)
{
@ -655,7 +636,6 @@ static const JSFunctionSpec glob_functions[] = {
JS_FS("gczeal", GCZeal, 1,0),
#endif
JS_FS("options", Options, 0,0),
JS_FN("parent", Parent, 1,0),
JS_FS("sendCommand", SendCommand, 1,0),
JS_FS("atob", Atob, 1,0),
JS_FS("btoa", Btoa, 1,0),