Bug 1908539 restrict MacOS platform audio processing to Nightly r=webrtc-reviewers...
[gecko.git] / dom / base / nsDOMJSUtils.h
blobbf859afa7b0b0d1476f88a2f3f0532681822481a
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef nsDOMJSUtils_h__
8 #define nsDOMJSUtils_h__
10 #include "js/TypeDecls.h"
11 #include "nscore.h"
13 class nsIJSArgArray;
15 // A factory function for turning a JS::Value argv into an nsIArray
16 // but also supports an effecient way of extracting the original argv.
17 // The resulting object will take a copy of the array, and ensure each
18 // element is rooted.
19 // Optionally, aArgv may be nullptr, in which case the array is allocated and
20 // rooted, but all items remain nullptr. This presumably means the caller
21 // will then QI us for nsIJSArgArray, and set our array elements.
22 nsresult NS_CreateJSArgv(JSContext* aContext, uint32_t aArgc,
23 const JS::Value* aArgv, nsIJSArgArray** aArray);
25 #endif // nsDOMJSUtils_h__