mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Move more bindings code to script_bindings (#35578)
* Move JSContext wrapper to script_bindings. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Move webidl constant bindings to script_bindings. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Move CanGc to script_bindings. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Move Dom<T> and Root<T> types to script_bindings. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Formatting. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Extra docs for new traits. 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>
This commit is contained in:
parent
54286229ea
commit
35f21e426b
23 changed files with 788 additions and 641 deletions
|
@ -96,6 +96,7 @@ impl MessagePort {
|
|||
}
|
||||
|
||||
/// <https://html.spec.whatwg.org/multipage/#message-port-post-message-steps>
|
||||
#[allow(unsafe_code)]
|
||||
fn post_message_impl(
|
||||
&self,
|
||||
cx: SafeJSContext,
|
||||
|
@ -115,7 +116,7 @@ impl MessagePort {
|
|||
|
||||
let ports = transfer
|
||||
.iter()
|
||||
.filter_map(|&obj| root_from_object::<MessagePort>(obj, *cx).ok());
|
||||
.filter_map(|&obj| unsafe { root_from_object::<MessagePort>(obj, *cx).ok() });
|
||||
for port in ports {
|
||||
// Step 2
|
||||
if port.message_port_id() == self.message_port_id() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue