aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/script_module.rs
Commit message (Collapse)AuthorAgeFilesLines
...
* Move away from Promise.all way and check if we need to finish manuallyCYBAI2020-06-131-587/+531
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* require entered realm, use aes, to append native promise handlerGregory Terzian2020-06-041-10/+10
|
* integrate readablestream with fetch and blobGregory Terzian2020-06-041-1/+1
|
* Introduce import.meta hook for module scriptCYBAI2020-05-171-1/+35
|
* Add InRealm argument to Callback traitTipowol2020-04-051-1/+1
|
* Use mozjs exposed function to generate SourceTextCYBAI2020-03-311-14/+3
|
* Update SpiderMonkeyAnthony Ramine2020-03-061-26/+31
|
* Use `essence` algorithm from mime crateCYBAI2020-03-021-7/+14
|
* Always pass InRealm to GlobalScope::from_context to avoid getting null globalCYBAI2020-02-161-2/+5
|
* rename compartment to realmKunal Mohan2020-01-241-8/+8
|
* Auto merge of #25552 - CYBAI:fix-25436, r=jdmbors-servo2020-01-201-3/+4
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Return the highest priority error from the descendant instead of return the very first one The test failed because we didn't return the highest priority error (which is network error in this case). As Manish mentioned in https://github.com/servo/servo/issues/25436#issuecomment-571065323, that's because we're using the Promise.all trick to signal loads. If we can avoid relying on Promise.all, maybe we don't need to do a complex logic like this; instead, ideally, we should always finish the module load immediately when we hit network failure so that we don't even need to do the `max()` comparison. --- - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #25436 - [x] There are tests for these changes <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
| * Return the highest priority error from the descendant instead of return the ↵CYBAI2020-01-201-3/+4
| | | | | | | | very first one
* | Modify `script` to prevent further violations of snake_caseKunal Mohan2020-01-181-2/+2
|/
* Fix module script MIME check to not include paramsManish Goregaokar2020-01-061-2/+11
| | | | Also makes it error when there is no MIME type available.
* Upgrade module fail warning log to errorManish Goregaokar2020-01-061-1/+1
|
* Remove redundant checking of promise resolve and clone of URLsCYBAI2020-01-061-20/+4
|
* Use IndexSet for storing descendantsManish Goregaokar2020-01-061-12/+22
| | | | Fixes intermittent failures in `/html/semantics/scripting-1/the-script-element/module/choice-of-error-1.html`
* Support module script credentials modeCYBAI2020-01-031-4/+22
|
* Support `integrity` for module scriptCYBAI2020-01-031-0/+5
|
* Scaffold module scriptCYBAI2020-01-031-0/+1404