Bug 1289010 - Correct ErrorType message for File CTOR., r=bz
authorAndrea Marchesini <amarchesini@mozilla.com>
Mon, 25 Jul 2016 22:42:31 +0200
changeset 348677 28d4a0d6054961569c381505f0845e55210f51ef
parent 348676 2c5aecb17cb2b7fa46683caae57cec57689d5949
child 348678 76ebe845bed9e33cc1e42d452cd76c87d6a49ceb
push id1230
push userjlund@mozilla.com
push dateMon, 31 Oct 2016 18:13:35 +0000
treeherdermozilla-release@5e06e3766db2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbz
bugs1289010
milestone50.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1289010 - Correct ErrorType message for File CTOR., r=bz
dom/base/File.cpp
--- a/dom/base/File.cpp
+++ b/dom/base/File.cpp
@@ -555,17 +555,17 @@ File::Constructor(const GlobalObject& aG
 
 /* static */ already_AddRefed<File>
 File::Constructor(const GlobalObject& aGlobal,
                   Blob& aData,
                   const ChromeFilePropertyBag& aBag,
                   ErrorResult& aRv)
 {
   if (!nsContentUtils::ThreadsafeIsCallerChrome()) {
-    aRv.Throw(NS_ERROR_FAILURE);
+    aRv.ThrowTypeError<MSG_NOT_SEQUENCE>(NS_LITERAL_STRING("Argument 1 of File.constructor"));
     return nullptr;
   }
 
   RefPtr<MultipartBlobImpl> impl = new MultipartBlobImpl(EmptyString());
   impl->InitializeChromeFile(aData, aBag, aRv);
   if (aRv.Failed()) {
     return nullptr;
   }