Bug 1279889 - Some rv.SuppressException() missing in StructuredCloneHolder, r=smaug
authorAndrea Marchesini <amarchesini@mozilla.com>
Tue, 14 Jun 2016 13:10:39 +0100
changeset 301740 8bc3f9d3cad9ee2e5f21caa1fdcaeb107d88ed52
parent 301739 c8620342eff2fcc0ff30d5ccde71b55d486fcf99
child 301741 c3ca0a41a6619220c984820996d9d27f3b96f0c6
push id78435
push useramarchesini@mozilla.com
push dateTue, 14 Jun 2016 12:10:52 +0000
treeherdermozilla-inbound@8bc3f9d3cad9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs1279889
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 1279889 - Some rv.SuppressException() missing in StructuredCloneHolder, r=smaug
dom/base/StructuredCloneHolder.cpp
--- a/dom/base/StructuredCloneHolder.cpp
+++ b/dom/base/StructuredCloneHolder.cpp
@@ -898,16 +898,17 @@ ReadFormData(JSContext* aCx,
 
         RefPtr<Blob> blob =
           Blob::Create(aHolder->ParentDuringRead(), blobImpl);
         MOZ_ASSERT(blob);
 
         ErrorResult rv;
         formData->Append(name, *blob, thirdArg, rv);
         if (NS_WARN_IF(rv.Failed())) {
+          rv.SuppressException();
           return nullptr;
         }
 
       } else {
         MOZ_ASSERT(tag == 0);
 
         nsAutoString value;
         value.SetLength(indexOrLengthOfString);
@@ -915,16 +916,17 @@ ReadFormData(JSContext* aCx,
         if (!JS_ReadBytes(aReader, (void*) value.BeginWriting(),
                           indexOrLengthOfString * charSize)) {
           return nullptr;
         }
 
         ErrorResult rv;
         formData->Append(name, value, rv);
         if (NS_WARN_IF(rv.Failed())) {
+          rv.SuppressException();
           return nullptr;
         }
       }
     }
 
     if (!ToJSValue(aCx, formData, &val)) {
       return nullptr;
     }
@@ -1120,16 +1122,17 @@ StructuredCloneHolder::CustomReadTransfe
     const MessagePortIdentifier& portIdentifier = mPortIdentifiers[aExtraData];
 
     nsCOMPtr<nsIGlobalObject> global = do_QueryInterface(mParent);
 
     ErrorResult rv;
     RefPtr<MessagePort> port =
       MessagePort::Create(global, portIdentifier, rv);
     if (NS_WARN_IF(rv.Failed())) {
+      rv.SuppressException();
       return false;
     }
 
     mTransferredPorts.AppendElement(port);
 
     JS::Rooted<JS::Value> value(aCx);
     if (!GetOrCreateDOMReflector(aCx, port, &value)) {
       JS_ClearPendingException(aCx);