summaryrefslogtreecommitdiffstats
path: root/js/xpconnect/src/XPCWrappedNative.cpp
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@gmail.com>2018-04-29 13:39:11 +0200
committerwolfbeast <mcwerewolf@gmail.com>2018-04-29 13:39:11 +0200
commit66aa6b595c47231958a855e4b166f5d55df1184d (patch)
tree6be9ba956bd1651cf23d35eff2ae51058d65d813 /js/xpconnect/src/XPCWrappedNative.cpp
parent927868e8b93f508fe89ee82f618f4a1761366f70 (diff)
downloadUXP-66aa6b595c47231958a855e4b166f5d55df1184d.tar
UXP-66aa6b595c47231958a855e4b166f5d55df1184d.tar.gz
UXP-66aa6b595c47231958a855e4b166f5d55df1184d.tar.lz
UXP-66aa6b595c47231958a855e4b166f5d55df1184d.tar.xz
UXP-66aa6b595c47231958a855e4b166f5d55df1184d.zip
Bug 1411415.
Diffstat (limited to 'js/xpconnect/src/XPCWrappedNative.cpp')
-rw-r--r--js/xpconnect/src/XPCWrappedNative.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/js/xpconnect/src/XPCWrappedNative.cpp b/js/xpconnect/src/XPCWrappedNative.cpp
index acf92f3c3..a12e36baa 100644
--- a/js/xpconnect/src/XPCWrappedNative.cpp
+++ b/js/xpconnect/src/XPCWrappedNative.cpp
@@ -1785,9 +1785,12 @@ CallMethodHelper::ConvertIndependentParam(uint8_t i)
// indirectly, regardless of in/out-ness.
if (type_tag == nsXPTType::T_JSVAL) {
// Root the value.
- dp->val.j.setUndefined();
- if (!js::AddRawValueRoot(mCallContext, &dp->val.j, "XPCWrappedNative::CallMethod param"))
+ dp->val.j.asValueRef().setUndefined();
+ if (!js::AddRawValueRoot(mCallContext, &dp->val.j.asValueRef(),
+ "XPCWrappedNative::CallMethod param"))
+ {
return false;
+ }
}
// Flag cleanup for anything that isn't self-contained.