Martok
51db22ff2f
Issue #2142 - Implement syntax for public/private fields and computed field names
...
This state still has the initializers scoped on .initializers local variable, which will be changed later.
Based-on: m-c 1499448, 1530084, 1530832, 1529448 (partial), 1532921, 1528039, 1528038, 1535166, 1550628,
1535166, 1550628, 1541641, 1547133, 1540787, 1535804/9
2023-05-01 13:26:43 +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
a8ab41b4c6
Issue #1691 - Part 2: Implement call import and import meta in the parser. https://bugzilla.mozilla.org/show_bug.cgi?id=1427610 https://bugzilla.mozilla.org/show_bug.cgi?id=1484948
...
(cherry picked from commit 6be083187f49e444de1bb116bb5930b20125190b)
2023-04-30 21:16:43 +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
Martok
5574b06ff5
Issue #2046 - Move builtin/Intl.* to builtin/intl/IntlObject.*
2023-02-21 08:17:20 +08:00
Martok
6e2201d3a8
Issue #2089 - Only create result Promises in Promise#then and Promise#catch if it's used or the creation is otherwise observable
...
Based-on: m-c 1342070
2023-02-01 07:38:16 +08:00
Job Bautista
d163d08cb2
Issue #2083 - Part 2: Remove use of RegExpGuard.
...
Based on Mozilla bug 1345177.
There were more uses of RegExpGuard in js/src/builtin/RegExp.cpp not found in
the original bug's patch.
2023-02-01 07:36:07 +08:00
Job Bautista
3796c7c1e1
Issue #2083 - Part 1: Make RegExpShared a GC thing.
...
Based on Mozilla bug 1345177.
Changes from the original bug's patch:
- We don't have JS::CurrentThreadIsHeapCollecting, so let's use
trc->runtime()->isHeapCollecting() instead.
- Mozilla bug 1337117 renamed runtimeFromMainThread to
runtimeFromActiveCooperatingThread for Firefox 54, so let's use the former
2023-02-01 07:35:50 +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
41c2b34542
No issue - Remove "code" from jsprototype.h macros
...
Based-on: m-c 1394084
2023-01-26 11:38:07 +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
574b295d15
Issue #1742 - Part 3: use JS::PropertyResult instead of Shape*
...
This is the meat of the issue and switches using raw shape pointers out for
PropertyResult objects where feasible.
2022-05-31 09:12:29 +08:00
Moonchild
5d2fea0dac
[js] Add AutoEnterOOMUnsafeRegion to JS_TransplantObject.
...
Transplanting objects is inherently oom-unsafe, so add
`AutoEnterOOMUnsafeRegion` to `JS_TransplantObject()` and annotate crashes
accordingly if they do happen.
2021-01-27 21:02:55 +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
3e118e4948
[devtools] More gracefully (than a crash) handle stack capture failures.
2020-11-06 09:42:40 +08:00
Moonchild
dabd32f955
Issue #1656 - Part 7: Nuke vim config lines in JS
2020-09-25 22:04:24 +08:00
Moonchild
ef11a4d7e8
Issue #618 - Clear the module map when changing a Document's global and add
...
release build assertions for mismatching compartments.
2020-09-10 21:07:51 +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
Moonchild
c7d195e633
Issue #618 - Align module instantiation/errors with the updated spec.
...
Store and re-throw module instantiation and evaluation errors.
Ref: BZ 1374239, 1394492
2020-07-10 22:17:41 +08:00
wolfbeast
5386cd812b
Issue #1570 - Implement globalThis
...
This resolves #1570
2020-06-06 07:19:04 +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
Gaming4JC
10b93afff4
Bug 1331092 - Part 2: Implement Async Generator except yield*.
...
Tag #1287
2019-12-18 09:16:52 +08:00
wolfbeast
ca9e376e55
Issue #1257 - Part 2: Remove watch/unwatch and JS watchpoint class.
2019-11-01 10:24:09 +08:00
wolfbeast
cfc50f18c4
Fix a crash in IndexedDB.
2019-09-06 23:49:51 +08:00
Gaming4JC
367fc9432e
Issue #1195 - Fix errant use of JSContext in ErrorNotes
...
We want to ensure that ErrorNotes stays on the main thread to prevent a race condition that was introduced in 1283712 - Part 1. This fixes #1195 .
2019-07-22 19:56:06 +08:00
Gaming4JC
6072c7290b
Make JSErrorNotes Single Threaded
2019-07-22 19:49:35 +08:00
Gaming4JC
c2bd1ca0bc
1283712 - Part 1: Add JSErrorBase, JSErrorNotes, JSErrorNotes::Note, and JSErrorReport.{notes,freeNotes}.
2019-07-22 19:49:32 +08:00
Gaming4JC
8a42a64748
1320408 - Part 23: Change RegExpObject::{getShared,createShared,dumpBytecode} to static method.
2019-07-22 19:48:59 +08:00
Gaming4JC
e5b36e01b9
1320408 - Part 20: Change PromiseObject::resolve and PromiseObject::reject to static method.
2019-07-22 19:48:40 +08:00
Gaming4JC
cc8cb910dd
1320408 - Part 14: Change some GlobalObject methods to static method.
2019-07-22 19:48:14 +08:00
Gaming4JC
d208cccd10
1320408 - Part 12: Change JSScript::sourceData to static method.
2019-07-22 19:48:01 +08:00
Gaming4JC
7f856ff769
1320408 - Part 9: Change JSObject::setFlags and depending methods to static method.
2019-07-22 19:47:51 +08:00
Gaming4JC
07cd213071
1320408 - Part 2: Change JSFunction::getOrCreateScript to static method.
2019-07-22 19:47:27 +08:00
Gaming4JC
146dbe7bee
1323324 - Part 1: Make Promise::unforgeable{Resolve,Reject} spec-compliant.
2019-07-22 19:46:50 +08:00
wolfbeast
3c6346afa9
Unhook Unboxed Objects option
2019-05-24 21:55:41 +08:00
wolfbeast
b68de773fd
Stage 1-1: Implement Function.prototype.toString revision proposal.
...
Tag #960
2019-04-13 07:00:18 +08:00