summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeLines
* Issue #618 - Simplify module resolve hook to be a function pointerMoonchild2020-08-06-74/+76
| | | | | 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.
* [js] Add some utility functions to get the current JS runtime.Moonchild2020-08-06-0/+8
|
* Merge pull request #1627 from g4jc/618Moonchild2020-08-06-86/+106
|\ | | | | Keep track of which modules in a graph have been fetched
| * Issue #618 - Keep track of which modules in a graph have been fetched using ↵Gaming4JC2020-08-04-72/+92
| | | | | | | | | | | | a visited set Ref: BZ 1365187
| * Issue #618 - Simplify module map interfaceGaming4JC2020-08-04-14/+14
|/ | | | Ref: BZ 1365187
* Merge pull request #1626 from g4jc/618Moonchild2020-08-04-3/+5
|\ | | | | Fix debug build issues on es-modules-work branch
| * Issue #618 - Align error handling for module scripts with the spec - Debug ↵Gaming4JC2020-08-03-1/+2
| | | | | | | | | | | | | | | | follow up MODULE_STATUS_ERRORED is no more. Replacing with newer API. Ref: BZ 1420420
| * Issue #618 - Lazily initialise module binding maps - Debug follow upGaming4JC2020-08-03-1/+1
| | | | | | | | | | | | The added debug assertion does not work due to missing API. They were added in BZ 1337491, 1395366, and others, but were primarily used for multi-threading. This uses our existing non-multithreaded syntax instead, resolving a `no member named` build error.
| * Issue #618 - Remove eager instantiation - Debug follow upGaming4JC2020-08-03-1/+2
|/ | | | | | | The added debug assertion did not take into account microtask refactoring done in BZ 1405821. Resulting in error: no member named 'IsInMicroTask' in 'nsContentUtils'. This resolves the error.
* Issue #618 - Record module dependency before starting fetch so that errorJon Coppeard2020-08-02-1/+1
| | | | | | handling works correctly Ref BZ 1395896
* Issue #618 - Lazily initialise module binding mapsMoonchild2020-07-08-27/+35
| | | | | | | Make it so they are not allocated on a background thread in a different zone to the final module. Ref: BZ 1372258
* Issue #618 - Use a single slot for the module's environment object.Moonchild2020-07-08-47/+29
| | | | | | | | | | | | | | | | | | | | According to the spec this isn't created until the module is instantiated, but we create it when we compile the module. We stored this previously in InitialEnvironmentSlot and copied it to EnvironmentSlot when it was supposed to be created, but we can just store it in the latter slot straight away and check the module's status and return null if it shouldn't exist yet. This reduces the number of slots needed on a moduleObject to 17. Re: BZ 1420412 Part 1 We can't implement the second part to further reduce our number of slots, because it relies on SetProxyReservedSlot which in turn relies on rearchitecturing JS proxies to make reserved slots dynamic. That's a rabbit hole we really don't want to fall into. So, we'll end up being a bit slower because it can't be in-line allocated with having more than 16 slots, but so be it. I sincerely doubt it will make any practical difference.
* Issue #618 - Align error handling for module scripts with the spec (again)Moonchild2020-07-08-266/+331
| | | | | | | | 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
* Issue #618 - Fix error events fired when loading JS module dependencies failMoonchild2020-07-08-9/+12
| | | | | | | When module dependencies fail, don't spam with errors for each import; only fire the error event once. Ref: BZ 1421259
* Issue #618 - Fix typo and remove old function declarations.Moonchild2020-07-07-3/+1
|
* Issue #618 - Report source position information (line/column)Moonchild2020-07-04-39/+161
| | | | | | Report source position information for module export resolution failures. Ref: BZ 1362098
* Issue #618 - Slightly improve module scripting tests.Moonchild2020-07-04-16/+44
| | | | Ref: BZ 1388728
* Issue #618 - Further align error handling for module scripts with the specMoonchild2020-07-04-89/+280
| | | | Ref: BZ 1388728
* Issue #618 - Remove context and heap-idle checkMoonchild2020-07-04-8/+4
| | | | | | | | | 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.
* Issue #618 - Remove eager instantiationMoonchild2020-07-04-129/+10
| | | | | This backs out the stuff added in Bug 1295978. Ref: BZ 1295978, 1388728
* Issue #618 - Fix JSAPI additions to pass the JS context.Moonchild2020-07-03-6/+8
|
* Issue #618 - Match JSAPI names with the changes in ↵Moonchild2020-07-03-21/+20
| | | | | | 9ca74147225eed305e28c7887f9b2251aeeb0f36 Ref: BZ 1388728
* Issue #618 - Add APIs to query module record errorsMoonchild2020-07-03-0/+20
| | | | Ref: BZ 1388728
* Issue #618 - Update code comments for ModuleInstantiateMoonchild2020-07-03-2/+2
|
* Issue #618 - Align module instantiation/errors with the updated spec.Moonchild2020-07-03-217/+611
| | | | | Store and re-throw module instantiation and evaluation errors. Ref: BZ 1374239, 1394492
* Issue #618 - Add clarifying code comments.Moonchild2020-07-01-0/+12
|
* Issue #618 - Check for failed instantiation when starting to fetch dependenciesMoonchild2020-07-01-0/+6
| | | | | If instantiation has failed, then also fail the load and don't fetch imports. Ref BZ: 1358882
* Issue #1603 - Part 2: Split some classes out of ScriptLoader.cppMoonchild2020-07-01-534/+651
| | | | | | | This splits ScriptLoader up the same way Mozilla did with the exception of ScriptRequest due to the fact that ScriptLoader and ScriptRequest are interdependent and would create a circular dependency if split apart when not using unified building.
* Issue #1603 - Part 1: Reorganize ScriptLoader/ScriptElementMoonchild2020-06-30-514/+554
| | | | | | - Moves scripting parts of DOM into 'dom/script' - Renames nsScript{Loader/Element} to Script{Loader/Element} - Adjusts all callers
* Issue #1602 - Make sure we have a JSObject before trying to get global.wolfbeast2020-06-27-1/+7
| | | | | | | | Dynamic script loading/unloading (thank you modules) can yank the script out from under us before the JS API for it is initialized, leading to null deref crashes. This adds a simple check if the passed-in object is sane and present. Resolves #1602
* Merge pull request #1596 from g4jc/1563Moonchild2020-06-16-137/+388
|\ | | | | Allow backspace to work in editor even if there is a non-empty text node on the right
| * Bug 1316302 - Part 4: Refine HTMLEditRules::TryToJoinBlocks() and ↵Gaming4JC2020-06-14-53/+59
| | | | | | | | | | | | | | | | HTMLEditRules::MoveNodeSmart() with early return style for making scope of EditActionResult variable smaller For now, let's make the scope of EditActionResult variable in them smaller without big change. Tag #1563
| * Bug 1316302 - Part 3: Create EditActionResult class for making the methods ↵Gaming4JC2020-06-14-149/+292
| | | | | | | | | | | | | | | | | | | | | | | | | | which return nsresult, handled and canceled with out params In a lot of places, edit action handlers and their helper methods return nsresult and aHandled and aCanceled with out params. However, the out params cause the code complicated since: * it's not unclear if the method will overwrite aHandled and aCanceled value. * callers need to create temporary variable event if some of them are not necessary. This patch rewrites the helper methods of HTMLEditRules::WillDeleteSelection() with it. Tag #1563
| * Bug 1316302 - Part 2: WillDeleteSelection() should retry to handle it when ↵Gaming4JC2020-06-14-3/+15
| | | | | | | | | | | | | | | | | | | | selection is collapsed and JoinBlocks() doesn't handle nor cancel the action When selection is collapsed and JoinBlocks() doesn't handle nor cancel the action, WillDeleteSelection() should move selection to the start/end of leftmost/rightmost editable leaf node and retry to handle the action again. For avoiding infinite loop, it checks if selected node is changed actually before calling itself again. Tag #1563
| * Bug 1316302 - Part 1: Helper methods for ↵Gaming4JC2020-06-14-59/+149
| | | | | | | | | | | | | | | | | | | | | | | | HTMLEditRules::WillDeleteSelection() should have an out argument to indicates if it actually handles the action When HTMLEditRules::WillDeleteSelection() tries to remove something from the end/start of a block to its last/first text node but it's contained by block elements, it tries to join the container and the block. However, JoinBlocks() always fails to join them since it's impossible operation. In this case, HTMLEditRules::WillDeleteSelection() should retry to remove something in the leaf, however, it's impossible for now because JoinBlocks() and its helper methods don't return if it handles the action actually. This patch renames |JoinBlocks()| to |TryToJoinBlocks()| for representing what it is. And this patch adds |bool* aHandled| to the helper methods. Then, *aHandled and *aCancel are now always returns the result of each method. Therefore, for merging the result of multiple helper methods, callers need to receive the result with temporary variables and merge them by themselves. Note that when they modify DOM node actually or the action should do nothing (for example, selection is across tables), aHandled is set to true. Tag #1563
* | Merge pull request #1595 from Lootyhoof/issue-1578-fixupNew Tobin Paradigm2020-06-14-1/+0
|\ \ | | | | | | Remove unnecessary MOZ_ASSERT from widget/gtk/nsNativeMenuService.cpp
| * | Follow up to Issue #1578 - Remove unnecessary MOZ_ASSERTLootyhoof2020-06-14-1/+0
| | |
* | | Issue #1594 - restore UAC elevation in the uninstaller.Moonchild2020-06-14-28/+7
| |/ |/| | | | | | | | | Effectively backs out BZ 1333789 which was uplifted to Firefox before we forked for UXP. Resolves #1594
* | Merge pull request #1590 from g4jc/mail_patchNew Tobin Paradigm2020-06-14-19/+35
|\ \ | | | | | | Don't allow STARTTLS when server sends PREAUTH
| * | Bug 1613623 - For IMAP, no longer allow STARTTLS when server sends PREAUTH ↵Gaming4JC2020-06-11-19/+35
| | | | | | | | | | | | | | | | | | greeting. Tag #1312
* | | Merge pull request #1591 from MoonchildProductions/sr.activeElement-workMoonchild2020-06-14-419/+556
|\ \ \ | |_|/ |/| | Implement ShadowRoot.activeElement
| * | Bug 1430299 - Add DocumentOrShadowRoot interfaceMatt A. Tobin2020-06-13-6/+31
| | | | | | | | | | | | Tag #1375
| * | Bug 1429656 - Implement ShadowRoot.activeElementMatt A. Tobin2020-06-13-72/+88
| | | | | | | | | | | | Tag #1375
| * | Bug 1426494 - Share more code between nsIDocument and ShadowRootMatt A. Tobin2020-06-13-335/+369
| | | | | | | | | | | | Tag #1375
| * | Bug 1355787 - nsIdentifierMapEntry should let one to use either strings or ↵Matt A. Tobin2020-06-13-22/+76
| | | | | | | | | | | | | | | | | | atoms as keys to avoid slow string assignments when possible. Tag #1375
| * | Bug 1217436 - Make nsIdentifierMapEntry::mIdContentList an AutoTArray to ↵Matt A. Tobin2020-06-13-4/+12
|/ / | | | | | | | | | | save an allocation Tag #1375
* | Merge branch 'abortcontroller-work'Moonchild2020-06-12-43/+1381
|\ \
| * | Issue #1587 - Part 10: Expose controlling pref and enable by defaultMoonchild2020-06-12-0/+3
| | |
| * | Issue #1587 - Part 9: Immediately reject an already-aborted signalMoonchild2020-06-12-1/+6
| | |
| * | Issue #1587 - Part 8: Remove controller follow/unfollowMoonchild2020-06-12-124/+1
| | | | | | | | | | | | Since it didn't end up being in the final spec after all.