Change JSScope/JSScopeProperty to better reflect ES5's [[Writable]], [[Configurable]], [[Extensible]] attributes

ASSIGNED
Assigned to

Status

()

ASSIGNED
9 years ago
9 years ago

People

(Reporter: Waldo, Assigned: Waldo)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Assignee)

Description

9 years ago
ES5 has three object-preservation APIs:

  * Object.preventExtensions(O)
  * Object.seal(O)
  * Object.freeze(O)

These APIs make the given object increasingly immutable, each subsuming the behavior of the previous methods.  The first prevents new properties from being added.  The second goes further by making all properties already on the object non-configurable (incapable of being deleted, i.e. permanent).  The third goes furthest of all by making all properties unwritable (value can't be changed, i.e. readonly).

Of these paradigms, SpiderMonkey supports only the third, through the false cognate JS_SealObject(cx, obj, JS_FALSE).  We need implementation support for the first two capabilities as well.
You need to log in before you can comment on or make changes to this bug.