summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwin7-7 <win7-7@users.noreply.github.com>2019-04-29 12:05:03 +0300
committerGitHub <noreply@github.com>2019-04-29 12:05:03 +0300
commitbb1fad0fa728c7e95c6e06dfae63254b2c2e2966 (patch)
treef133910dcf27a89f888cbfcd9b3ac717d090f960
parent2cb4d2ee571b91ec2480d2fba17e600a3843ddba (diff)
downloadUXP-bb1fad0fa728c7e95c6e06dfae63254b2c2e2966.tar
UXP-bb1fad0fa728c7e95c6e06dfae63254b2c2e2966.tar.gz
UXP-bb1fad0fa728c7e95c6e06dfae63254b2c2e2966.tar.lz
UXP-bb1fad0fa728c7e95c6e06dfae63254b2c2e2966.tar.xz
UXP-bb1fad0fa728c7e95c6e06dfae63254b2c2e2966.zip
Improve dead compartment collection js/src/builtin
-rw-r--r--js/src/builtin/TypedObject.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/js/src/builtin/TypedObject.cpp b/js/src/builtin/TypedObject.cpp
index ae74f01bf..95704ee46 100644
--- a/js/src/builtin/TypedObject.cpp
+++ b/js/src/builtin/TypedObject.cpp
@@ -652,7 +652,7 @@ ArrayMetaTypeDescr::create(JSContext* cx,
if (!CreateTraceList(cx, obj))
return nullptr;
- if (!cx->zone()->typeDescrObjects.put(obj)) {
+ if (!cx->zone()->addTypeDescrObject(cx, obj)) {
ReportOutOfMemory(cx);
return nullptr;
}
@@ -993,8 +993,8 @@ StructMetaTypeDescr::create(JSContext* cx,
if (!CreateTraceList(cx, descr))
return nullptr;
- if (!cx->zone()->typeDescrObjects.put(descr) ||
- !cx->zone()->typeDescrObjects.put(fieldTypeVec))
+ if (!cx->zone()->addTypeDescrObject(cx, descr) ||
+ !cx->zone()->addTypeDescrObject(cx, fieldTypeVec))
{
ReportOutOfMemory(cx);
return nullptr;
@@ -1165,10 +1165,8 @@ DefineSimpleTypeDescr(JSContext* cx,
if (!CreateTraceList(cx, descr))
return false;
- if (!cx->zone()->typeDescrObjects.put(descr)) {
- ReportOutOfMemory(cx);
+ if (!cx->zone()->addTypeDescrObject(cx, descr))
return false;
- }
return true;
}
@@ -3005,4 +3003,4 @@ TypeDescr::finalize(FreeOp* fop, JSObject* obj)
TypeDescr& descr = obj->as<TypeDescr>();
if (descr.hasTraceList())
js_free(const_cast<int32_t*>(descr.traceList()));
-}
+} \ No newline at end of file