[X2Go-Commits] [pale-moon] 07/22: Add a nullcheck in DOMProxyHandler::EnsureExpandoObject

git-admin at x2go.org git-admin at x2go.org
Sat Sep 29 03:25:21 CEST 2018


This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to branch upstream/palemoon-master
in repository pale-moon.

commit dea50cbf6aca6d22f6c56d1acc616a5f0e087b53
Author: Pale Moon <git-repo at palemoon.org>
Date:   Sun Jun 10 01:53:05 2018 +0200

    Add a nullcheck in DOMProxyHandler::EnsureExpandoObject
---
 dom/bindings/DOMJSProxyHandler.cpp | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/dom/bindings/DOMJSProxyHandler.cpp b/dom/bindings/DOMJSProxyHandler.cpp
index f0ebf43..e121ff6 100644
--- a/dom/bindings/DOMJSProxyHandler.cpp
+++ b/dom/bindings/DOMJSProxyHandler.cpp
@@ -121,6 +121,10 @@ DOMProxyHandler::EnsureExpandoObject(JSContext* cx, JS::Handle<JSObject*> obj)
   nsISupports* native = UnwrapDOMObject<nsISupports>(obj);
   nsWrapperCache* cache;
   CallQueryInterface(native, &cache);
+  if (!cache) {
+    return expando;
+  }
+
   if (expandoAndGeneration) {
     cache->PreserveWrapper(native);
     expandoAndGeneration->expando.setObject(*expando);

--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/pale-moon.git


More information about the x2go-commits mailing list