diff --git a/dom/crypto/WebCryptoTask.cpp b/dom/crypto/WebCryptoTask.cpp index 1b0936f4f23a..26e604b1f0a3 100644 --- a/dom/crypto/WebCryptoTask.cpp +++ b/dom/crypto/WebCryptoTask.cpp @@ -1962,7 +1962,9 @@ private: if (!mKeyUsages.IsEmpty()) { mJwk.mKey_ops.Construct(); - mJwk.mKey_ops.Value().AppendElements(mKeyUsages); + if (!mJwk.mKey_ops.Value().AppendElements(mKeyUsages)) { + return NS_ERROR_OUT_OF_MEMORY; + } } return NS_OK;