Bug 1289010 - Correct ErrorType message for File CTOR., r=bz
authorAndrea Marchesini <amarchesini@mozilla.com>
Mon, 25 Jul 2016 22:42:31 +0200
changeset 346607 28d4a0d6054961569c381505f0845e55210f51ef
parent 346606 2c5aecb17cb2b7fa46683caae57cec57689d5949
child 346608 76ebe845bed9e33cc1e42d452cd76c87d6a49ceb
push id6389
push userraliiev@mozilla.com
push dateMon, 19 Sep 2016 13:38:22 +0000
treeherdermozilla-beta@01d67bfe6c81 [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;
   }