| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is the final step of #1799, where the majority of the generated
code for the JS bindings is now compiled as part of the script_bindings
build step. The remaining pieces in script must live there because they
refer to concrete DOM types; all code in script_bindings is generic over
the
[DomTypes](https://doc.servo.org/script/dom/bindings/codegen/DomTypes/trait.DomTypes.html)
trait.
My testing with incremental builds shows me a 12 second reduction in
build times on my 2024 M4 Macbook Pro when modifying code in the script
crate after these changes. Before this PR those changes took 20 seconds
to rebuild Servo, and now they take 8 seconds.
Testing: Existing WPT tests ensure no regressions.
Fixes: #1799
---------
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* script: Move HasParent to script_bindings and update imports for InheritTypes.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* script: Make principal creation generic over DOM interface.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* script: Move a bunch of proxy-related code to script_bindings.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* script: Make some proxy-related code generic over the DOM interface.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* script: Move DomSlice to script_bindings.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* script: Move some utility bindings code to script_bindings.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* script: Make enumerating and resolving globals generic over the DOM interface.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* script: Make realm helpers generic over the DOM interface.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* script: Move implementations on concrete DOM types to concrete bindings.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* script: Make additional codegen helpers generic over the DOM interface.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* script: Make iterator creation generic over the DOM interface.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* script: Make reporting an exception a generic operation.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* script: Move AsCCharPtrPtr to script_bindings.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* Formatting.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* Address clippy warnings.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
---------
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* script: Move num module to script_bindings.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* script: Make JS reflector creation generic over DOM trait.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* script: Move bindings-specific lock to script_bindings.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* script: Move DOM proto array code to script_bindings.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* script: Move finalizer implementations to script_bindings.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* script: Move some error routines to script_bindings.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* script: Move some DOM interface conversion routines to script_bindings.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* script: Make is_array_like generic over DOM trait.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* script: Use generic interfaces for conditional exposure functions.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* script: Move a bunch of routines used by codegen to script_bindings.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* Formatting.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* Fix clippy warnings.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
---------
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* fix: wrong ascii check in get_array_index_from_id
Signed-off-by: Michael Rees <mrees@noeontheend.com>
* Update WPT expectations
Signed-off-by: Michael Rees <mrees@noeontheend.com>
---------
Signed-off-by: Michael Rees <mrees@noeontheend.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* feat: add CanGc argument in get_dictionary_property
Signed-off-by: Arya Nair <aryaajitnair@gmail.com>
* feat: add CanGc argument in get_dictionary_property
Signed-off-by: Arya Nair <aryaajitnair@gmail.com>
---------
Signed-off-by: Arya Nair <aryaajitnair@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Explicitly reborrow MutableHandles
Signed-off-by: Greg Morenz <greg-morenz@droid.cafe>
* Unify jsapi_wrappers
Signed-off-by: Greg Morenz <greg-morenz@droid.cafe>
* Format mozjs changes
Signed-off-by: Greg Morenz <greg-morenz@droid.cafe>
* Update mozjs version
Signed-off-by: Greg Morenz <greg-morenz@droid.cafe>
---------
Signed-off-by: Greg Morenz <greg-morenz@droid.cafe>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* feat: add can_gc argument to to_frozen_array
Signed-off-by: Arya Nair <aryaajitnair@gmail.com>
* fix: linting issues
Signed-off-by: Arya Nair <aryaajitnair@gmail.com>
* feat: add can_gc in binding.conf
Signed-off-by: Arya Nair <aryaajitnair@gmail.com>
* fix: linting issues
Signed-off-by: Arya Nair <aryaajitnair@gmail.com>
---------
Signed-off-by: Arya Nair <aryaajitnair@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Use 2024 style edition
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* Reformat all code
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
---------
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
|
|
|
| |
Signed-off-by: Yerkebulan Tulibergenov <yerkebulan@gmail.com>
|
|
|
| |
Signed-off-by: Auguste Baum <auguste.apple@gmail.com>
|
|
|
| |
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
|
|
|
|
|
| |
(#35457)
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
|
|
|
| |
Signed-off-by: Stephen Muss <stephenmuss@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* script: Move DOMClass to script_bindings.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* script: Move DOMJSClass and get_dom_class to script_bindings.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* script: Move Castable/DerivedFrom/IDLInterface to script_bindings.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
---------
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* script: Restrict reexport visibility of DOM types.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* script: Mass pub->pub(crate) conversion.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* script: Hide existing dead code warnings.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* Formatting.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* Fix clippy warnings.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* Formatting.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* Fix unit tests.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* Fix clippy.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* More formatting.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
---------
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* script: Generate a runtime initialization for static JS binding information.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* script: Replace dummy static initializers with OnceLock.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* script: Fix clippy warnings.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* script: Only initialize statics for DOM interfaces with interface objects.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* script: Remove one unnecessary Box::leak usage.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* Tidy.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* script: Hide thread-unsafe OnceLock usage inside of a wrapper type.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* script: Mark ThreadUnsafeOnceLock::get unsafe.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* script: Simplify ThreadUnsafeOnceLock internals.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
---------
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Make generated bindings that return a WebIDL `any` value use out parameters.
Returning raw JSVal values makes it easier to create GC hazards in code
that calls these methods. Accepting a MutableHandle argument instead
ensures that the values are rooted by the caller.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* Update mozjs.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* Fix clippy warnings.
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
---------
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* frozen array in XRInputSourcesChangeEvent, update o_frozen_array doc
Signed-off-by: L Ashwin B <lashwinib@gmail.com>
* simplified changes
Signed-off-by: L Ashwin B <lashwinib@gmail.com>
* added tests
Signed-off-by: L Ashwin B <lashwinib@gmail.com>
---------
Signed-off-by: L Ashwin B <lashwinib@gmail.com>
|
|
|
|
|
|
|
|
| |
This change fixes all rustdoc errors and also adds a tidy check for a
very common rustdoc URL issue. Eventually rustdoc warnings should likely
cause the build to fail, but this catches those issues sooner in order
to not waste so much developer time.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
|
|
|
|
|
|
| |
Instead of asserting the raw pointer is not null, force callers to
produce a NonNull pointer.
Signed-off-by: Andriy Sultanov <sultanovandriy@gmail.com>
|
|
|
|
| |
Signed-off-by: Koki Saito <saitoto828@gmail.com>
Co-authored-by: kokisaito <kosaito@indeed.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* exception in JS Promise
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* EXCEPTION_TO_REJECTION on generic_call
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* PromiseRejectionEvent should handle promise as object
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* expectations
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
---------
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Impl promise exception to rejection for methods
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* Impl promise exception to rejection for getters
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* Impl promise exception to rejection for static methods
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* Add tests for exception to rejection
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* Expectations
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
---------
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* fix: Memory leak from CreateProxyWindowHandler
Signed-off-by: ede1998 <online@erik-hennig.me>
* fix: memory leak in WindowProxy
Signed-off-by: ede1998 <online@erik-hennig.me>
* fix: Memory leak in WindowProxyHandler through static
Signed-off-by: ede1998 <online@erik-hennig.me>
---------
Signed-off-by: ede1998 <online@erik-hennig.me>
|
| |
|
| |
|
|
|
|
|
|
|
| |
* clippy: Fix unnecessary cast warnings
* clippy: Replace redundant field names with their shorthand alternatives
* clippy: Delete struct pattern dereferencings
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* feat: try to deduplicate imports in codegen
* feat: another attempt
* feat: start testing imports
* feat: clean all global imports
* feat: remove shared imports from CGDescriptor
* feat: remove redundant imports from CGDescriptor
* fix: formatting
* fix: remove libc (base level import)
* feat: roll back named path changes
* feat: last changes and tidy
* experiment: move imports into a separate file
* fix: extra parenthesis
* fix: remove repeated allow statement
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Use FLoat32Array in GamepadPose
Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
* Remove unused create_typed_array
Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
---------
Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
|
|
|
|
|
| |
* strict imports formatting
* Reformat all imports
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Update mozjs
* moztools4 in bootstrap
* no autoconf
* tidy
* switch to servo-build-deps
* update mozjs for real
* glue mozjs
* fmt
* move to servo/mozjs
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
principals)::ServoJSPrincipal`
|
| |
|
|
|
|
| |
#16501
|
|
|
|
| |
We don't make CCWs anymore.
|
|
|
|
| |
- 798c5b6: Bring `RustJSPrincipals` back
|
| |
|
|\
| |
| |
| |
| | |
`tests/wpt/web-platform-tests/html/browsers/origin/cross-origin-objects/cross-origin-objects.html`
was reverted to the upstream version.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|