Status: New
Owner: ----
New issue 3965 by [email protected]: Object.{freeze, preventExtensions,
seal}(non-object) throws TypeError in violation of spec
https://code.google.com/p/v8/issues/detail?id=3965
19.1.2.5 Object.freeze ( O )
https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.freeze
19.1.2.15 Object.preventExtensions ( O )
https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.preventextensions
19.1.2.17 Object.seal ( O )
https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.seal
All have the same first step:
1. If Type(O) is not Object, return O.
The correct results:
Object.freeze(undefined) => undefined
Object.freeze(null) => null
Object.freeze(true) => true
Object.freeze(false) => false
Object.freeze(1) => 1
Object.freeze("") => ""
let sym = Symbol("desc");
Object.freeze(sym) => sym
Object.preventExtensions(undefined) => undefined
Object.preventExtensions(null) => null
Object.preventExtensions(true) => true
Object.preventExtensions(false) => false
Object.preventExtensions(1) => 1
Object.preventExtensions("") => ""
let sym = Symbol("desc");
Object.preventExtensions(sym) => sym
Object.seal(undefined) => undefined
Object.seal(null) => null
Object.seal(true) => true
Object.seal(false) => false
Object.seal(1) => 1
Object.seal("") => ""
let sym = Symbol("desc");
Object.seal(sym) => sym
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.