Duktape 0.11.0 would allow an empty throw (e.g. "throw;") and would
also allow automatic semicolon insertion between "throw" and its
argument, e.g.::
throw
123;
The above must be rejected with a SyntaxError according to E5.1.
Both empty throw and the above newline case are rejected by V8 and
Rhino, so the previous more lenient behavior should not conflict
with real world code.
Writing to array entries using Object.defineProperty() (or
Object.defineProperties()) now causes an array part to be
abandoned. This is certainly not preferable behavior, but
not a 1.0 release blocker, so fixing this can be done in 1.1.
Push the internal Object.defineProperty() function only once outside the
loop to work better with large Object.defineProperty() calls. The
different is quite small in practice.
It would be better to avoid creating a function object in the first place,
but since we call Object.defineProperty() internally we need the original,
unchanged Object.defineProperty() in case the user has overwritten it.
The Array exotic [[DefineOwnProperty]] must capture and reject such
writes with RangeError. Handling for this is integrated into Duktape's
"putprop" algorithm and also defineProperty(). Other internals must
either use "putprop" or implement a similar check carefully.
Checks various base values for which the special behavior should or
should not apply. Also tests various target values for which the
behavior should or should not apply.
When a base object has the special [[Get]] behavior described in E5.1
Section 15.3.5.4 or 10.6 for the "caller" property, there is a question
whether a TypeError is thrown when the "caller" property value is a
bound strict function (or only when the value is a non-bound strict
function).
This commit changes the behavior so that a TypeError is also thrown
when the "caller" value is a bound function, by ensuring that strict
bound functions have the "strict" internal flag set.