servo/components/script
CYBAI dc2c2c8dfb Move away from Promise.all way and check if we need to finish manually
In the previous Promise.all way, we registered a promise for every
module script which means we will need to do many complex checkings like
"is this top level?" and it will make us much more difficult to understand
how the module script algorithm works.

In the new manual checking way, we will only register promises for top
level modules to notify its owner (e.g. the script element) to finish
the load. So, we can understand it much more easily and would be more
spec-aligned.

Also, I think the `Ready` and `FetchFailed` status are quite confusing
and we actually don't need them so they're removed in this patch. Then,
we will always go to `Finished` instead.

It would basically be following steps:

                                          +-----------------+
                                          | Failed to fetch | ----------+
+--------------+       +----------+     / +-----------------+           |
| Fetch module | ----> | Fetching | ---+                                v
+--------------+       +----------+     \ +---------+        +---------------------+
                                          | Fetched |        | Advance to Finished |
                                          +---------+        +---------------------+
                                               |                        ^
                                               v                        |
                                      +-------------------+             |
                                      | Fetch descendants | ----- if no descendants
                                      +-------------------+
                                               |
                                               V
                                     +----------------------+
                                     | Fetching Descendants |
                                     +----------------------+

In `Advance to Finished`, it means that module script is about to finished so it will

1. Notify all of its `ready` and `not finished` parents to finish
2. Link (instantiate) the module
3. Resolve its promise to notify owner(s) to finish
2020-06-13 11:11:25 +09:00
..
docs Update doc links and code snippet for trace implementation 2020-05-03 19:03:33 +05:30
dom Move away from Promise.all way and check if we need to finish manually 2020-06-13 11:11:25 +09:00
task_source
animation_timeline.rs Move most animation processing to script 2020-05-12 10:22:14 +02:00
animations.rs Add support for remaining animation and transition events 2020-05-26 20:34:58 +02:00
body.rs partially integrate streaming request bodies with http re-direct 2020-06-04 11:38:38 +08:00
build.rs Update error message. 2020-05-04 11:52:49 -04:00
canvas_state.rs Fix ./mach build --release --with-layout-2020 2020-06-10 22:34:24 +05:30
Cargo.toml Implement GPURenderPipeline 2020-05-30 11:38:32 +05:30
clipboard_provider.rs
devtools.rs
document_loader.rs
euclidext.rs
fetch.rs integrate readablestream with fetch and blob 2020-06-04 11:38:35 +08:00
image_listener.rs
init.rs
layout_image.rs
lib.rs serviceworker: make job queue unique per origin 2020-05-21 13:21:21 +08:00
mem.rs
microtask.rs
network_listener.rs
realms.rs
script_module.rs Move away from Promise.all way and check if we need to finish manually 2020-06-13 11:11:25 +09:00
script_runtime.rs integrate readablestream with fetch and blob 2020-06-04 11:38:35 +08:00
script_thread.rs reading unminified scripts from disk 2020-06-02 21:23:45 +02:00
serviceworker_manager.rs add a control chan to workers, use to signal shutdown 2020-06-03 12:32:47 +08:00
stylesheet_loader.rs Properly set the url on the Response object when the response is an opaqueredirect 2020-05-06 20:08:26 +02:00
stylesheet_set.rs
task.rs partially integrate streaming request bodies with http re-direct 2020-06-04 11:38:38 +08:00
task_manager.rs
task_queue.rs
test.rs
textinput.rs
timers.rs
unpremultiplytable.rs
webdriver_handlers.rs