зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1461938 part 17 - Move ArraySpeciesLookup from JSCompartment to JS::Realm. r=anba
This commit is contained in:
Родитель
f8a5dcdebc
Коммит
8cf14a4dc0
|
@ -1088,7 +1088,7 @@ IsArraySpecies(JSContext* cx, HandleObject origArray)
|
|||
if (!origArray->is<ArrayObject>())
|
||||
return true;
|
||||
|
||||
if (cx->compartment()->arraySpeciesLookup.tryOptimizeArray(cx, &origArray->as<ArrayObject>()))
|
||||
if (cx->realm()->arraySpeciesLookup.tryOptimizeArray(cx, &origArray->as<ArrayObject>()))
|
||||
return true;
|
||||
|
||||
Value ctor;
|
||||
|
|
|
@ -50,7 +50,6 @@ JSCompartment::JSCompartment(Zone* zone)
|
|||
performanceMonitoring(runtime_),
|
||||
data(nullptr),
|
||||
regExps(),
|
||||
arraySpeciesLookup(),
|
||||
globalWriteBarriered(0),
|
||||
detachedTypedObjects(0),
|
||||
objectMetadataState(ImmediateMetadata()),
|
||||
|
|
|
@ -645,8 +645,6 @@ struct JSCompartment
|
|||
public:
|
||||
js::RegExpCompartment regExps;
|
||||
|
||||
js::ArraySpeciesLookup arraySpeciesLookup;
|
||||
|
||||
using IteratorCache = js::HashSet<js::PropertyIteratorObject*,
|
||||
js::IteratorHashPolicy,
|
||||
js::SystemAllocPolicy>;
|
||||
|
@ -1056,6 +1054,7 @@ class JS::Realm : public JSCompartment
|
|||
|
||||
js::DtoaCache dtoaCache;
|
||||
js::NewProxyCache newProxyCache;
|
||||
js::ArraySpeciesLookup arraySpeciesLookup;
|
||||
|
||||
js::ScriptCountsMap* scriptCountsMap = nullptr;
|
||||
js::ScriptNameMap* scriptNameMap = nullptr;
|
||||
|
|
Загрузка…
Ссылка в новой задаче