summaryrefslogtreecommitdiffstats
path: root/js/xpconnect/src
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@gmail.com>2018-04-11 17:45:54 +0200
committerwolfbeast <mcwerewolf@gmail.com>2018-04-11 17:45:54 +0200
commit597fb9fbe387378185431e1900ebe6f05ca09fbf (patch)
tree6adbe3cfb37ec4fca51003633bea9334f4822be5 /js/xpconnect/src
parenteac3e641110ce26cae69a53bb5920c6d725392ec (diff)
parentac05ab923af8bc5b0c077fe3a271492af19dbea8 (diff)
downloadUXP-597fb9fbe387378185431e1900ebe6f05ca09fbf.tar
UXP-597fb9fbe387378185431e1900ebe6f05ca09fbf.tar.gz
UXP-597fb9fbe387378185431e1900ebe6f05ca09fbf.tar.lz
UXP-597fb9fbe387378185431e1900ebe6f05ca09fbf.tar.xz
UXP-597fb9fbe387378185431e1900ebe6f05ca09fbf.zip
Rebase on master
Diffstat (limited to 'js/xpconnect/src')
-rw-r--r--js/xpconnect/src/XPCVariant.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/js/xpconnect/src/XPCVariant.cpp b/js/xpconnect/src/XPCVariant.cpp
index a3d2b88c5..4c1230172 100644
--- a/js/xpconnect/src/XPCVariant.cpp
+++ b/js/xpconnect/src/XPCVariant.cpp
@@ -55,7 +55,7 @@ XPCTraceableVariant::~XPCTraceableVariant()
{
Value val = GetJSValPreserveColor();
- MOZ_ASSERT(val.isGCThing(), "Must be traceable or unlinked");
+ MOZ_ASSERT(val.isGCThing() || val.isNull(), "Must be traceable or unlinked");
mData.Cleanup();
@@ -65,7 +65,7 @@ XPCTraceableVariant::~XPCTraceableVariant()
void XPCTraceableVariant::TraceJS(JSTracer* trc)
{
- MOZ_ASSERT(GetJSValPreserveColor().isMarkable());
+ MOZ_ASSERT(GetJSValPreserveColor().isGCThing());
JS::TraceEdge(trc, &mJSVal, "XPCTraceableVariant::mJSVal");
}
@@ -86,7 +86,7 @@ NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(XPCVariant)
tmp->mData.Cleanup();
- if (val.isMarkable()) {
+ if (val.isGCThing()) {
XPCTraceableVariant* v = static_cast<XPCTraceableVariant*>(tmp);
v->RemoveFromRootSet();
}
@@ -99,7 +99,7 @@ XPCVariant::newVariant(JSContext* cx, const Value& aJSVal)
{
RefPtr<XPCVariant> variant;
- if (!aJSVal.isMarkable())
+ if (!aJSVal.isGCThing())
variant = new XPCVariant(cx, aJSVal);
else
variant = new XPCTraceableVariant(cx, aJSVal);