Delete dondraper and j/c/[] projects and their dependencies.
Those are no longer maintained, no point keeping obsolete projects in the code base.
@@ -1940,14 +1940,14 @@ goog.dom.asserts = {};
goog.dom.asserts.assertIsLocation = function(o) {
if (goog.asserts.ENABLE_ASSERTS) {
var win = goog.dom.asserts.getWindow_(o);
- "undefined" != typeof win.Location && "undefined" != typeof win.Element && (!o || !(o instanceof win.Location) && o instanceof win.Element) && goog.asserts.fail("Argument is not a Location (or a non-Element mock); got: %s", goog.dom.asserts.debugStringForType_(o));
+ win && (!o || !(o instanceof win.Location) && o instanceof win.Element) && goog.asserts.fail("Argument is not a Location (or a non-Element mock); got: %s", goog.dom.asserts.debugStringForType_(o));
}
return o;
};
goog.dom.asserts.assertIsElementType_ = function(o, typename) {
if (goog.asserts.ENABLE_ASSERTS) {
var win = goog.dom.asserts.getWindow_(o);
- "undefined" != typeof win[typename] && "undefined" != typeof win.Location && "undefined" != typeof win.Element && (o && (o instanceof win[typename] || !(o instanceof win.Location || o instanceof win.Element)) || goog.asserts.fail("Argument is not a %s (or a non-Element, non-Location mock); got: %s", typename, goog.dom.asserts.debugStringForType_(o)));
+ win && "undefined" != typeof win[typename] && (o && (o instanceof win[typename] || !(o instanceof win.Location || o instanceof win.Element)) || goog.asserts.fail("Argument is not a %s (or a non-Element, non-Location mock); got: %s", typename, goog.dom.asserts.debugStringForType_(o)));
}
return o;
};
@@ -2008,8 +2008,15 @@ goog.dom.asserts.debugStringForType_ = function(value) {
}
};
goog.dom.asserts.getWindow_ = function(o) {
- var doc = o && o.ownerDocument;
- return doc && (doc.defaultView || doc.parentWindow) || goog.global;
+ try {
+ var doc = o && o.ownerDocument, win = doc && (doc.defaultView || doc.parentWindow);
+ win = win || goog.global;
+ if (win.Element && win.Location) {
+ return win;
+ }
+ } catch (ex) {
+ }
+ return null;
};
goog.functions = {};
goog.functions.constant = function(retValue) {
