Each object of a host class keeps its handle twice, once in its slot and
once in the realm's index of the objects scripts hold, but creating one
reserved only the object's own bytes, and the collector's live-byte total
left the handle out. A host value with a long handle could therefore grow
the heap past the script's limit.
The object now reserves its handle's bytes before it is made, and the
collector counts them for every live object. Tests cover a handle larger
than the remaining budget and the bytes 100 retained objects add.
- Adding a control or an item, and removing items, builds both arrays
before the first write, so a run that ends at the heap limit leaves the
lists and the dialog's counts as they were.
- A listener registered after an event started does not hear it in a later
phase, a capturing container's re-registration included.
- show() reads the dialog again when a getter changes a list item's text
after the item was read.
- Enter and Escape skip an OK or Cancel button inside a hidden or disabled
container.
- A resource string of a name and a type without braces throws a
SyntaxError, and a \u escape pair of surrogates reads as one character.
- In the app, queued events wait while another dialog is open over the
script's dialog, and the run's own questions wait while a popup, such as
an open drop-down list, is over it. ui.dialog.confirm and
ui.dialog.cancel take only the dialog, ui.dialog.set needs a field or an
action and answers with the dialog it set, and OK is refused while a
dialog open over it waits. A cancel after typed text clicks the cancel
button the dialog has when its turn comes, and an immediate cancel the
run refuses is an error.
- A click on a list box row gives the list the keyboard focus.
- The vc hint test names BridgeTalk, since Window now exists; the params
text and docs/mcp.md say that a show() in a handler notify runs throws
only in the app, and define_script_ui says when end is not called.
`[super.x] = [1]`, `({ a: super.a } = o)` and `for (super.x of xs)` were
syntax errors. The branch made super properties assignment targets in
`check_target`, but destructuring and for-of check their targets with
`check_simple_target` (from main's destructuring), which still rejected
them. The compiler already writes to super properties on both paths.
A host class registered with construct: None still has a constructor
function that throws when called, so Promise.resolve and the other
statics accepted it as a constructor. The class entry now records
whether a construct function was supplied, and the statics check that.
`new` on such a class still throws its existing TypeError.
In a realm with the ES2015 option, the `find` function of a reflection
had configurable `length` and `name` properties, so Object.isFrozen gave
false and a script could delete or redefine them. Both are now
non-writable and non-configurable, as the reflection's other parts are.
main added HostClass initializers in host_tests.rs without the reflect
`info` field, a second test named
assigning_undefined_to_the_selection_throws_and_keeps_it, and type and
size checks on DocumentPreset settings.
- host_tests.rs: the six new HostClass initializers give `info`.
- The selection test for an index past the end of pageItems is renamed
assigning_an_index_past_the_end_to_the_selection_throws_and_keeps_it.
- The preset heap tests used titles of 512 KiB and an array of 20,000
booleans as a title, which the setter now refuses. They now reach the
run's heap with 4,092-byte titles, and compare presets holding a
four-number documentBleedOffsetRect with presets holding an eight-byte
title, so each array element still counts.
The merge of main left object literal methods without a `name`, since
main named them with SetFunctionName and the branch defines them through
InitMethod. Methods and accessors defined with a home object are now
named as they are defined: after their key, with `get ` or `set ` before
an accessor's name and a Symbol's description in brackets.
- A named class's constructor takes the class's name before its methods
are defined, so a static `name` member replaces it. An anonymous class
takes the name it is assigned to unless a static member defines `name`.
- Computed methods and accessors in object literals have the object as
their home object (new InitMethodKey), so `super` works in them.
- Class method keys and `super[key]` keep Symbol keys instead of
converting them to strings.
- Classes have generator methods (`*m() {}`); a generator constructor is
a syntax error.
- docs/target-app-parity.md and docs/mcp.md describe the new behavior;
the class line drops test262 counts measured before main added
destructuring, generators and function names.
main added `Value::Symbol`, a binary_octal argument to `string_to_number` and its own
ES2015_BUILT_INS and ES2015_FEATURES in the test262 runner.
- A Map or Set key compares a Symbol by identity, as SameValueZero does.
- CanonicalNumericIndexString reads a typed array property name with the ES2015 ToNumber.
- The collection and binary-data test262 runner uses ES2015_COLLECTION_BUILT_INS and
ES2015_COLLECTION_FEATURES, writes its failures to `es2015-builtins-failures.txt` so it does
not overwrite the ES2015 subset's `es2015-failures.txt`, and runs each test through `run_one`.
Keep XMP file buffers in native state and release them at the file run boundary. Count registered namespaces and expanded metadata against the heap limit. Reset marked readers after updates and allow failed library setup to retry.