diff options
Diffstat (limited to 'www/waterfox/files/patch-bug1450688')
-rw-r--r-- | www/waterfox/files/patch-bug1450688 | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/www/waterfox/files/patch-bug1450688 b/www/waterfox/files/patch-bug1450688 new file mode 100644 index 000000000000..399611798c61 --- /dev/null +++ b/www/waterfox/files/patch-bug1450688 @@ -0,0 +1,37 @@ +commit 1a52ecbef0ba +Author: Kris Maglione <maglione.k@gmail.com> +Date: Tue May 15 16:01:36 2018 -0700 + + Bug 1450688 r=bz + + MozReview-Commit-ID: 4KHNpxiziWd + + --HG-- + extra : rebase_source : a6f61c63b4a806bd099b63b3bcaa31e014163ad4 +--- + dom/xbl/nsXBLBinding.cpp | 12 +++++++++++- + 1 file changed, 11 insertions(+), 1 deletion(-) + +diff --git dom/xbl/nsXBLBinding.cpp dom/xbl/nsXBLBinding.cpp +index 01360088ced1f..76ad62d2b55ef 100644 +--- dom/xbl/nsXBLBinding.cpp ++++ dom/xbl/nsXBLBinding.cpp +@@ -963,7 +963,17 @@ nsXBLBinding::DoInitJSClass(JSContext *cx, + NS_ENSURE_TRUE(xblScope, NS_ERROR_UNEXPECTED); + + JS::Rooted<JSObject*> parent_proto(cx); +- if (!JS_GetPrototype(cx, obj, &parent_proto)) { ++ { ++ JS::RootedObject wrapped(cx, obj); ++ JSAutoCompartment ac(cx, xblScope); ++ if (!JS_WrapObject(cx, &wrapped)) { ++ return NS_ERROR_FAILURE; ++ } ++ if (!JS_GetPrototype(cx, wrapped, &parent_proto)) { ++ return NS_ERROR_FAILURE; ++ } ++ } ++ if (!JS_WrapObject(cx, &parent_proto)) { + return NS_ERROR_FAILURE; + } + |