Commit graph

4,139 commits

Author SHA1 Message Date
adeshkp
cbd06086ea Fix usage of a macro in a cocoa widget (#1649)
* Issue #457 - Fix usage of a macro in a cocoa widget
2020-09-16 21:11:03 +08:00
Moonchild
dc12585a82 Issue #1650 - Add null check.
There are situations where nsCSSClipPathinstance->CreateClipPath(dt)
returns null. We need to check for this before trying to use its
functions. If there is no clip path, then always return "no hit".
2020-09-16 21:11:02 +08:00
adeshkp
f7b02cecab Issue #1280 - Remove hostname parameter to trust domain.
Host name was purely being used for HPKP and since HPKP is killed,
this can also go. Currently it doesn't do anything other than
generating build warnings.
2020-09-16 21:11:01 +08:00
Moonchild
08809c7f12 [Pale-Moon] Issue #1717 - Add distinct mixed-mode indicator and logic for display. 2020-09-12 07:24:29 +08:00
Moonchild
347bfc5741 [Pale-Moon] Issue MoonchildProductions/UXP#1644 - Remove plugin check leftovers (front-end)
Includes appropriate platform pointer update.
2020-09-12 07:24:01 +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
7316d91ba2 Issue #618 - Make ES6 modules work for resource: URIs 2020-09-10 21:07:51 +08:00
Moonchild
1e87731ce1 Issue #618 - Implement preloading of module scripts.
This hooks up module scripts to the existing preload mechanism.
2020-09-10 21:07:50 +08:00
Moonchild
065ef47e65 Issue #1639 - Implement object.fromEntries()
Adds a self-hosted implementation of this map->object conversion.
This resolves #1639.
2020-09-10 21:06:50 +08:00
Moonchild
bc02e9541f Issue #1644 - Remove plugin checking code leftovers 2020-09-10 21:06:49 +08:00
Moonchild
00eb2c7983 Clobber for CSS flow-root implementation 2020-09-04 22:32:55 +08:00
athenian200
9532970df5 Issue #1641 - Implement CSS flow-root keyword
This is just a clean port of 1322191 and follow-up 1325970. It really seems to add create a new way to access existing code relating to block formatting and floating elements rather than implementing new functionality, and it is mercifully straightforwards.
2020-09-04 22:31:00 +08:00
Moonchild
0af26afc22 Clobber for NSS update 2020-09-04 22:30:59 +08:00
Moonchild
38470e4fe9 [NSS] Version and build bump 2020-09-04 22:30:57 +08:00
J.C. Jones
0e23c7cc48 [NSS] Prevent slotLock race in NSC_GetTokenInfo
Basically, NSC_GetTokenInfo doesn't lock slot->slotLock before accessing slot
after obtaining it, even though slotLock is defined as its lock.
2020-09-04 22:30:55 +08:00
Matt A. Tobin
0442dd4ee5 [Pale-Moon] Add a configure option for Phoenix Extensions Dual-GUID System and set default off in confvars 2020-08-29 08:18:12 +08:00
Moonchild
589e9b77ae Issue #1587 followup - Improve resilience of AbortSignals. 2020-08-29 08:11:20 +08:00
Moonchild
2e6ec48b81 [misc/mar] Don't use a signed type for a length parameter. 2020-08-29 08:11:17 +08:00
Kris Maglione
f0f7b56d77 [DOM] Only construct JS-implemented objects if inner window is current. 2020-08-29 08:11:15 +08:00
Moonchild
209eb0a245 [media] Only include source error details in debugging scenarios.
Unless a user is debugging media errors, this detail is unnecessary to report
and could include sensitive data which could be abused by third-party
requesters. This aligns it with the standard success/error paradigms in normal
browsing situations.
2020-08-29 08:11:13 +08:00
Gaming4JC
527d5c6252 Issue #618 - Regenerate the HTML Parser code for nomodule changes
Ref: BZ 1446082
2020-08-29 08:10:47 +08:00
Gaming4JC
6c8f24a735 Issue #618 - Don't preload nomodule scripts when modules are enabled
Ref: BZ 1382020
2020-08-29 08:10:45 +08:00
Moonchild
3781c4a6dd Issue #618 - (async) Implement async attribute for inline module scripts.
This commit does several things:
- Moves the pref check from ScriptLoader to ns[I]Document so it can be called on
the document.
- Changes the atrribute freezing function to a better name that takes the
document as a parameter.
- Sets the proper async/defer attributes on HTML script elements based on
keywords and whether they are module scripts or not.
2020-08-29 08:10:42 +08:00
Moonchild
294721687c Issue #618 - (async) Keep track of script modes in a single mode state.
This simplifies handling of combinations of async/defer by assigning one and
only one state to scripts.
If async then always async > if defer or module then defer > otherwise blocking.
2020-08-29 08:10:40 +08:00
Moonchild
3fa4aabfad Issue #618 - (async, preload) Correctly pass info about async/defer to parser.
This makes sure we don't block body-referred sub-resources by head-referenced
defer and async scripts. This is important for all script loads, not just
modules, but is added here because it was run into while implementing modules.
2020-08-29 08:10:37 +08:00
Moonchild
d8c2bc2976 Issue #618 - (async) Split out function to add async request. 2020-08-29 08:10:35 +08:00
Moonchild
ecf9c7cf08 Issue #618 - Rename some script load request flags to be more descriptive. 2020-08-29 08:10:33 +08:00
Moonchild
b7dbc3e795 Issue #618 - Make document.currentScript null in modules.
Because the spec says so.
2020-08-29 08:10:31 +08:00
Jon Coppeard
d7889e2d2a Issue #618 - Fix processing of non-parser-generated module scripts. 2020-08-29 08:10:28 +08:00
Jon Coppeard
93d4766c01 Issue #618 - Handle errors for inline module scripts and ensure we update the
module map after fetch errors.
2020-08-29 08:10:26 +08:00
Moonchild
6c7ac2b844 Issue #618 - Split SRI verification out from OnStreamComplete. 2020-08-29 08:10:24 +08:00
Moonchild
7e6cd5def1 Issue #618 - Split handling of load errors out from OnStreamComplete. 2020-08-29 08:10:22 +08:00
Moonchild
9f5805eee2 Issue #618 - Integrity for descendant module scripts should be the empty string
Because the spec says so.
2020-08-29 08:10:20 +08:00
Jon Coppeard
75f3f09fc6 Issue #618 - Don't mute errors for module scripts because they always use CORS 2020-08-29 08:10:17 +08:00
Moonchild
684f4824da Issue #618: Pass down referrer and referrer policy when fetching modules.
Because the spec says so.
2020-08-29 08:09:41 +08:00
Moonchild
97617a3ab1 Issue #618: Ignore 'event' and 'for' attributes for module scripts.
Because the spec says so.
2020-08-29 08:09:38 +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
Gaming4JC
6639e9cdac Issue #618 - Keep track of which modules in a graph have been fetched using a visited set
Ref: BZ 1365187
2020-08-29 08:08:23 +08:00
Gaming4JC
f0d6e293a3 Issue #618 - Simplify module map interface
Ref: BZ 1365187
2020-08-29 08:08:19 +08:00
Gaming4JC
f3d348ebd7 Issue #618 - Align error handling for module scripts with the spec - Debug follow up
MODULE_STATUS_ERRORED is no more. Replacing with newer API.

Ref: BZ 1420420
2020-08-29 08:07:58 +08:00
Gaming4JC
f600824850 Issue #618 - Lazily initialise module binding maps - Debug follow up
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.
2020-08-29 08:07:54 +08:00
Jon Coppeard
40017437ab Issue #618 - Record module dependency before starting fetch so that error
handling works correctly

Ref BZ 1395896
2020-08-29 08:07:10 +08:00
Moonchild
39050b430e Issue #618 - Lazily initialise module binding maps
Make it so they are not allocated on a background thread in a different zone to
the final module.

Ref: BZ 1372258
2020-08-29 08:07:06 +08:00
Moonchild
1cfaf06d8f Issue #618 - Use a single slot for the module's environment object.
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.
2020-08-29 08:07:03 +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
933fb54415 Issue #618 - Fix error events fired when loading JS module dependencies fail
When module dependencies fail, don't spam with errors for each import; only fire
the error event once.

Ref: BZ 1421259
2020-08-29 08:06:57 +08:00
Matt A. Tobin
4413fcfdaa Update old.configure for --enable-phoenix-extensions 2020-08-29 08:06:38 +08:00
Andy
6d0384a86f [Pale-Moon] Issue #1717 - Total Level Rewrite
SSLStatus is now used for basically everything.
2020-08-21 15:11:32 +08:00
Andy
66a5df11c1 [Pale-Moon] Issue #1717 - Differentiate DV & EV Mixed Content
UXP drops STATE_IDENTITY_EV_TOPLEVEL for Mixed Content.
If we want to have different behaviors between DV and EV, we need to use nsISSLStatus.
2020-08-21 15:11:11 +08:00