Bug 1118489 - Invoke Proxy constructor with 'new' to avoid soon-to-be TypeError. (r=philipp, a=rkent)
authorEric Faust <efaustbmo@gmail.com>
Tue, 06 Jan 2015 15:50:55 -0800
changeset 21592 4767a4d1c1999011b3681e4116e57c7219821243
parent 21591 73adfa7f6c270277a17002bf42193ec44619b400
child 21593 d98f854e12666aba91f48e328737c8375b96111f
push id1305
push usermbanner@mozilla.com
push dateMon, 23 Feb 2015 19:48:12 +0000
treeherdercomm-beta@3ae4f13858fd [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersphilipp, rkent
bugs1118489
Bug 1118489 - Invoke Proxy constructor with 'new' to avoid soon-to-be TypeError. (r=philipp, a=rkent)
calendar/base/modules/calAsyncUtils.jsm
--- a/calendar/base/modules/calAsyncUtils.jsm
+++ b/calendar/base/modules/calAsyncUtils.jsm
@@ -62,17 +62,17 @@ cal.async = {
      * Bonus methods in addition:
      *   pcal.getAllItems()  // alias for getItems without any filters
      *
      * IMPORTANT: Don't pass this around thinking its like an xpcom calICalendar,
      * otherwise code might indefinitely wait for the listener to return or there
      * will be complaints that an argument is missing.
      */
     promisifyCalendar: function(aCalendar) {
-        return Proxy(aCalendar, promisifyProxyHandler);
+        return new Proxy(aCalendar, promisifyProxyHandler);
     },
     /**
      * Create an operation listener (calIOperationListener) that resolves when
      * the operation succeeds. Note this listener will collect the items, so it
      * might not be a good idea in a situation where a lot of items will be
      * retrieved.
      *
      * Standalone Usage: