зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1191099 - Replace AutoFunctionVector usage with Rooted; r=jonco
--HG-- extra : rebase_source : e391f78394c02a50b8dd5c2163c0ab84e5f06733
This commit is contained in:
Родитель
a606a3d701
Коммит
1b577f8a20
|
@ -13,6 +13,7 @@
|
|||
// These includes are needed these for some typedefs (e.g. HandleValue) and
|
||||
// functions (e.g. NullValue())...
|
||||
#include "js/CallNonGenericMethod.h"
|
||||
#include "js/TraceableVector.h"
|
||||
#include "js/TypeDecls.h"
|
||||
#include "js/Value.h"
|
||||
|
||||
|
@ -33,7 +34,6 @@ class AutoVectorRooter;
|
|||
typedef AutoVectorRooter<Value> AutoValueVector;
|
||||
typedef AutoVectorRooter<jsid> AutoIdVector;
|
||||
typedef AutoVectorRooter<JSObject*> AutoObjectVector;
|
||||
typedef AutoVectorRooter<JSFunction*> AutoFunctionVector;
|
||||
typedef AutoVectorRooter<JSScript*> AutoVector;
|
||||
|
||||
class AutoIdArray;
|
||||
|
@ -81,9 +81,12 @@ using JS::AutoVectorRooter;
|
|||
typedef AutoVectorRooter<Value> AutoValueVector;
|
||||
typedef AutoVectorRooter<jsid> AutoIdVector;
|
||||
typedef AutoVectorRooter<JSObject*> AutoObjectVector;
|
||||
typedef AutoVectorRooter<JSFunction*> AutoFunctionVector;
|
||||
typedef AutoVectorRooter<JSScript*> AutoScriptVector;
|
||||
|
||||
using ValueVector = TraceableVector<JS::Value>;
|
||||
using IdVector = TraceableVector<jsid>;
|
||||
using ScriptVector = TraceableVector<JSScript*>;
|
||||
|
||||
using JS::AutoIdArray;
|
||||
|
||||
using JS::AutoHashMapRooter;
|
||||
|
|
|
@ -227,7 +227,7 @@ struct MOZ_STACK_CLASS ParseContext : public GenericParseContext
|
|||
the same name. */
|
||||
|
||||
// All inner functions in this context. Only filled in when parsing syntax.
|
||||
AutoFunctionVector innerFunctions;
|
||||
Rooted<TraceableVector<JSFunction*>> innerFunctions;
|
||||
|
||||
// In a function context, points to a Directive struct that can be updated
|
||||
// to reflect new directives encountered in the Directive Prologue that
|
||||
|
@ -265,7 +265,7 @@ struct MOZ_STACK_CLASS ParseContext : public GenericParseContext
|
|||
oldpc(prs->pc),
|
||||
lexdeps(prs->context),
|
||||
funcStmts(nullptr),
|
||||
innerFunctions(prs->context),
|
||||
innerFunctions(prs->context, TraceableVector<JSFunction*>(prs->context)),
|
||||
newDirectives(newDirectives),
|
||||
inDeclDestructuring(false)
|
||||
{
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
#include "js/Id.h"
|
||||
#include "js/Principals.h"
|
||||
#include "js/RootingAPI.h"
|
||||
#include "js/TraceableVector.h"
|
||||
#include "js/TracingAPI.h"
|
||||
#include "js/Utility.h"
|
||||
#include "js/Value.h"
|
||||
|
@ -215,9 +216,12 @@ class MOZ_STACK_CLASS AutoVectorRooter : public AutoVectorRooterBase<T>
|
|||
typedef AutoVectorRooter<Value> AutoValueVector;
|
||||
typedef AutoVectorRooter<jsid> AutoIdVector;
|
||||
typedef AutoVectorRooter<JSObject*> AutoObjectVector;
|
||||
typedef AutoVectorRooter<JSFunction*> AutoFunctionVector;
|
||||
typedef AutoVectorRooter<JSScript*> AutoScriptVector;
|
||||
|
||||
using ValueVector = js::TraceableVector<JS::Value>;
|
||||
using IdVector = js::TraceableVector<jsid>;
|
||||
using ScriptVector = js::TraceableVector<JSScript*>;
|
||||
|
||||
template<class Key, class Value>
|
||||
class AutoHashMapRooter : protected AutoGCRooter
|
||||
{
|
||||
|
|
Загрузка…
Ссылка в новой задаче