Bug 1260933 - Part 1: For invalid easing values, print the invalid value. r=birtles draft
authorDaisuke Akatsuka <daisuke@mozilla-japan.org>
Thu, 31 Mar 2016 19:20:42 +0900
changeset 346228 e640bcf99d1cf05cad9fe937db92ef80794cb6d6
parent 345720 494289c72ba3997183e7b5beaca3e0447ecaf96d
child 346229 6b994da55078bce5f5db788f8fce483da883ac41
push id14293
push userbmo:daisuke@mozilla-japan.org
push dateThu, 31 Mar 2016 10:21:14 +0000
reviewersbirtles
bugs1260933
milestone48.0a1
Bug 1260933 - Part 1: For invalid easing values, print the invalid value. r=birtles MozReview-Commit-ID: HJEjvGyUnCN
dom/animation/TimingParams.cpp
dom/bindings/Errors.msg
--- a/dom/animation/TimingParams.cpp
+++ b/dom/animation/TimingParams.cpp
@@ -156,17 +156,17 @@ TimingParams::ParseEasing(const nsAStrin
     case eCSSUnit_Unset:
     case eCSSUnit_TokenStream:
     case eCSSUnit_Null:
       break;
     default:
       MOZ_ASSERT_UNREACHABLE("unexpected animation-timing-function unit");
       break;
   }
-  aRv.ThrowTypeError<dom::MSG_INVALID_EASING_ERROR>();
+  aRv.ThrowTypeError<dom::MSG_INVALID_EASING_ERROR>(aEasing);
   return Nothing();
 }
 
 bool
 TimingParams::operator==(const TimingParams& aOther) const
 {
   return mDuration == aOther.mDuration &&
          mDelay == aOther.mDelay &&
--- a/dom/bindings/Errors.msg
+++ b/dom/bindings/Errors.msg
@@ -88,9 +88,9 @@ MSG_DEF(MSG_PROMISE_RESOLVE_FUNCTION_NOT
 MSG_DEF(MSG_PROMISE_REJECT_FUNCTION_NOT_CALLABLE, 0, JSEXN_TYPEERR, "A Promise subclass passed a non-callable value as the reject function.")
 MSG_DEF(MSG_PROMISE_ARG_NOT_ITERABLE, 1, JSEXN_TYPEERR, "{0} is not iterable")
 MSG_DEF(MSG_IS_NOT_PROMISE, 1, JSEXN_TYPEERR, "{0} is not a Promise")
 MSG_DEF(MSG_SW_INSTALL_ERROR, 2, JSEXN_TYPEERR, "ServiceWorker script at {0} for scope {1} encountered an error during installation.")
 MSG_DEF(MSG_SW_SCRIPT_THREW, 2, JSEXN_TYPEERR, "ServiceWorker script at {0} for scope {1} threw an exception during script evaluation.")
 MSG_DEF(MSG_TYPEDARRAY_IS_SHARED, 1, JSEXN_TYPEERR, "{0} can't be a typed array on SharedArrayBuffer")
 MSG_DEF(MSG_CACHE_ADD_FAILED_RESPONSE, 3, JSEXN_TYPEERR, "Cache got {0} response with bad status {1} while trying to add request {2}")
 MSG_DEF(MSG_INVALID_DURATION_ERROR, 0, JSEXN_TYPEERR, "Invalid duration.")
-MSG_DEF(MSG_INVALID_EASING_ERROR, 0, JSEXN_TYPEERR, "Invalid easing.")
\ No newline at end of file
+MSG_DEF(MSG_INVALID_EASING_ERROR, 1, JSEXN_TYPEERR, "Invalid easing '{0}'.")
\ No newline at end of file