mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Don't build testbinding-related code by default (#37034)
Disabling the TestBinding-related bindings and implementations saves 2mb in a release build. Also, we lost the related test preferences when we turned the layout-2020 tests on, so the tests have all been failing for a long time. Testing: Existing tests in CI. --------- Signed-off-by: Josh Matthews <josh@joshmatthews.net>
This commit is contained in:
parent
2eab9c6df1
commit
a028291466
35 changed files with 72 additions and 149 deletions
|
@ -27,6 +27,7 @@ use crate::dom::bindings::str::DOMString;
|
|||
use crate::dom::document::{FakeRequestAnimationFrameCallback, RefreshRedirectDue};
|
||||
use crate::dom::eventsource::EventSourceTimeoutCallback;
|
||||
use crate::dom::globalscope::GlobalScope;
|
||||
#[cfg(feature = "testbinding")]
|
||||
use crate::dom::testbinding::TestBindingCallback;
|
||||
use crate::dom::types::{Window, WorkerGlobalScope};
|
||||
use crate::dom::xmlhttprequest::XHRTimeoutCallback;
|
||||
|
@ -78,6 +79,7 @@ pub(crate) enum OneshotTimerCallback {
|
|||
XhrTimeout(XHRTimeoutCallback),
|
||||
EventSourceTimeout(EventSourceTimeoutCallback),
|
||||
JsTimer(JsTimerTask),
|
||||
#[cfg(feature = "testbinding")]
|
||||
TestBindingCallback(TestBindingCallback),
|
||||
FakeRequestAnimationFrame(FakeRequestAnimationFrameCallback),
|
||||
RefreshRedirectDue(RefreshRedirectDue),
|
||||
|
@ -89,6 +91,7 @@ impl OneshotTimerCallback {
|
|||
OneshotTimerCallback::XhrTimeout(callback) => callback.invoke(can_gc),
|
||||
OneshotTimerCallback::EventSourceTimeout(callback) => callback.invoke(),
|
||||
OneshotTimerCallback::JsTimer(task) => task.invoke(this, js_timers, can_gc),
|
||||
#[cfg(feature = "testbinding")]
|
||||
OneshotTimerCallback::TestBindingCallback(callback) => callback.invoke(),
|
||||
OneshotTimerCallback::FakeRequestAnimationFrame(callback) => callback.invoke(can_gc),
|
||||
OneshotTimerCallback::RefreshRedirectDue(callback) => callback.invoke(can_gc),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue