Reviewers: ,

Description:
There's a few times isDefinedInCajaFrame is called more than once in a
method.


##e Reviewer:
[email protected]

Please review this at http://codereview.appspot.com/4547057/

Affected files:
  M     src/com/google/caja/es53.js


Index: src/com/google/caja/es53.js
===================================================================
--- src/com/google/caja/es53.js (revision 4479)
+++ src/com/google/caja/es53.js (working copy)
@@ -834,9 +834,6 @@
     if (f.TAMED_TWIN___) {
       throw new TypeError('Already tamed: ' + f);
     }
-    if (isDefinedInCajaFrame(f)) {
-      throw new TypeError('Cannot tame a Caja object: ' + f);
-    }
     var t = tamePureFunction(f);
     tamesTo(f, t);
     return f;
@@ -849,9 +846,6 @@
     if (ctor.TAMED_TWIN___) {
       throw new TypeError('Already tamed: ' + ctor);
     }
-    if (isDefinedInCajaFrame(ctor)) {
-      throw new TypeError('Cannot tame a Caja object: ' + ctor);
-    }
     var ctype = typeof ctor;
     var stype = typeof opt_super;
     if (ctype !== 'function') {
@@ -875,9 +869,6 @@
     if ((typeof f) !== 'function') {
       throw new TypeError('Not a function: ' + f);
     }
-    if (isDefinedInCajaFrame(f)) {
-      throw new TypeError('Cannot tame a Caja object: ' + f);
-    }
     var t = tameXo4a(f);
     tamesTo(f, t);
     return f;


Reply via email to