Brian Smith
3e9fd21a38
Issue #2387 - Remove a missed AddRef() which could cause leaks. Update comments explaining how the reference counting works.
2023-11-30 09:52:07 +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
edb82ec9f2
Issue #1691 - Part 11: Fix incorrect reference counting in ModuleScript class.
...
(cherry picked from commit 4ef1fa98c9518f5c107424667229ddb6f9f97767)
2023-04-30 21:21:45 +08:00
Brian Smith
be916ef7ca
Issue #1691 - Part 9: Make import() work when the active script is in another document. https://bugzilla.mozilla.org/show_bug.cgi?id=1342012 Associate event handler with active script when they are compiled.
...
(cherry picked from commit 1a3cc5d6828a05a6309d959fad3c7e959ab9eb8d)
2023-04-30 21:21:19 +08:00
Brian Smith
d5d7bb5e47
Issue #1691 - Part 7d: Allow dynamic import in cases where there's no referencing script or module. Support dynamic import from classic scripts by creating ClassicScript objects and associating them with the compiled. https://bugzilla.mozilla.org/show_bug.cgi?id=1342012 This patch is incomplete, some code in ScriptLoader::EvaluateScript() could not be applied for missing dependencies. Part 7e will apply the missing dependencies and finish the patch.
...
(cherry picked from commit ce31a906e801b72f06385b0755710317ccf3658b)
2023-04-30 21:20:19 +08:00
Brian Smith
41eda05e57
Issue #1691 - Part 7c: Refactor ModuleScript into ClassicScript class and LoadedScript base class so we can represent all scripts that can perform dynamic import. https://bugzilla.mozilla.org/show_bug.cgi?id=1342012
...
(cherry picked from commit c37b8b55231f6609c87e49c84edf7e94a1bf5518)
2023-04-30 21:20:05 +08:00
Brian Smith
86e0057ea7
Issue #1691 - Part 6b: Initial browser support for dynamic import from module scripts. https://bugzilla.mozilla.org/show_bug.cgi?id=1342012 Factor out script fetch options from script load request classes. https://bugzilla.mozilla.org/show_bug.cgi?id=1480720 Remove support for version parameter from script loader. https://bugzilla.mozilla.org/show_bug.cgi?id=1428745
...
(cherry picked from commit 3ec2529aa6303f6950622e3cb91a23580649c73b)
2023-04-30 21:18:11 +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
Moonchild
8c395520d9
Issue #1656 - Part 1: Nuke most vim config lines in the tree.
...
Since these are just interpreted comments, there's 0 impact on actual code.
This removes all lines that match /* vim: set(.*)tw=80: */ with S&R -- there are
a few others scattered around which will be removed manually in a second part.
2020-09-25 22:04:12 +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
743bdc04fb
Issue #618 - Further align error handling for module scripts with the spec
...
Ref: BZ 1388728
2020-07-10 22:18:04 +08:00
Moonchild
a754a7be26
Issue #618 - Remove eager instantiation
...
This backs out the stuff added in Bug 1295978.
Ref: BZ 1295978, 1388728
2020-07-10 22:17:58 +08:00
Moonchild
c04b682a88
Issue #1603 - Part 2: Split some classes out of ScriptLoader.cpp
...
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.
2020-07-04 07:01:03 +08:00