Bug 693469 - Use mozilla::ArrayLength and mozilla::ArrayEnd in preference to JS_ARRAY_LENGTH whenever possible. r=cjones
This commit is contained in:
@@ -42,6 +42,9 @@
|
||||
* JavaScript iterators.
|
||||
*/
|
||||
#include <string.h> /* for memcpy */
|
||||
|
||||
#include "mozilla/Util.h"
|
||||
|
||||
#include "jstypes.h"
|
||||
#include "jsstdint.h"
|
||||
#include "jsutil.h"
|
||||
@@ -79,6 +82,7 @@
|
||||
#include "vm/Stack-inl.h"
|
||||
#include "vm/String-inl.h"
|
||||
|
||||
using namespace mozilla;
|
||||
using namespace js;
|
||||
using namespace js::gc;
|
||||
|
||||
@@ -160,7 +164,7 @@ static inline bool
|
||||
NewKeyValuePair(JSContext *cx, jsid id, const Value &val, Value *rval)
|
||||
{
|
||||
Value vec[2] = { IdToValue(id), val };
|
||||
AutoArrayRooter tvr(cx, JS_ARRAY_LENGTH(vec), vec);
|
||||
AutoArrayRooter tvr(cx, ArrayLength(vec), vec);
|
||||
|
||||
JSObject *aobj = NewDenseCopiedArray(cx, 2, vec);
|
||||
if (!aobj)
|
||||
|
||||
Reference in New Issue
Block a user