Commit Graph
282 Commits
Author SHA1 Message Date
dotCooCoo a9799bfe9a Merge main into feat/scripts-scriptui-resources 2026-11-27 22:17:49 -08:00
dotCooCoo 4dc64055f4 Charge fuel before reading XMP property values 2026-11-26 21:02:34 -08:00
dotCooCoo 47dcb19bca Preserve localized XMP properties and optional argument positions 2026-11-26 20:43:11 -08:00
dotCooCoo c6f59b3594 Reject unsupported inherited RDF language without losing qualifiers 2026-11-26 19:28:52 -08:00
dotCooCoo cc2c5c770f Bound XMP metadata work and preserve packet boundaries 2026-11-26 19:15:16 -08:00
dotCooCoo 0669a4525a Merge main into feat/scripts-xmp-objects 2026-11-26 15:20:19 -08:00
BFlat fc1ac56efc Merge pull request #9465 from dotCooCoo/fix/indexer-receiver-data-limits
JavaScript: enforce data limits on host receivers and indexers
2026-11-27 05:21:37 +07:00
BFlat 8daacef7c2 Merge pull request #9394 from dotCooCoo/fix/promise-prototype-tag
JavaScript: define the Promise prototype string tag
2026-11-27 05:15:44 +07:00
dotCooCoo 758a62317b Correct XMP array insertion and empty item values 2026-11-26 14:01:22 -08:00
dotCooCoo 051781e23d Merge main into feat/scripts-xmp-objects
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.
2026-11-26 13:13:53 -08:00
dotCooCoo dfa6bae8eb Strengthen host indexer argument and shared-budget assertions 2026-11-26 10:27:23 -08:00
dotCooCoo 340a11c4ba Merge main into feat/js-es2015-generators 2026-11-26 10:27:02 -08:00
dotCooCoo 8a5efed496 Merge main into fix/promise-prototype-tag 2026-11-26 10:17:47 -08:00
dotCooCoo 18125e6cdb Merge main into fix/indexer-receiver-data-limits 2026-11-26 10:07:52 -08:00
dotCooCoo dd2e92f4ec Merge main into feat/js-es2015-generators
Promise jobs resume generator callbacks. Promise.resolve and Promise.reject reject direct and bound generator functions as constructors.
2026-11-26 09:54:27 -08:00
dotCooCoo 72984fddaa Enforce data limits on host receivers and indexers 2026-11-26 09:53:08 -08:00
BFlat b9fe04f769 Merge pull request #9392 from dotCooCoo/fix/promise-combinator-iterators
JavaScript: Promise combinators consume iterable inputs
2026-11-27 00:52:25 +07:00
dotCooCoo 350fb2bdb3 Merge main into fix/realm-replaces-paused-run 2026-11-26 08:33:48 -08:00
dotCooCoo 714791d75f Merge main into fix/promise-combinator-iterators 2026-11-26 08:26:20 -08:00
dotCooCoo ef5404ad95 Merge main into fix/promise-prototype-tag 2026-11-26 08:22:26 -08:00
BFlat 5db6caf090 Merge pull request #9405 from dotCooCoo/fix/promise-rejection-sites
JavaScript: preserve Promise rejection relay locations
2026-11-26 23:18:48 +07:00
BFlat b65a0b1542 Merge pull request #9396 from dotCooCoo/fix/prepare-call-gc-roots
Scripts: keep nested apply operands alive during collection
2026-11-26 23:18:10 +07:00
dotCooCoo 0983b6dfd5 End paused JavaScript runs before compiling replacement source 2026-11-26 06:57:29 -08:00
dotCooCoo fc07f8a326 JavaScript: root the running rejection site code 2026-11-26 06:56:03 -08:00
dotCooCoo ff9bd64003 JavaScript: preserve Promise rejection relay locations 2026-11-26 06:53:49 -08:00
dotCooCoo 1b6bcd370a JavaScript: cache shared rejection reason attribution 2026-11-26 06:42:40 -08:00
dotCooCoo 75fd52fca6 Scripts: keep nested apply operands alive during collection 2026-11-26 06:40:33 -08:00
dotCooCoo 59ab0f6c03 JavaScript: define the Promise prototype string tag 2026-11-26 06:35:49 -08:00
dotCooCoo 59ddb9c3e2 JavaScript: consume iterators in Promise combinators 2026-11-26 06:28:05 -08:00
BFlat 2f4cceb462 Merge pull request #9074 from dotCooCoo/feat/js-promise-job-queue
Scripts: .js scripts have Promise and run its jobs before the run ends
2026-11-26 19:32:14 +07:00
BFlat cb7bdfd0f4 Merge pull request #9306 from dotCooCoo/fix/js-global-boolean
JavaScript: scripts have the global Boolean constructor
2026-11-26 16:49:49 +07:00
dotCooCoo f6aef4fc8a Scripts: a queued list choice is dropped when a handler replaced the item, and the new items stay kept while counted
A list counts how many times a script replaced its items, so a choice queued
against an item a handler removed and added again with the same text is not
replayed against the new item. The items array stays kept from collection
while the count's slot reserves room.
2026-11-26 00:18:53 -08:00
dotCooCoo 5654c06c6d Scripts: ScriptUI review fixes for resource strings, list choices, listeners and the dialog's cancel and close
A resource string's characters size edit fields and static text, a list's items must be an array, a listener added again runs in a later dispatch only, a close asked for while the dialog is described closes it, a list selection a getter changes is read again, and Escape during a handler cancels the dialog the run waits at next. The thrown error of a failed host call stays kept while the failure callback runs.
2026-11-26 00:18:53 -08:00
dotCooCoo 7b9726c71e Scripts: Promise statics refuse arrow functions and methods as this
The statics' constructor check now treats an arrow function, a method
and a function bound to one as non-constructors, as new does, so
Promise.resolve.call(() => {}, 1) throws a TypeError. The test262 line
in docs/target-app-parity.md now gives the count on current main: 440
of 538 runs.
2026-11-25 22:12:51 -08:00
dotCooCoo 2fc172e69a Merge main into feat/scripts-xmp-objects 2026-11-25 22:11:49 -08:00
dotCooCoo 6a72901192 Scripts: adding Promise to a realm leaves the language it reads as it was
Realm::add_es2015 no longer turns on Options::es2015, which now also
selects the ECMAScript 2015 syntax. A realm made without the option gets
Promise and still reads ES5.1 until set_es2015 changes it; the engine
calls set_es2015 for each run before it adds Promise.
2026-11-25 21:58:54 -08:00
dotCooCoo df3d7ab275 Scripts: stale page item lists throw from toString; unavailable members stop hasOwnProperty
- `toString()` on a page item list from a closed or replaced document throws
  "Stale document", as its other members do.
- A member a host class declares unavailable is not reported by
  `hasOwnProperty` or `propertyIsEnumerable` even when a parent class has it.
- Assigning a name an object of a host class inherits from a prototype no
  longer calls the class's indexer, so a non-strict assignment is ignored
  instead of throwing.
- Assigning a selection checks repeated objects with a set instead of
  scanning the list for each object.
- The script report test throws a text that names `Window` for the case of
  an error the script wrote itself.
2026-11-25 21:50:05 -08:00
dotCooCoo ae8c902401 Merge main into feat/js-promise-job-queue 2026-11-25 21:19:42 -08:00
dotCooCoo 48357310ad Merge feat/scripts-scriptui-dialogs into feat/scripts-scriptui-resources 2026-11-25 20:43:55 -08:00
dotCooCoo 541c361e8c Scripts: ScriptUI dialogs draw with craft containers, and remove() changes nothing when it fails
- The dialog's body only reports its events, typed texts and whether a
  field has the focus; the dialog applies the last run's report after the
  container, and Enter outside a field comes from take_submit after it.
- The controls scroll in a craft Stack, and a panel is a GroupBox.
- remove() on a container walks the removed control's subtree and checks
  the heap before its first change, so a run that ends in it leaves the
  container, the dialog's counts and the control as they were.
- The dialog's accessibility tests draw through part_frame.
2026-11-25 19:31:31 -08:00
dotCooCoo f525279b27 Merge main into feat/scripts-scriptui-dialogs 2026-11-25 18:42:43 -08:00
dotCooCoo 192a041ec8 Merge main into feat/js-es2015-generators 2026-11-25 18:09:25 -08:00
dotCooCoo 895fc362e8 JavaScript: a bound function inherits from its target's prototype
With ECMAScript 2015, Function.prototype.bind gave every bound function
Function.prototype as its prototype, so a bound generator function's
constructor was Function instead of GeneratorFunction. The bound function
now takes the target's prototype, read before length and name (ECMA-262
2020 section 9.4.1.3). Without the option it keeps Function.prototype,
as ES5 section 15.3.4.5 specifies.
2026-11-25 17:58:58 -08:00
dotCooCoo 5473a2217b Scripts: a ScriptUI dialog's OK and Cancel found by name or text skip buttons that cannot be clicked
Without defaultElement or cancelElement, the dialog's default and cancel
buttons are the first enabled and visible buttons named or titled OK and
Cancel, so Enter and Escape click a button the dialog takes a click on.
2026-11-25 15:44:37 -08:00
dotCooCoo 9dc197b4e4 Scripts: ScriptUI dialogs refuse look-alike containers, noecho fields and stale descriptions
- An answer step with an empty control matches only an unnamed control whose
  text is empty, not the first unnamed control.
- add() and add("item") on an object made to look like a container or list
  throw a TypeError and charge nothing to the dialog's limits.
- A new list's initial items are read through ordinary property access, so an
  index getter gives its value.
- findElement() keeps the controls it has still to look at rooted while a
  name getter runs, and skips a control the element no longer holds.
- A close() that onClose calls before it returns false belongs to the close it
  refuses; the dialog waits for the next event.
- show() throws for an edittext with noecho before the dialog opens.
- show() reads the dialog again when a getter adds or removes a control after
  the controls were read, and throws when it changes again.
- An edit field takes at most 32,768 characters while it is typed.
2026-11-25 14:41:28 -08:00
dotCooCoo 948ebd6adb Merge main into feat/scripts-api-d1a-app-documents 2026-11-25 10:21:51 -08:00
dotCooCoo e116212318 Merge main into fix/js-global-boolean 2026-11-25 10:17:04 -08:00
dotCooCoo 3ede7a59f4 Merge main into feat/scripts-scriptui-dialogs 2026-11-25 09:17:07 -08:00
dotCooCoo 18118db9c7 Merge main into feat/js-es2015-generators 2026-11-25 09:11:32 -08:00
dotCooCoo 382e40dce1 JavaScript: spread tests follow the iterator protocol
Since #9138, spread steps the array's iterator, so spreading a long
array ends at the fuel limit instead of an early RangeError. Three
tests in es2015_tests.rs still expected the by-index RangeError and
failed:

- an_index_setter_without_a_getter_does_not_delay_the_spread_s_check
- a_prototype_getter_behind_an_own_element_does_not_delay_the_spread_s_check
- looking_for_index_getters_takes_fuel_for_each_property

The setter and prototype-getter tests now check the fuel limit and that
the setter or getter did not run. The test of the index-getter scan,
which #9138 removed, is deleted.

docs/target-app-parity.md had two ES2015 entries after #9138. The
by-index entry is removed; the entry that describes iterator spread
stays.
2026-11-25 04:31:45 -08:00