diff options
author | Mark Benvenuto <mark.benvenuto@mongodb.com> | 2016-04-21 10:41:26 -0400 |
---|---|---|
committer | Mark Benvenuto <mark.benvenuto@mongodb.com> | 2016-04-21 10:51:49 -0400 |
commit | 6abef94a017f6140f1cd222587bb101c1b8ceda1 (patch) | |
tree | 334b5025cb1a6abfd0d61f5b0d6d478dbe948b30 /src/mongo/scripting/mozjs/objectwrapper.h | |
parent | 9d496edb004f1782ca4f8998eab6327e5cc0e3c8 (diff) | |
download | mongo-6abef94a017f6140f1cd222587bb101c1b8ceda1.tar.gz |
SERVER-23358 SpiderMonkey 45.0.2 ESR MongoDB & Build Integration
Diffstat (limited to 'src/mongo/scripting/mozjs/objectwrapper.h')
-rw-r--r-- | src/mongo/scripting/mozjs/objectwrapper.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mongo/scripting/mozjs/objectwrapper.h b/src/mongo/scripting/mozjs/objectwrapper.h index 42be21ff36f..8c85a5b42d1 100644 --- a/src/mongo/scripting/mozjs/objectwrapper.h +++ b/src/mongo/scripting/mozjs/objectwrapper.h @@ -147,9 +147,9 @@ public: */ template <typename T> void enumerate(T&& callback) { - JS::AutoIdArray ids(_context, JS_Enumerate(_context, _object)); + JS::Rooted<JS::IdVector> ids(_context, JS::IdVector(_context)); - if (!ids) + if (!JS_Enumerate(_context, _object, &ids)) throwCurrentJSException( _context, ErrorCodes::JSInterpreterFailure, "Failure to enumerate object"); @@ -198,7 +198,7 @@ private: JS::RootedObject thisv; // ids for the keys of thisv - JS::AutoIdArray ids; + JS::Rooted<JS::IdVector> ids; // Current index of the current key we're working on std::size_t idx = 0; |