mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1191099 - Replace AutoFunctionVector usage with Rooted; r=jonco
This commit is contained in:
parent
b0a16edace
commit
c63f96f6f6
@ -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,13 @@ 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 ObjectVector = TraceableVector<JSObject*>;
|
||||
using ScriptVector = TraceableVector<JSScript*>;
|
||||
|
||||
using JS::AutoIdArray;
|
||||
|
||||
using JS::AutoHashMapRooter;
|
||||
|
@ -232,7 +232,7 @@ struct 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
|
||||
@ -273,7 +273,7 @@ struct 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)
|
||||
{
|
||||
|
@ -28,6 +28,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"
|
||||
@ -214,9 +215,13 @@ 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 ObjectVector = js::TraceableVector<JSObject*>;
|
||||
using ScriptVector = js::TraceableVector<JSScript*>;
|
||||
|
||||
template<class Key, class Value>
|
||||
class AutoHashMapRooter : protected AutoGCRooter
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user