зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1350762 - Root weakMap while calling AllocWeakmapKeyObject and AllocPlainObject in testGCGrayMarking.cpp. r=jonco
This commit is contained in:
Родитель
2c1ef2038f
Коммит
2970c76a9c
|
@ -157,11 +157,19 @@ TestWeakMaps()
|
|||
JSObject* weakMap = JS::NewWeakMapObject(cx);
|
||||
CHECK(weakMap);
|
||||
|
||||
JSObject* key = AllocWeakmapKeyObject();
|
||||
CHECK(key);
|
||||
JSObject* key;
|
||||
JSObject* value;
|
||||
{
|
||||
JS::RootedObject rootedMap(cx, weakMap);
|
||||
|
||||
JSObject* value = AllocPlainObject();
|
||||
CHECK(value);
|
||||
key = AllocWeakmapKeyObject();
|
||||
CHECK(key);
|
||||
|
||||
value = AllocPlainObject();
|
||||
CHECK(value);
|
||||
|
||||
weakMap = rootedMap;
|
||||
}
|
||||
|
||||
{
|
||||
JS::RootedObject rootedMap(cx, weakMap);
|
||||
|
|
Загрузка…
Ссылка в новой задаче