Revision: 5691
Author:   erights
Date:     Fri Aug 15 19:38:48 2014 UTC
Log:      Stop calling "new WeakMap(true)" as that is not correct ES6.
https://codereview.appspot.com/130750044

Fixes https://code.google.com/p/google-caja/issues/detail?id=1932

[email protected]

http://code.google.com/p/google-caja/source/detail?r=5691

Modified:
 /trunk/src/com/google/caja/plugin/domado.js
 /trunk/src/com/google/caja/ses/ejectorsGuardsTrademarks.js
 /trunk/src/com/google/caja/ses-promise.js

=======================================
--- /trunk/src/com/google/caja/plugin/domado.js Fri May 16 16:33:03 2014 UTC
+++ /trunk/src/com/google/caja/plugin/domado.js Fri Aug 15 19:38:48 2014 UTC
@@ -1301,7 +1301,7 @@

     // TODO(kpreid): This ID management should probably be handled by
     // ses-single-frame.js instead.
-    var importsToId = new WeakMap(true);
+    var importsToId = new WeakMap();
     var idToImports = [];
     var nextPluginId = 0;
     function getId(imports) {
=======================================
--- /trunk/src/com/google/caja/ses/ejectorsGuardsTrademarks.js Fri Aug 15 19:36:54 2014 UTC +++ /trunk/src/com/google/caja/ses/ejectorsGuardsTrademarks.js Fri Aug 15 19:38:48 2014 UTC
@@ -160,7 +160,7 @@
////////////////////////////////////////////////////////////////////////

     function makeSealerUnsealerPair() {
-      var boxValues = new WeakMap(true); // use key lifetime
+      var boxValues = new WeakMap();

       function seal(value) {
         var box = freeze({});
@@ -190,7 +190,7 @@
     // Trademarks
////////////////////////////////////////////////////////////////////////

-    var stampers = new WeakMap(true);
+    var stampers = new WeakMap();

     /**
      * Internal routine for making a trademark from a table.
=======================================
--- /trunk/src/com/google/caja/ses-promise.js   Tue Jun  5 22:50:03 2012 UTC
+++ /trunk/src/com/google/caja/ses-promise.js   Fri Aug 15 19:38:48 2014 UTC
@@ -23,7 +23,7 @@
   "use strict";

   // Table of functions-which-are-promises
-  var promises = new WeakMap(true);
+  var promises = new WeakMap();

   function reject(reason) {
     function rejected(op, arg1, arg2, arg3) {
@@ -88,7 +88,7 @@
     promises.set(fulfilled, true);
     return fulfilled;
   }
-
+
   var enqueue = (function () {
     var active = false;
     var pending = [];
@@ -109,7 +109,7 @@
       }
     };
   }());
-
+
   /**
    * Enqueues a promise operation.
    *

--

--- You received this message because you are subscribed to the Google Groups "Google Caja Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to