Bug 1493121 - Remove unnecessary use of `wrappedJSObject` in JsAccount's factory. r=jorgk
authorNeil Rashbrook <neil@parkwaycc.co.uk>
Fri, 21 Sep 2018 04:16:00 +0200
changeset 33201 940a5071df8dd65f49e030887b1f61924e65769b
parent 33200 bdd596274fb1216de1d694dd583d0aaf82ae462c
child 33202 ec9dbe9537afa761d25a60365707f38de7eaa447
push id387
push userclokep@gmail.com
push dateMon, 10 Dec 2018 21:30:47 +0000
reviewersjorgk
bugs1493121
Bug 1493121 - Remove unnecessary use of `wrappedJSObject` in JsAccount's factory. r=jorgk
mailnews/jsaccount/modules/JSAccountUtils.jsm
--- a/mailnews/jsaccount/modules/JSAccountUtils.jsm
+++ b/mailnews/jsaccount/modules/JSAccountUtils.jsm
@@ -114,17 +114,17 @@ JSAccountUtils.jaFactory = function (aPr
       delegator.methodsToDelegate = delegateList;
     } else {
       // Lazily create and populate the list of methods to delegate.
       log.info("creating delegate list for contractID " + aProperties.contractID);
       let delegateList = delegator.methodsToDelegate;
       Object.keys(delegator).forEach(name => {log.debug("delegator has key " + name);});
 
       // jsMethods contains the methods that may be targets of the C++ delegation to JS.
-      let jsMethods = Object.getPrototypeOf(delegator.jsDelegate.wrappedJSObject);
+      let jsMethods = Object.getPrototypeOf(jsDelegate);
       for (let name in jsMethods)
       {
         log.debug("processing jsDelegate method: " + name);
         if (name[0] == '_') { // don't bother with methods explicitly marked as internal.
           log.debug("skipping " + name);
           continue;
         }
         // Other methods to skip.