Bug 1488908: Add setter op to HandlerApp proxy. rs=Gijs a=pascalc
authorKris Maglione <maglione.k@gmail.com>
Thu, 06 Sep 2018 16:21:08 -0700
changeset 492518 03508cc9a42b0114e1c0d9ad4cd145e42fe9b6df
parent 492517 e345bdb261ea1d816d1a890eb920ff4161f81318
child 492519 503cd479184519f50341493317e1aacf0d0d35ec
push id1815
push userffxbld-merge
push dateMon, 15 Oct 2018 10:40:45 +0000
treeherdermozilla-release@18d4c09e9378 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersGijs, pascalc
bugs1488908
milestone63.0
Bug 1488908: Add setter op to HandlerApp proxy. rs=Gijs a=pascalc In the past, these operations seem to have worked by accident, by somehow bypassing the proxy. But as things stand now, set operations set properties on the wrapped object rather than the proxy, causing them to be mostly ignored. Differential Revision: https://phabricator.services.mozilla.com/D5215
uriloader/exthandler/HandlerService.js
--- a/uriloader/exthandler/HandlerService.js
+++ b/uriloader/exthandler/HandlerService.js
@@ -208,16 +208,19 @@ HandlerService.prototype = {
             delete this._handlerInfo;
             return this._handlerInfo = gExternalProtocolService.getProtocolHandlerInfo(type);
           },
         },
         {
           get: function(target, name) {
             return target[name] || target._handlerInfo[name];
           },
+          set: function(target, name, value) {
+            target._handlerInfo[name] = value;
+          },
         },
       );
       handlers.appendElement(handler);
     }
     return handlers.enumerate(Ci.nsIHandlerInfo);
   },
 
   // nsIHandlerService