| 7244 | } |
| 7245 | |
| 7246 | function hasCustomToString(value) { |
| 7247 | // value.toString !== Object.prototype.toString if value has no custom toString but is from another context (e.g. |
| 7248 | // iframe, web worker) |
| 7249 | try { |
| 7250 | return ( |
| 7251 | j$.isFunction_(value.toString) && |
| 7252 | value.toString !== Object.prototype.toString && |
| 7253 | value.toString() !== Object.prototype.toString.call(value) |
| 7254 | ); |
| 7255 | } catch (e) { |
| 7256 | // The custom toString() threw. |
| 7257 | return true; |
| 7258 | } |
| 7259 | } |
| 7260 | |
| 7261 | function truncate(s, maxlen) { |
| 7262 | if (s.length <= maxlen) { |