aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/eventsource.rs
Commit message (Collapse)AuthorAgeFilesLines
* Generate a trait abstracting over all known DOM interfaces (#34357)Josh Matthews2024-11-241-1/+1
| | | | | | | | | | | | | | | | | * script: Generate trait for all DOM interfaces and parameterize generated Methods traits over it. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * script: Update trait implementations with new generic type. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Formatting. Signed-off-by: Josh Matthews <josh@joshmatthews.net> --------- Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* cangc fixes in several files + event.rs + rtcpeerconnection.rs (#34002)chickenleaf2024-10-251-1/+1
| | | Signed-off-by: L Ashwin B <lashwinib@gmail.com>
* CanGc fixes from EventTarget::fire_event (#33985)tanishka2024-10-231-4/+4
| | | Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>
* More files with CanGc fixes (#33892)chickenleaf2024-10-181-10/+11
| | | | | | | | | | | | | * More files with CanGc fixes Signed-off-by: L Ashwin B <lashwinib@gmail.com> * removed the can_gc inside !task Signed-off-by: L Ashwin B <lashwinib@gmail.com> --------- Signed-off-by: L Ashwin B <lashwinib@gmail.com>
* Use `ROUTER::add_typed_route` instead of `ROUTER::add_route` everywhere (#33866)Simon Wülker2024-10-181-3/+3
| | | | | | | | | | | | | * Use ROUTER::add_typed_route where possible Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Update webxr, media and ipc-channel Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> --------- Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* net: Start reducing number of IPCs channels used for fetch with a ↵Martin Robinson2024-10-161-6/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `FetchThread` (#33863) Instead of creating a `ROUTER` for each fetch, create a fetch thread which handles all incoming and outcoming fetch requests. Now messages involving fetches carry a "request id" which indicates which fetch is being addressed by the message. This greatly reduces the number of file descriptors used by fetch. In addition, the interface for kicking off fetches is simplified when using the `Listener` with `Document`s and the `GlobalScope`. This does not fix all leaked file descriptors / mach ports, but greatly eliminates the number used. Now tests can be run without limiting procesess on modern macOS systems. Followup work: 1. There are more instances where fetch is done using the old method. Some of these require more changes in order to be converted to the `FetchThread` approach. 2. Eliminate usage of IPC channels when doing redirects. 3. Also eliminate the IPC channel used for cancel handling. 4. This change opens up the possiblity of controlling the priority of fetch requests. Fixes #29834. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* script: Include constructors and static methods in generated DOM traits (#33665)Josh Matthews2024-10-081-13/+12
| | | | | | | | | | | | | | | | | * Add all constructors, special operations, and static methods to generated DOM interface traits. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Move all constructors and static methods defined in bare impl blocks inside FooMethods trait impls. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Add missing doc links. Signed-off-by: Josh Matthews <josh@joshmatthews.net> --------- Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* script: Stop using `time` in DOM timers (#33262)Martin Robinson2024-08-301-5/+8
| | | | | | This switches to using `std::time` types for DOM timer operations, which allows removing our custom time units in favor of `Duration`. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* Start marking functions that can transitively trigger a GC (#33144)Josh Matthews2024-08-221-0/+5
| | | | | | | | | | | | | | | | | * Mark JS reflector wrappers as CanGc. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Propagate CanGc from reflect_dom_object_with_proto. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Mark DOM constructors as GC operations. Signed-off-by: Josh Matthews <josh@joshmatthews.net> --------- Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* clippy: fixed some warnings in components/script (#31888)Ekta Siwach2024-03-261-1/+1
|
* clippy: Fix `explicit_auto_deref` warnings in `components/script` (#31837)Oluwatobi Sofela2024-03-231-2/+2
| | | | | | | | | * clippy: Fix explicit auto-deref warnings * clippy: Fix explicit auto-deref warnings * refactor: Tidy up code * refactor: Fix method not found errors
* clippy: Fix needless borrow warnings (#31813)Oluwatobi Sofela2024-03-211-2/+2
|
* clippy: Fix redundant field names warnings (#31793)Oluwatobi Sofela2024-03-201-2/+2
|
* Strict import formatting (grouping and granularity) (#30325)Samson2023-09-111-21/+24
| | | | | * strict imports formatting * Reformat all imports
* No tracing of nop traceable fields (#29926)Samson2023-08-041-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add `no_trace` option to JSTraceable derive * NoTrace wrapper * Port some types to no_trace schematics * Fixing my unsafe mistakes (not tracing traceables) * Add docs & safety guards for no_trace Safety guards (trait shenanigans) guarantees safety usage of `no_trace` * Port canvas_traits to no_trace * Port servo_media to no_trace * Port net_traits to no_trace * Port style to no_trace * Port webgpu to no_trace * Port script_traits to no_trace * Port canvas_traits, devtools_traits, embedder_traits, profile_traits to no_trace * unrooted_must_root lint in seperate file * Add trace_in_no_trace_lint as script_plugin * Composable types in must_not_have_traceable * Introduced HashMapTracedValues wrapper * `HashMap<NoTrace<K>,V>`->`HashMapTracedValues<K,V>` * Port rest of servo's types to no_trace * Port html5ever, euclid, mime and http to no_trace * Port remaining externals to no_trace * Port webxr and Arc<Mutex<_>> * Fix spelling in notrace doc
* Rename reflect_dom_object2.Josh Matthews2023-05-311-2/+2
|
* Formatting.Josh Matthews2023-05-281-1/+6
|
* Support arbitrary protos when wrapping DOM objects with constructors.Josh Matthews2023-05-281-3/+7
|
* Make GlobalScope.get_cx a static method.Josh Matthews2023-05-201-2/+2
|
* Make url for "client" referrer mandatoryMatthias Deiml2020-06-171-0/+1
|
* Properly set the url on the Response object when the response is an ↵Bastien Orivel2020-05-061-1/+1
| | | | opaqueredirect
* Add trait DomObjectWrap to provide WRAP functionYUAN LYU2020-03-201-2/+1
|
* Fail fast on bad schemesPatrick Shaughnessy2020-02-101-3/+14
|
* rename compartment to realmKunal Mohan2020-01-241-1/+1
|
* Modify `script` to prevent further violations of snake_caseKunal Mohan2020-01-181-2/+3
|
* continue messageport, transferable, postmessage optionsGregory Terzian2019-10-191-1/+1
|
* begin messageport, transferable objects, implKeith Yeung2019-10-191-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Accept transfer argument for StructuredCloneData::write Allow structured clone reads to return a boolean Add Transferable trait Add basic skeletons to MessagePort Implement transfer and transfer-receiving steps on MessagePort Use transfer and transfer_receive in StructuredClone callbacks Implement MessageChannel Freeze the array object for the MessageEvent ports attribute Implement transfer argument on window.postMessage Use ReentrantMutex instead for MessagePortInternal Accept origin as a parameter in dispatch_jsval Fix BorrowMut crash with pending_port_message Detach port on closure and check for detached during transfer Enable webmessaging tests fix webidl fix
* Support CORS attributes for image elements.Josh Matthews2019-10-041-14/+10
|
* Modify *::get_cx methods to return a safe JSContext instead of a raw onemarmeladema2019-07-241-2/+2
|
* Create a helper API for entering a DOM object's compartmentKamil Niski2019-06-291-5/+2
| | | | | | Revert some unnecessary changes Fix fmt errors
* Upgrade headers, headers-core, and hyper_serde.Josh Matthews2019-06-131-1/+1
|
* Update to SpiderMonkey 66.Josh Matthews2019-05-101-2/+2
|
* Implementing the builder pattern for RequestInitLucas Fantacuci2019-04-101-13/+11
|
* Tweak the MIME comparison in EventSourceAnthony Ramine2019-01-141-12/+8
| | | | MIME parameters should not be inspected when checking for text/event-stream.
* Provide the source window as part of postMessage events.Josh Matthews2019-01-071-0/+1
|
* refactored performance timing to align with updated specddh2018-11-201-2/+33
| | | | | | | | | | | | refactoring with ResourceFetchMetadata implemented deprecated window.timing functionality created ResourceTimingListener trait fixed w3c links in navigation timing updated include.ini to run resource timing tests on ci
* Update MPL license to https (part 3)Jan Andre Ikenmeyer2018-11-191-1/+1
|
* Reorder importsPyfisch2018-11-061-4/+6
|
* Format remaining filesPyfisch2018-11-061-10/+21
|
* Sort `use` statementsSimon Sapin2018-11-061-4/+4
|
* `cargo fix --edition`Simon Sapin2018-11-061-16/+16
|
* Update hyper to 0.12Bastien Orivel2018-11-011-14/+14
|
* Remove Origin::unicode_serializationBastien Orivel2018-10-121-1/+1
| | | | Fixes #20701
* Format script componentchansuke2018-09-191-51/+92
|
* Introduce DOMTracker, cancel eventsource fetch when aborting document loadGregory Terzian2018-07-291-14/+40
|
* use remote-event task source in EventSourceGregory Terzian2018-07-131-6/+5
|
* introduce "per task source" ignoring of tasksGregory Terzian2018-07-101-2/+4
|
* Fetch cancellation: Add cancel_chan to FetchContextManish Goregaokar2017-11-171-2/+2
|
* Merge functionality of WebsocketConnect into FetchKeith Yeung2017-10-241-3/+6
|
* Replace all uses of the `heapsize` crate with `malloc_size_of`.Nicholas Nethercote2017-10-181-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Servo currently uses `heapsize`, but Stylo/Gecko use `malloc_size_of`. `malloc_size_of` is better -- it handles various cases that `heapsize` does not -- so this patch changes Servo to use `malloc_size_of`. This patch makes the following changes to the `malloc_size_of` crate. - Adds `MallocSizeOf` trait implementations for numerous types, some built-in (e.g. `VecDeque`), some external and Servo-only (e.g. `string_cache`). - Makes `enclosing_size_of_op` optional, because vanilla jemalloc doesn't support that operation. - For `HashSet`/`HashMap`, falls back to a computed estimate when `enclosing_size_of_op` isn't available. - Adds an extern "C" `malloc_size_of` function that does the actual heap measurement; this is based on the same functions from the `heapsize` crate. This patch makes the following changes elsewhere. - Converts all the uses of `heapsize` to instead use `malloc_size_of`. - Disables the "heapsize"/"heap_size" feature for the external crates that provide it. - Removes the `HeapSizeOf` implementation from `hashglobe`. - Adds `ignore` annotations to a few `Rc`/`Arc`, because `malloc_size_of` doesn't derive those types, unlike `heapsize`.