(obj, fullExpression)
| 12389 | } |
| 12390 | |
| 12391 | function ensureSafeObject(obj, fullExpression) { |
| 12392 | // nifty check if obj is Function that is fast and works across iframes and other contexts |
| 12393 | if (obj) { |
| 12394 | if (obj.constructor === obj) { |
| 12395 | throw $parseMinErr('isecfn', |
| 12396 | 'Referencing Function in Angular expressions is disallowed! Expression: {0}', |
| 12397 | fullExpression); |
| 12398 | } else if (// isWindow(obj) |
| 12399 | obj.window === obj) { |
| 12400 | throw $parseMinErr('isecwindow', |
| 12401 | 'Referencing the Window in Angular expressions is disallowed! Expression: {0}', |
| 12402 | fullExpression); |
| 12403 | } else if (// isElement(obj) |
| 12404 | obj.children && (obj.nodeName || (obj.prop && obj.attr && obj.find))) { |
| 12405 | throw $parseMinErr('isecdom', |
| 12406 | 'Referencing DOM nodes in Angular expressions is disallowed! Expression: {0}', |
| 12407 | fullExpression); |
| 12408 | } else if (// block Object so that we can't get hold of dangerous Object.* methods |
| 12409 | obj === Object) { |
| 12410 | throw $parseMinErr('isecobj', |
| 12411 | 'Referencing Object in Angular expressions is disallowed! Expression: {0}', |
| 12412 | fullExpression); |
| 12413 | } |
| 12414 | } |
| 12415 | return obj; |
| 12416 | } |
| 12417 | |
| 12418 | var CALL = Function.prototype.call; |
| 12419 | var APPLY = Function.prototype.apply; |
no outgoing calls
no test coverage detected