Bug 941437 part 1. Remove the unused cx argument from dom::UnwrapObject. r=smaug

This commit is contained in:
Boris Zbarsky 2013-11-21 07:51:15 -05:00
Родитель 76bf306a6e
Коммит ae8b4cf576
4 изменённых файлов: 6 добавлений и 6 удалений

Просмотреть файл

@ -1793,10 +1793,10 @@ ReparentWrapper(JSContext* aCx, JS::Handle<JSObject*> aObjArg)
nsresult rv = UNWRAP_OBJECT(HTMLObjectElement, aCx, aObj, htmlobject);
if (NS_FAILED(rv)) {
rv = UnwrapObject<prototypes::id::HTMLEmbedElement,
HTMLSharedObjectElement>(aCx, aObj, htmlobject);
HTMLSharedObjectElement>(aObj, htmlobject);
if (NS_FAILED(rv)) {
rv = UnwrapObject<prototypes::id::HTMLAppletElement,
HTMLSharedObjectElement>(aCx, aObj, htmlobject);
HTMLSharedObjectElement>(aObj, htmlobject);
if (NS_FAILED(rv)) {
htmlobject = nullptr;
}

Просмотреть файл

@ -195,7 +195,7 @@ IsDOMObject(JSObject* obj)
#define UNWRAP_OBJECT(Interface, cx, obj, value) \
mozilla::dom::UnwrapObject<mozilla::dom::prototypes::id::Interface, \
mozilla::dom::Interface##Binding::NativeType>(cx, obj, value)
mozilla::dom::Interface##Binding::NativeType>(obj, value)
// Some callers don't want to set an exception when unwrapping fails
// (for example, overload resolution uses unwrapping to tell what sort
@ -203,7 +203,7 @@ IsDOMObject(JSObject* obj)
// U must be something that a T* can be assigned to (e.g. T* or an nsRefPtr<T>).
template <prototypes::ID PrototypeID, class T, typename U>
MOZ_ALWAYS_INLINE nsresult
UnwrapObject(JSContext* cx, JSObject* obj, U& value)
UnwrapObject(JSObject* obj, U& value)
{
/* First check to see whether we have a DOM object */
const DOMClass* domClass = GetDOMClass(obj);

Просмотреть файл

@ -2536,7 +2536,7 @@ class CastableObjectUnwrapper():
codeOnFailure = self.substitution["codeOnFailure"] % {'securityError': 'rv == NS_ERROR_XPC_SECURITY_MANAGER_VETO'}
return string.Template(
"""{
nsresult rv = UnwrapObject<${protoID}, ${type}>(cx, ${source}, ${target});
nsresult rv = UnwrapObject<${protoID}, ${type}>(${source}, ${target});
if (NS_FAILED(rv)) {
${codeOnFailure}
}

Просмотреть файл

@ -24,7 +24,7 @@
#define UNWRAP_WORKER_OBJECT(Interface, cx, obj, value) \
UnwrapObject<prototypes::id::Interface##_workers, \
mozilla::dom::Interface##Binding_workers::NativeType>(cx, obj, value)
mozilla::dom::Interface##Binding_workers::NativeType>(obj, value)
using namespace mozilla::dom;
USING_WORKERS_NAMESPACE