| 7420 | } |
| 7421 | |
| 7422 | function hasCustomToString(value) { |
| 7423 | // value.toString !== Object.prototype.toString if value has no custom toString but is from another context (e.g. |
| 7424 | // iframe, web worker) |
| 7425 | try { |
| 7426 | return ( |
| 7427 | j$.isFunction_(value.toString) && |
| 7428 | value.toString !== Object.prototype.toString && |
| 7429 | value.toString() !== Object.prototype.toString.call(value) |
| 7430 | ); |
| 7431 | } catch (e) { |
| 7432 | // The custom toString() threw. |
| 7433 | return true; |
| 7434 | } |
| 7435 | } |
| 7436 | |
| 7437 | function truncate(s, maxlen) { |
| 7438 | if (s.length <= maxlen) { |