You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

36 lines
1.4 KiB

--- !ditz.rubyforge.org,2008-03-06/issue
title: immutable binding handling in duk_js_var is missing
desc: |-
When a value is updated in-place, its attributes are not checked. In
particular, writable attribute needs to be checked. The current code
attempts to be clever and provide a 'ref.value' for bindings found in
a declarative environment; the direct ref.value reference allows in-place
update of the variable value without using the much slower "put property"
object function. However, this is incorrect when the property is not
writable.
An easy fix is to set ref.value to NULL in get_identifier_reference()
when the binding is not found in (active) registers. A slightly better
fix is to set ref.value to NULL when property is not found in active
registers and is not writable. Finally, get_identifier_reference() could
return property attributes in addition to ref.value, but this seems
counterproductive and would replicate attribute checking.
type: :bugfix
component: duk
release: v0.8
reporter: sva <sami.vaarala@iki.fi>
status: :closed
disposition: :fixed
creation_time: 2013-11-02 23:17:51.288927 Z
references: []
id: 322d8bec17c614aee396dd4196e76c9be85cad10
log_events:
- - 2013-11-02 23:17:51.477862 Z
- sva <sami.vaarala@iki.fi>
- created
- ""
- - 2013-11-03 00:07:57.388952 Z
- sva <sami.vaarala@iki.fi>
- closed with disposition fixed
- ""