Backed out changeset 1c2bd3bdebd6 (bug 933378)

This commit is contained in:
Carsten "Tomcat" Book 2016-07-16 10:03:10 +02:00
parent fa869d9ca1
commit b2d35d7ca3
3 changed files with 5 additions and 20 deletions

View File

@ -2011,12 +2011,6 @@ private:
};
};
class FastErrorResult :
public mozilla::binding_danger::TErrorResult<
mozilla::binding_danger::JustAssertCleanupPolicy>
{
};
} // namespace binding_detail
enum StringificationBehavior {

View File

@ -5261,7 +5261,7 @@ def getJSToNativeConversionInfo(type, descriptorProvider, failureCode=None,
templateBody = fill(
"""
{ // Scope for our GlobalObject, FastErrorResult, JSAutoCompartment,
{ // Scope for our GlobalObject, ErrorResult, JSAutoCompartment,
// etc.
JS::Rooted<JSObject*> globalObj(cx, JS::CurrentGlobalOrNull(cx));
@ -5276,7 +5276,7 @@ def getJSToNativeConversionInfo(type, descriptorProvider, failureCode=None,
if (!JS_WrapValue(cx, &valueToResolve)) {
$*{exceptionCode}
}
binding_detail::FastErrorResult promiseRv;
ErrorResult promiseRv;
#ifdef SPIDERMONKEY_PROMISE
nsCOMPtr<nsIGlobalObject> global =
do_QueryInterface(promiseGlobal.GetAsSupports());
@ -6971,7 +6971,7 @@ class CGCallGenerator(CGThing):
self.cgRoot.append(call)
if isFallible:
self.cgRoot.prepend(CGGeneric("binding_detail::FastErrorResult rv;\n"))
self.cgRoot.prepend(CGGeneric("ErrorResult rv;\n"))
self.cgRoot.append(CGGeneric(dedent(
"""
if (MOZ_UNLIKELY(rv.MaybeSetPendingException(cx))) {
@ -8486,7 +8486,7 @@ class CGEnumerateHook(CGAbstractBindingMethod):
def generate_code(self):
return CGGeneric(dedent("""
AutoTArray<nsString, 8> names;
binding_detail::FastErrorResult rv;
ErrorResult rv;
self->GetOwnPropertyNames(cx, names, rv);
if (rv.MaybeSetPendingException(cx)) {
return false;
@ -10579,7 +10579,7 @@ class CGEnumerateOwnPropertiesViaGetOwnPropertyNames(CGAbstractBindingMethod):
def generate_code(self):
return CGGeneric(dedent("""
AutoTArray<nsString, 8> names;
binding_detail::FastErrorResult rv;
ErrorResult rv;
self->GetOwnPropertyNames(cx, names, rv);
if (rv.MaybeSetPendingException(cx)) {
return false;

View File

@ -151,8 +151,6 @@ public:
AssignErrorCode(aRv);
}
operator ErrorResult&();
void Throw(nsresult rv) {
MOZ_ASSERT(NS_FAILED(rv), "Please don't try throwing success");
AssignErrorCode(rv);
@ -499,13 +497,6 @@ private:
void operator=(const ErrorResult&) = delete;
};
template<typename CleanupPolicy>
binding_danger::TErrorResult<CleanupPolicy>::operator ErrorResult&()
{
return *static_cast<ErrorResult*>(
reinterpret_cast<TErrorResult<JustAssertCleanupPolicy>*>(this));
}
// A class for use when an ErrorResult should just automatically be ignored.
class IgnoredErrorResult : public ErrorResult
{