(object)
| 329 | } |
| 330 | |
| 331 | function isExtensible (object) { |
| 332 | var prop = '_poly_'; |
| 333 | try { |
| 334 | // create unique property name |
| 335 | while (prop in object) prop += '_'; |
| 336 | // try to set it |
| 337 | object[prop] = 1; |
| 338 | return hasProp(object, prop); |
| 339 | } |
| 340 | catch (ex) { return false; } |
| 341 | finally { |
| 342 | try { delete object[prop]; } catch (ex) { /* squelch */ } |
| 343 | } |
| 344 | } |
| 345 | |
| 346 | function preventExtensions (object) { |
| 347 | return object; |