Moonchild
2e4620b5af
Issue #2692 - Part 6: Don't #include js/SourceBufferHolder.h in jsapi.h.
...
Instead, require users to do so. This is a minor translation-unit size
improvement for anyone who never has to use SourceBufferHolder other than
by reference.
2025-03-13 23:01:46 +08:00
Moonchild
40ed1b10f4
Issue #2692 - Part 5: Split out compilation and evaluation APIs into its own header.
2025-03-13 22:59:38 +08:00
Moonchild
307621db50
Issue #2692 - Part 4: Split out off-thread compilation API to its own header.
2025-03-13 22:59:23 +08:00
Moonchild
eca185aa79
Issue #2692 - Part 3: Split out JS compiled script transcoding to its own header.
2025-03-13 22:59:08 +08:00
Moonchild
565fb4b05a
Issue #2692 - Part 2: Split out JS SourceBufferHolder to its own header.
2025-03-13 22:58:50 +08:00
Moonchild
9436bfa175
Issue #2692 - Part 1: Split out JS CompileOptions to its own header.
2025-03-13 22:58:36 +08:00
Moonchild
7f086f216c
Issue #2653 - Part 3: Remove support for packaged apps from asmjscache
2024-11-21 21:02:19 +08:00
Moonchild
47ef1701b3
Issue #2305 Part 1: Add support for hasIndices to RegExpFlags (/d)
...
Adds recognition and parsing of the /d RegExp flag.
Drive-by correction: add missing "s" for dotAll to RegExpObject::toString.
Tag #1284 and #2008
2024-11-13 23:20:49 +08:00
Martok
90eb83819c
Issue #2435 - Re-Implement rejected Promises events according to spec
...
Own implementation; upstream gets several things wrong.
2024-01-09 12:00:53 +08:00
Martok
9126a4836f
Issue #2435 - Implement notifying of rejected promises
...
Based-on: m-c 1362272
2024-01-09 12:00:33 +08:00
Brian Smith
eef37b2cd5
Issue #2387 - Collection of fixes related to a crash while canceling a dynamic import. Add AddRef/Release hooks for embedding's script or module private value and set this script source object where appropriate. https://bugzilla.mozilla.org/show_bug.cgi?id=1519140 Partial, no Value passing changes. Clear the list of dynamic import requests after cancelling them in ScriptLoader::ParsingComplete as we do for other requests. https://bugzilla.mozilla.org/show_bug.cgi?id=1291535 ScriptLoader::OnStreamComplete never returns a failure. https://bugzilla.mozilla.org/show_bug.cgi?id=1627275 Also cancel the correct kind of parser for Modules.
2023-11-30 09:51:50 +08:00
Brian Smith
9b9075eef6
Issue #1442 - Part 4: Add JSAPI functions for working with ReadableStream. https://bugzilla.mozilla.org/show_bug.cgi?id=1272697
2023-10-04 09:53:45 +08:00
Brian Smith
62467428a3
Issue #1442 - Part 2: Add a run-time preference for toggling the streams API. https://bugzilla.mozilla.org/show_bug.cgi?id=1272697
2023-10-04 09:53:12 +08:00
Martok
8d97bd437a
Issue #2259 - Reimplement String.prototype.toLocale{Lower,Upper}Case per ECMAScript Intl specification
...
- Update make_unicode to output SpecialCasing
- Handle special casing
- Use realloc instead of malloc when resizing a newly created string buffer
Based-on: m-c 1318403, 1431957
2023-07-03 15:07:03 +08:00
Job Bautista
ec2fb72568
Issue #2241 - Part 1: Move {js::,JS_}{{Strictly,Loosely}Equal,SameValue} into their own header and implementation files
...
Backported from Mozilla bug 1516742.
The .from* methods are going to depend on SameValueZero, which needs to be
visible to /dom. This patch provides the foundation for that.
2023-05-15 09:09:41 +08:00
Martok
ba9647a12a
Issue #2142 - Remove the temporary fields option
...
Now that everything is finished, we don't need the feature flag any more.
2023-05-01 13:27:04 +08:00
Martok
afa7bddc96
Issue #2142 - Add internal option for fields, but always true
...
This allows us to perform bisects on the following commits without causing runtime issues.
Based-on: m-c 1529758
2023-05-01 12:27:22 +08:00
Brian Smith
c69a47c393
Issue #1691 - Part 7f: Split up compile and execute so we can use ClassicScript. https://bugzilla.mozilla.org/show_bug.cgi?id=1342012 Refactor nsJSUtils::ExecutionContext to separate compilation and execution steps and allow extraction of compiled JSScript. https://bugzilla.mozilla.org/show_bug.cgi?id=1366773 Move buffer argument from JS::StartIncrementalEncoding to JS::FinishIncrementalEncoding.
...
(cherry picked from commit d4b520b08b958e116dfeeffdc61f3425610d1ce9)
2023-04-30 21:20:47 +08:00
Brian Smith
993476283d
Issue #1691 - Part 7e: Dependencies for required to finish part 7d. https://bugzilla.mozilla.org/show_bug.cgi?id=1331662 Reimplement EvaluateString using the ExecutionContext class. https://bugzilla.mozilla.org/show_bug.cgi?id=1316078 Extract redudant code into StartOffThreadParseTask. Use an ExclusiveContext instead of a JSContext in XDR functions. Add a script decoder as a valid off-main-thread parse-task. https://bugzilla.mozilla.org/show_bug.cgi?id=900784 Add nsJSUtils functions for encoding and decoding the bytecode. https://bugzilla.mozilla.org/show_bug.cgi?id=1316081 Add XDRIncrementalEncoder to replace delazified LazyScript in the encoded XDR buffer. Add an XDRIncrementalEncoder instance on the ScriptSource. Expose a new JSAPI to incrementally encode bytecode when it is generated. https://bugzilla.mozilla.org/show_bug.cgi?id=1334091 XDR function use the sourceObject instead of the enclosingScript as argument.
...
(cherry picked from commit d6de9a669f4b2f5115670bd771cd53d7cfb3956a)
2023-04-30 21:20:33 +08:00
Brian Smith
62be542166
Issue #1691 - Part 7a: Add a JS API to get the private value for the calling script or module. https://bugzilla.mozilla.org/show_bug.cgi?id=1342012
...
(cherry picked from commit e89e50d5047468e0bb02ee82f9cd0be282b24a1b)
2023-04-30 21:19:37 +08:00
Brian Smith
c3daecc218
Issue #1691 - Part 6d: Optimize handling of internally-created Promise objects. https://bugzilla.mozilla.org/show_bug.cgi?id=1358879 The patch uses a different test: PROMISE_FLAG_DEFAULT_REJECT_FUNCTION which doesn't exist in our codebase. It was added in this bug, which appears to be partly complete: https://bugzilla.mozilla.org/show_bug.cgi?id=1313049
...
(cherry picked from commit 97fc74b693813eaaa9ab833d9c51fc5868ff039f)
2023-04-30 21:18:51 +08:00
Brian Smith
1b811bd711
Issue #1691 - Part 6a: Support private values which contain pointers to cycle-collected C++ objects https://bugzilla.mozilla.org/show_bug.cgi?id=1342012
...
(cherry picked from commit 1286cca73d58332ba0becd0011f747713b8acfac)
2023-04-30 21:17:54 +08:00
Brian Smith
7a6dab0b38
Issue #1691 - Part 4: Finish implementing call import. https://bugzilla.mozilla.org/show_bug.cgi?id=1499140
...
(cherry picked from commit 7bf7d64887944b127a72090dd62eb57f67c5089d)
2023-04-30 21:17:13 +08:00
Brian Smith
3f4985ce6c
Issue #1691 - Part 3: Finish implementing import meta. https://bugzilla.mozilla.org/show_bug.cgi?id=1427610
...
(cherry picked from commit a8625238ac846fb7eb103646ddb8634a5860f067)
2023-04-30 21:17:00 +08:00
Brian Smith
1a6b3a822c
Issue #1691 - Part 1: Provide a way of associating a private value with a script or module.
...
This is a prerequisite for dynamic import
(cherry picked from commit 2e2972647ee29340df51a804f05e40fc1da2c89b)
2023-04-30 21:16:28 +08:00
Job Bautista
6890cdd9a1
Issue #62 - Fix xul.dll link bustage relating to JSErrorNotes.
2023-03-28 12:09:42 +08:00
Martok
61c99bf6cd
Issue #2089 - Implement AggregateError
...
Based-on: m-c 1568903/4,1641355(partial),1652148,1643397
2023-02-02 09:31:39 +08:00
Martok
8322304fb3
Issue #2089 - In Promises, use a C++ version of SpeciesConstructor when calling from C++
...
Based-on: m-c 1344656,1386534
2023-01-26 11:40:28 +08:00
Martok
6b50dd5d06
Issue #2089 - Use JS engine stack if necessary when reporting errors
...
Based-on: m-c 996060
2023-01-26 11:39:57 +08:00
Martok
531906eb87
No issue - add API to tell Profile Timeline Recording state to JS engine
...
Based-on: m-c 1342070/5
2023-01-26 11:38:40 +08:00
Martok
85af7f6e80
Issue #1952 - m-c 1383775: Clean up function toString/toSource code, remove remnants of source decompiler
2022-07-03 06:55:19 +08:00
Moonchild
80d7d43961
Issue #1742 - Part 1: Refactor rooting base class templates
...
Based on Bug 1325406
2022-05-31 09:12:19 +08:00
Moonchild
bdcb9cc504
Issue #1756 - Expose NumberFormat.formatToParts() to content.
2021-04-02 10:34:12 +08:00
Moonchild
5df0028108
Issue #1756 - Initial wrapped implementation in C++
2021-04-02 10:34:10 +08:00
Moonchild
ec0865128b
Issue #1624 - Make ion inlining optimizations a pref.
...
This also adds it to JS_SetGlobalJitCompilerOption()
2020-12-04 08:52:49 +08:00
Moonchild
dabd32f955
Issue #1656 - Part 7: Nuke vim config lines in JS
2020-09-25 22:04:24 +08:00
Moonchild
34db761758
Issue #618 - Simplify module resolve hook to be a function pointer
...
This is an ahead-of time port to try and address #1624 .
This is based on BZ 1461751 and Jon Coppeard's work in it.
2020-08-29 08:08:41 +08:00
Moonchild
976239c8d0
[js] Add some utility functions to get the current JS runtime.
2020-08-29 08:08:38 +08:00
Moonchild
0d874713ef
Issue #618 - Align error handling for module scripts with the spec (again)
...
This updates module implementation to match spec regarding handling of
instantiation errors, after it was changed yet again, this time to not remember
instantiation errors, but instead immediately rethrow applicable ones.
Ref: BZ 1420420
2020-08-29 08:07:00 +08:00
Moonchild
c65ca2ca58
Issue #618 - Remove context and heap-idle check
...
For checking if a module is in an error state and what the error is, it
shouldn't matter if we are currently GC-ing or not. So we don't need to check
for it, which removes the requirement to pass in the JS context (needed for
AssertHeapIsIdle's runtime check); this unblocks progress where otherwise we'd
have to figure out what the context is at the module level just to satisfy this
check.
2020-07-10 22:18:01 +08:00
Moonchild
b590ecea12
Issue #618 - Fix JSAPI additions to pass the JS context.
2020-07-10 22:17:55 +08:00
Moonchild
91a79c0ddc
Issue #618 - Match JSAPI names with the changes in 9ca74147225eed305e28c7887f9b2251aeeb0f36
...
Ref: BZ 1388728
2020-07-10 22:17:52 +08:00
Moonchild
5838eded5f
Issue #618 - Add APIs to query module record errors
...
Ref: BZ 1388728
2020-07-10 22:17:48 +08:00
wolfbeast
2996c783d8
Revert #1091 Remove unboxed object code phase 1 + extras.
...
This should be the last code backout for this. merging this branch
should get us back to the way we were (+ additional code changes for
later changes) as fasr as the unused unboxed code is concerned.
2020-02-27 07:34:57 +08:00
wolfbeast
cfed2447da
Revert #1137 - Remove unboxed arrays
...
- accounting for removal of watch()/unwatch()
- updated for intermediate code changes.
2020-02-27 07:34:50 +08:00
Gaming4JC
c8d569d1b8
Bug 1331092 - Part 1: Add Symbol.asyncIterator.
...
Tag #1287
2019-12-18 09:16:06 +08:00
wolfbeast
c16e82c9b1
Issue #1302 - Add self-hosted implementation for string regex .matchAll
...
This resolves #1302 .
2019-11-28 10:32:42 +08:00
wolfbeast
8148cf0001
Issue #1284 - Implement /s (dotAll) for regular expressions, v2.
...
Resolves #1284 .
2019-11-22 10:52:02 +08:00
wolfbeast
cfc50f18c4
Fix a crash in IndexedDB.
2019-09-06 23:49:51 +08:00
Gaming4JC
98ebeef711
1283712 - Part 2: Add JSEXN_NOTE.
2019-07-22 19:49:45 +08:00