Bug 1019191 part 4. Remove the now-dead xpc_qsThrowGetterSetterFailed and xpc_qsThrowBadSetterValue functions. r=peterv

This commit is contained in:
Boris Zbarsky 2014-10-22 11:40:47 -04:00
parent 6e2d2fcc76
commit 5e1aca9748
2 changed files with 0 additions and 107 deletions

View File

@ -19,8 +19,6 @@
using namespace mozilla;
using namespace JS;
extern const char* xpc_qsStringTable;
static const xpc_qsHashEntry *
LookupEntry(uint32_t tableSize, const xpc_qsHashEntry *table, const nsID &iid)
{
@ -253,37 +251,6 @@ ThrowCallFailed(JSContext *cx, nsresult rv,
return false;
}
bool
xpc_qsThrowGetterSetterFailed(JSContext *cx, nsresult rv, JSObject *obj,
jsid memberIdArg)
{
RootedId memberId(cx, memberIdArg);
const char *ifaceName;
GetMemberInfo(obj, memberId, &ifaceName);
return ThrowCallFailed(cx, rv, ifaceName, memberId, nullptr);
}
bool
xpc_qsThrowGetterSetterFailed(JSContext *cx, nsresult rv, JSObject *objArg,
const char* memberName)
{
RootedObject obj(cx, objArg);
JSString *str = JS_InternString(cx, memberName);
if (!str) {
return false;
}
return xpc_qsThrowGetterSetterFailed(cx, rv, obj,
INTERNED_STRING_TO_JSID(cx, str));
}
bool
xpc_qsThrowGetterSetterFailed(JSContext *cx, nsresult rv, JSObject *obj,
uint16_t memberIndex)
{
return xpc_qsThrowGetterSetterFailed(cx, rv, obj,
xpc_qsStringTable + memberIndex);
}
bool
xpc_qsThrowMethodFailed(JSContext *cx, nsresult rv, jsval *vp)
{
@ -344,35 +311,6 @@ xpc_qsThrowBadArgWithDetails(JSContext *cx, nsresult rv, unsigned paramnum,
ThrowBadArg(cx, rv, ifaceName, JSID_VOID, memberName, paramnum);
}
void
xpc_qsThrowBadSetterValue(JSContext *cx, nsresult rv,
JSObject *obj, jsid propIdArg)
{
RootedId propId(cx, propIdArg);
const char *ifaceName;
GetMemberInfo(obj, propId, &ifaceName);
ThrowBadArg(cx, rv, ifaceName, propId, nullptr, 0);
}
void
xpc_qsThrowBadSetterValue(JSContext *cx, nsresult rv,
JSObject *objArg, const char* propName)
{
RootedObject obj(cx, objArg);
JSString *str = JS_InternString(cx, propName);
if (!str) {
return;
}
xpc_qsThrowBadSetterValue(cx, rv, obj, INTERNED_STRING_TO_JSID(cx, str));
}
void
xpc_qsThrowBadSetterValue(JSContext *cx, nsresult rv, JSObject *obj,
uint16_t name_index)
{
xpc_qsThrowBadSetterValue(cx, rv, obj, xpc_qsStringTable + name_index);
}
bool
xpc_qsGetterOnlyNativeStub(JSContext *cx, unsigned argc, jsval *vp)
{

View File

@ -60,42 +60,14 @@ xpc_qsDefineQuickStubs(JSContext *cx, JSObject *proto, unsigned extraFlags,
bool
xpc_qsThrow(JSContext *cx, nsresult rv);
/**
* Fail after an XPCOM getter or setter returned rv.
*
* NOTE: Here @a obj must be the JSObject whose private data field points to an
* XPCWrappedNative, not merely an object that has an XPCWrappedNative
* somewhere along the prototype chain! The same applies to @a obj in
* xpc_qsThrowBadSetterValue and <code>vp[1]</code> in xpc_qsThrowMethodFailed
* and xpc_qsThrowBadArg.
*
* This is one reason the UnwrapThis functions below have an out parameter that
* receives the wrapper JSObject. (The other reason is to help the caller keep
* that JSObject GC-reachable.)
*/
bool
xpc_qsThrowGetterSetterFailed(JSContext *cx, nsresult rv,
JSObject *obj, jsid memberId);
// And variants using strings and string tables
bool
xpc_qsThrowGetterSetterFailed(JSContext *cx, nsresult rv,
JSObject *obj, const char* memberName);
bool
xpc_qsThrowGetterSetterFailed(JSContext *cx, nsresult rv,
JSObject *obj, uint16_t memberIndex);
/**
* Fail after an XPCOM method returned rv.
*
* See NOTE at xpc_qsThrowGetterSetterFailed.
*/
bool
xpc_qsThrowMethodFailed(JSContext *cx, nsresult rv, jsval *vp);
/**
* Fail after converting a method argument fails.
*
* See NOTE at xpc_qsThrowGetterSetterFailed.
*/
void
xpc_qsThrowBadArg(JSContext *cx, nsresult rv, jsval *vp, unsigned paramnum);
@ -107,23 +79,6 @@ void
xpc_qsThrowBadArgWithDetails(JSContext *cx, nsresult rv, unsigned paramnum,
const char *ifaceName, const char *memberName);
/**
* Fail after converting a setter argument fails.
*
* See NOTE at xpc_qsThrowGetterSetterFailed.
*/
void
xpc_qsThrowBadSetterValue(JSContext *cx, nsresult rv, JSObject *obj,
jsid propId);
// And variants using strings and string tables
void
xpc_qsThrowBadSetterValue(JSContext *cx, nsresult rv, JSObject *obj,
const char* propName);
void
xpc_qsThrowBadSetterValue(JSContext *cx, nsresult rv, JSObject *obj,
uint16_t name_index);
bool
xpc_qsGetterOnlyNativeStub(JSContext *cx, unsigned argc, jsval *vp);