bug 1328964 restore null check for bug 1357503 r?jib draft
authorKarl Tomlinson <karlt+@karlt.net>
Fri, 16 Mar 2018 17:24:11 +1300
changeset 769216 64b42a345dcbe6b7c54fc83fb33cb912506e0111
parent 769215 ad28a55d4e1fbdfbd041b0da5111949759d5d14f
push id103070
push userktomlinson@mozilla.com
push dateMon, 19 Mar 2018 05:04:09 +0000
reviewersjib
bugs1328964, 1357503, 199430
milestone59.0a1
bug 1328964 restore null check for bug 1357503 r?jib Lost in rebase of part 3 across https://hg.mozilla.org/mozilla-central/rev/bbd8e6ecf4a0#l1.12 Addresses https://reviewboard.mozilla.org/r/199430/#review233764 MozReview-Commit-ID: 24gT8YkLqy6
dom/console/Console.cpp
--- a/dom/console/Console.cpp
+++ b/dom/console/Console.cpp
@@ -515,16 +515,19 @@ protected:
     mClonedData.mParent = nullptr;
 
     if (!ok) {
       return;
     }
 
     MOZ_ASSERT(argumentsValue.isObject());
     JS::Rooted<JSObject*> argumentsObj(aCx, &argumentsValue.toObject());
+    if (NS_WARN_IF(!argumentsObj)) {
+      return;
+    }
 
     uint32_t length;
     if (!JS_GetArrayLength(aCx, argumentsObj, &length)) {
       return;
     }
 
     Sequence<JS::Value> arguments;