Revision: 5696
Author:   [email protected]
Date:     Fri Sep 19 22:00:17 2014 UTC
Log:      Backport to es53 branch: 5694,5695
https://codereview.appspot.com/143260044

All changes since the previous merge.

The merge command was
svn merge -c 5694,5695 ^/trunk
and there was one conflict:
test-scan-guest.js needed merging of the changes in r5695 to
WeakMap tests with the removed ES5/3 support.

[email protected]

https://code.google.com/p/google-caja/source/detail?r=5696

Modified:
 /branches/es53
 /branches/es53/tests/com/google/caja/plugin/test-scan-guest.js
 /branches/es53/third_party
 /branches/es53/third_party/java/webdriver/README
 /branches/es53/third_party/java/webdriver/VERSION
 /branches/es53/third_party/java/webdriver/selenium-standalone.jar

=======================================
--- /branches/es53/tests/com/google/caja/plugin/test-scan-guest.js Thu Jun 5 18:53:51 2014 UTC +++ /branches/es53/tests/com/google/caja/plugin/test-scan-guest.js Fri Sep 19 22:00:17 2014 UTC
@@ -935,30 +935,37 @@
       }
     }));

-    argsByIdentity(WeakMap, annotate(
-        freshResult(genAllCall()), function(context, thrown) {
+ // Some WeakMap shim impls are prototype based, some are closure based; we
+    // deal with both, as well as the real thing.
+    var genWeakMapKey = genJSONValue;
+    function annotateWeakMapInstance(obj) {
+      // known harmless implementation details leak.
+      expectedUnfrozen.setByIdentity(obj, true);
+      if (inES5Mode) {  // would fail on es53
+ argsByIdentity(obj['permitHostObjects___'], genMethod(G.value('x'))); + expectedAlwaysThrow.setByIdentity(obj['permitHostObjects___'], true);
+        argsByIdentity(obj['delete___'], genMethod(genWeakMapKey));
+        argsByIdentity(obj['get___'], genMethod(genWeakMapKey));
+        argsByIdentity(obj['set___'], genMethod(genWeakMapKey, genObject));
+        argsByIdentity(obj['has___'], genMethod(genWeakMapKey));
+      }
+
+      argsByIdentity(obj['delete'], genMethod(genWeakMapKey));
+      argsByIdentity(obj.get, genMethod(genWeakMapKey));
+      argsByIdentity(obj.set, genMethod(genWeakMapKey, genObject));
+      argsByIdentity(obj.has, genMethod(genWeakMapKey));
+      return obj;
+    }
+ argsByIdentity(WeakMap, annotate(genAllCall(), function(context, thrown) {
       if (!thrown) {
-        if (inES5Mode) {  // would fail on es53
-          // known harmless implementation details leak. TODO abuse anyway
-          argsByIdentity(context.get()['delete___'],
-              argsByIdentity(context.get()['get___'],
-              argsByIdentity(context.get()['has___'],
-              argsByIdentity(context.get()['set___'],
-              argsByIdentity(context.get()['permitHostObjects___'],
-              G.none)))));
-        }
-
-        argsByIdentity(context.get()['delete'], G.none); // TODO abuse
-        argsByIdentity(context.get().get, G.none); // TODO abuse
-        argsByIdentity(context.get().set, G.none); // TODO abuse
-        argsByIdentity(context.get().has, G.none); // TODO abuse
+        annotateWeakMapInstance(context.get());
       }
     }));
-    // some WeakMap impls are prototype based, some are closure based
-    argsByIdentity(WeakMap.prototype['delete'], G.none); // TODO abuse
-    argsByIdentity(WeakMap.prototype.get, G.none); // TODO abuse
-    argsByIdentity(WeakMap.prototype.set, G.none); // TODO abuse
-    argsByIdentity(WeakMap.prototype.has, G.none); // TODO abuse
+    obtainInstance.define(WeakMap, annotateWeakMapInstance(new WeakMap()));
+    argsByIdentity(WeakMap.prototype['delete'], genMethod(genWeakMapKey));
+    argsByIdentity(WeakMap.prototype.get, genMethod(genWeakMapKey));
+ argsByIdentity(WeakMap.prototype.set, genMethod(genWeakMapKey, genObject));
+    argsByIdentity(WeakMap.prototype.has, genMethod(genWeakMapKey));

     expectedAlwaysThrow.setByIdentity(
         getSetter(window, 'location'), true);
=======================================
--- /branches/es53/third_party/java/webdriver/README Fri Dec 27 23:44:32 2013 UTC +++ /branches/es53/third_party/java/webdriver/README Fri Sep 19 22:00:17 2014 UTC
@@ -1,2 +1,3 @@
 origin
- https://code.google.com/p/selenium/downloads/detail?name=selenium-server-standalone-2.39.0.jar + http://selenium-release.storage.googleapis.com/2.43/selenium-server-standalone-2.43.0.jar
+  from http://docs.seleniumhq.org/download/
=======================================
--- /branches/es53/third_party/java/webdriver/VERSION Fri Aug 23 17:52:44 2013 UTC +++ /branches/es53/third_party/java/webdriver/VERSION Fri Sep 19 22:00:17 2014 UTC
@@ -1,2 +1,2 @@
-Version: 2.35.0
-URL: https://code.google.com/p/selenium/downloads/detail?name=selenium-server-standalone-2.35.0.jar
+Version: 2.43.0
+URL: http://selenium-release.storage.googleapis.com/2.43/selenium-server-standalone-2.43.0.jar
=======================================
--- /branches/es53/third_party/java/webdriver/selenium-standalone.jar Fri Dec 27 23:44:32 2013 UTC +++ /branches/es53/third_party/java/webdriver/selenium-standalone.jar Fri Sep 19 22:00:17 2014 UTC
File is too large to display a diff.

--

--- 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