mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
script: Limit public exports. (#34915)
* 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>
This commit is contained in:
parent
f220d6d3a5
commit
c94d909a86
585 changed files with 5411 additions and 5013 deletions
|
@ -38,7 +38,7 @@ use crate::dom::rtcpeerconnection::RTCPeerConnection;
|
|||
use crate::script_runtime::CanGc;
|
||||
|
||||
#[dom_struct]
|
||||
pub struct RTCDataChannel {
|
||||
pub(crate) struct RTCDataChannel {
|
||||
eventtarget: EventTarget,
|
||||
#[ignore_malloc_size_of = "defined in servo-media"]
|
||||
servo_media_id: DataChannelId,
|
||||
|
@ -56,7 +56,7 @@ pub struct RTCDataChannel {
|
|||
|
||||
impl RTCDataChannel {
|
||||
#[allow(crown::unrooted_must_root)]
|
||||
pub fn new_inherited(
|
||||
pub(crate) fn new_inherited(
|
||||
peer_connection: &RTCPeerConnection,
|
||||
label: USVString,
|
||||
options: &RTCDataChannelInit,
|
||||
|
@ -90,7 +90,7 @@ impl RTCDataChannel {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn new(
|
||||
pub(crate) fn new(
|
||||
global: &GlobalScope,
|
||||
peer_connection: &RTCPeerConnection,
|
||||
label: USVString,
|
||||
|
@ -113,7 +113,7 @@ impl RTCDataChannel {
|
|||
rtc_data_channel
|
||||
}
|
||||
|
||||
pub fn on_open(&self, can_gc: CanGc) {
|
||||
pub(crate) fn on_open(&self, can_gc: CanGc) {
|
||||
let event = Event::new(
|
||||
&self.global(),
|
||||
atom!("open"),
|
||||
|
@ -124,7 +124,7 @@ impl RTCDataChannel {
|
|||
event.upcast::<Event>().fire(self.upcast(), can_gc);
|
||||
}
|
||||
|
||||
pub fn on_close(&self, can_gc: CanGc) {
|
||||
pub(crate) fn on_close(&self, can_gc: CanGc) {
|
||||
let event = Event::new(
|
||||
&self.global(),
|
||||
atom!("close"),
|
||||
|
@ -138,7 +138,7 @@ impl RTCDataChannel {
|
|||
.unregister_data_channel(&self.servo_media_id);
|
||||
}
|
||||
|
||||
pub fn on_error(&self, error: WebRtcError, can_gc: CanGc) {
|
||||
pub(crate) fn on_error(&self, error: WebRtcError, can_gc: CanGc) {
|
||||
let global = self.global();
|
||||
let cx = GlobalScope::get_cx();
|
||||
let _ac = JSAutoRealm::new(*cx, self.reflector().get_jsobject().get());
|
||||
|
@ -159,7 +159,7 @@ impl RTCDataChannel {
|
|||
}
|
||||
|
||||
#[allow(unsafe_code)]
|
||||
pub fn on_message(&self, channel_message: DataChannelMessage, can_gc: CanGc) {
|
||||
pub(crate) fn on_message(&self, channel_message: DataChannelMessage, can_gc: CanGc) {
|
||||
unsafe {
|
||||
let global = self.global();
|
||||
let cx = GlobalScope::get_cx();
|
||||
|
@ -206,7 +206,7 @@ impl RTCDataChannel {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn on_state_change(&self, state: DataChannelState, can_gc: CanGc) {
|
||||
pub(crate) fn on_state_change(&self, state: DataChannelState, can_gc: CanGc) {
|
||||
if let DataChannelState::Closing = state {
|
||||
let event = Event::new(
|
||||
&self.global(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue