Bug 1461938 part 17 - Move ArraySpeciesLookup from JSCompartment to JS::Realm. r=anba

This commit is contained in:
Jan de Mooij 2018-05-23 11:02:38 +02:00
Родитель f8a5dcdebc
Коммит 8cf14a4dc0
3 изменённых файлов: 2 добавлений и 4 удалений

Просмотреть файл

@ -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;