(obj, fullExpression)
| 10229 | } |
| 10230 | |
| 10231 | function ensureSafeObject(obj, fullExpression) { |
| 10232 | // nifty check if obj is Function that is fast and works across iframes and other contexts |
| 10233 | if (obj) { |
| 10234 | if (obj.constructor === obj) { |
| 10235 | throw $parseMinErr('isecfn', |
| 10236 | 'Referencing Function in Angular expressions is disallowed! Expression: {0}', |
| 10237 | fullExpression); |
| 10238 | } else if (// isWindow(obj) |
| 10239 | obj.document && obj.location && obj.alert && obj.setInterval) { |
| 10240 | throw $parseMinErr('isecwindow', |
| 10241 | 'Referencing the Window in Angular expressions is disallowed! Expression: {0}', |
| 10242 | fullExpression); |
| 10243 | } else if (// isElement(obj) |
| 10244 | obj.children && (obj.nodeName || (obj.prop && obj.attr && obj.find))) { |
| 10245 | throw $parseMinErr('isecdom', |
| 10246 | 'Referencing DOM nodes in Angular expressions is disallowed! Expression: {0}', |
| 10247 | fullExpression); |
| 10248 | } else if (// block Object so that we can't get hold of dangerous Object.* methods |
| 10249 | obj === Object) { |
| 10250 | throw $parseMinErr('isecobj', |
| 10251 | 'Referencing Object in Angular expressions is disallowed! Expression: {0}', |
| 10252 | fullExpression); |
| 10253 | } |
| 10254 | } |
| 10255 | return obj; |
| 10256 | } |
| 10257 | |
| 10258 | var CALL = Function.prototype.call; |
| 10259 | var APPLY = Function.prototype.apply; |
no outgoing calls
no test coverage detected