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
--- 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;