firefox: drop dbus patch

This commit is contained in:
Dylan Araps 2020-08-26 17:58:51 +03:00
parent f7e3b61bcc
commit a86e7301c3
No known key found for this signature in database
GPG Key ID: 46D62DD9F1DE636E
4 changed files with 0 additions and 372 deletions

View File

@ -1,7 +1,5 @@
#!/bin/sh -e
patch -p1 < no-dbus.patch
# Remove libc header which conflicts with 7 or so Linux
# kernel headers. See: https://github.com/kisslinux/repo/issues/207
sed -i '/net\/if/d' \

View File

@ -1,4 +1,3 @@
380d9853e0712442ba2d4acd85c0e09c19ad36561a3ea8932705ad6b8a91146a
f0611136bee505811e9ca11ca7ac188ef5323a8e2ef19cffd3edb3cf08fd791e
3dce6601b495f5b3d45b59f7d2492a340ee7e84b5beca17e48f862502bd5603f
458bcc3e2e86d380f06cb8c569e7a333ca4ad513434a9a2d96a1810fc587941e

View File

@ -1,368 +0,0 @@
diff --git a/Cargo.lock b/Cargo.lock
index 326a465696..2d40df9787 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -109,25 +109,11 @@ dependencies = [
"bitflags",
]
-[[package]]
-name = "audio_thread_priority"
-version = "0.23.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cec7141c59547709f640219f15512026d416c0ca8ce7a5ac1524923ee65be2cb"
-dependencies = [
- "cfg-if",
- "dbus",
- "libc",
- "log",
- "mach",
- "winapi 0.3.7",
-]
[[package]]
name = "audioipc"
version = "0.2.5"
dependencies = [
- "audio_thread_priority",
"bincode",
"bytes 0.4.9",
"cc",
@@ -154,7 +140,6 @@ dependencies = [
name = "audioipc-client"
version = "0.4.0"
dependencies = [
- "audio_thread_priority",
"audioipc",
"cubeb-backend",
"futures 0.1.29",
@@ -167,7 +152,6 @@ dependencies = [
name = "audioipc-server"
version = "0.2.3"
dependencies = [
- "audio_thread_priority",
"audioipc",
"cubeb-core",
"error-chain",
@@ -1893,7 +1877,6 @@ name = "gkrust-shared"
version = "0.1.0"
dependencies = [
"app_services_logger",
- "audio_thread_priority",
"audioipc-client",
"audioipc-server",
"authenticator",
diff --git a/dom/ipc/ContentChild.cpp b/dom/ipc/ContentChild.cpp
index b2edfd37ca..f88dfd031f 100644
--- a/dom/ipc/ContentChild.cpp
+++ b/dom/ipc/ContentChild.cpp
@@ -116,9 +116,7 @@
#include "GMPServiceChild.h"
#include "nsIStringBundle.h"
#include "Geolocation.h"
-#include "audio_thread_priority.h"
#include "nsIConsoleService.h"
-#include "audio_thread_priority.h"
#include "nsIURIMutator.h"
#include "nsIInputStreamChannel.h"
#include "nsFocusManager.h"
@@ -1628,9 +1626,7 @@ mozilla::ipc::IPCResult ContentChild::RecvSetProcessSandbox(
if (StaticPrefs::media_cubeb_sandbox()) {
// This needs to happen regardless of whether sandboxing is enabled.
- if (atp_set_real_time_limit(0, 48000)) {
NS_WARNING("could not set real-time limit at process startup");
- }
InstallSoftRealTimeLimitHandler();
} else if (sandboxEnabled) {
// Pre-start audio before sandboxing; see bug 1443612.
diff --git a/dom/media/GraphRunner.cpp b/dom/media/GraphRunner.cpp
index 6ea8f2e9ca..51dba21d71 100644
--- a/dom/media/GraphRunner.cpp
+++ b/dom/media/GraphRunner.cpp
@@ -13,7 +13,6 @@
#include "nsISupportsPriority.h"
#include "prthread.h"
#include "Tracing.h"
-#include "audio_thread_priority.h"
namespace mozilla {
@@ -95,8 +94,6 @@ auto GraphRunner::OneIteration(GraphTime aStateEnd, GraphTime aIterationEnd,
}
NS_IMETHODIMP GraphRunner::Run() {
- atp_handle* handle =
- atp_promote_current_thread_to_real_time(0, mGraph->GraphRate());
nsCOMPtr<nsIThreadInternal> threadInternal = do_QueryInterface(mThread);
threadInternal->SetObserver(mGraph);
@@ -119,9 +116,6 @@ NS_IMETHODIMP GraphRunner::Run() {
mMonitor.Notify();
}
- if (handle) {
- atp_demote_current_thread_from_real_time(handle);
- }
return NS_OK;
}
diff --git a/dom/media/UnderrunHandlerLinux.cpp b/dom/media/UnderrunHandlerLinux.cpp
index 05646fbeb8..1de4f6f43a 100644
--- a/dom/media/UnderrunHandlerLinux.cpp
+++ b/dom/media/UnderrunHandlerLinux.cpp
@@ -9,7 +9,6 @@
#include <mozilla/Sprintf.h>
#include <mozilla/Atomics.h>
-#include "audio_thread_priority.h"
#include "nsDebug.h"
namespace mozilla {
@@ -58,21 +57,8 @@ void InstallSoftRealTimeLimitHandler() {
}
void DemoteThreadFromRealTime() {
- atp_thread_info* info = atp_get_current_thread_info();
- if (!info) {
NS_WARNING("Could not get current thread info when demoting thread.");
return;
- }
- int rv = atp_demote_thread_from_real_time(info);
- if (rv) {
- NS_WARNING("Could not demote thread from real-time.");
- return;
- }
- rv = atp_free_thread_info(info);
- if (rv) {
- NS_WARNING("Could not free atp_thread_info struct");
- }
- gRealtimeLimitReached = false;
}
} // namespace mozilla
diff --git a/dom/media/moz.build b/dom/media/moz.build
index 9a827378e5..204067f65a 100644
--- a/dom/media/moz.build
+++ b/dom/media/moz.build
@@ -98,7 +98,6 @@ XPIDL_SOURCES += [
XPIDL_MODULE = 'dom_media'
EXPORTS += [
- '../../third_party/rust/audio_thread_priority/audio_thread_priority.h',
'ADTSDecoder.h',
'ADTSDemuxer.h',
'AsyncLogger.h',
diff --git a/media/audioipc/audioipc/Cargo.toml b/media/audioipc/audioipc/Cargo.toml
index 69e38bbe77..d9d2cf7d95 100644
--- a/media/audioipc/audioipc/Cargo.toml
+++ b/media/audioipc/audioipc/Cargo.toml
@@ -19,7 +19,6 @@ serde = "1"
serde_derive = "1"
tokio = "0.1"
tokio-io = "0.1"
-audio_thread_priority = "0.23.4"
[target.'cfg(unix)'.dependencies]
iovec = "0.1"
diff --git a/media/audioipc/audioipc/src/messages.rs b/media/audioipc/audioipc/src/messages.rs
index 9cda962e0e..37e6119b74 100644
--- a/media/audioipc/audioipc/src/messages.rs
+++ b/media/audioipc/audioipc/src/messages.rs
@@ -5,8 +5,6 @@
use crate::PlatformHandle;
use crate::PlatformHandleType;
-#[cfg(target_os = "linux")]
-use audio_thread_priority::RtPriorityThreadInfo;
use cubeb::{self, ffi};
use std::ffi::{CStr, CString};
use std::os::raw::{c_char, c_int, c_uint};
@@ -211,8 +209,6 @@ pub enum ServerMessage {
StreamGetCurrentDevice(usize),
StreamRegisterDeviceChangeCallback(usize, bool),
- #[cfg(target_os = "linux")]
- PromoteThreadToRealTime([u8; std::mem::size_of::<RtPriorityThreadInfo>()]),
}
// Server -> Client messages.
@@ -243,8 +239,6 @@ pub enum ClientMessage {
StreamCurrentDevice(Device),
StreamRegisterDeviceChangeCallback,
- #[cfg(target_os = "linux")]
- ThreadPromoted,
Error(c_int),
}
diff --git a/media/audioipc/client/Cargo.toml b/media/audioipc/client/Cargo.toml
index 2119145607..2fbccc05df 100644
--- a/media/audioipc/client/Cargo.toml
+++ b/media/audioipc/client/Cargo.toml
@@ -9,7 +9,6 @@ description = "Cubeb Backend for talking to remote cubeb server."
edition = "2018"
[dependencies]
-audio_thread_priority = "0.23.4"
audioipc = { path="../audioipc" }
cubeb-backend = "0.7"
futures = { version="0.1.18", default-features=false, features=["use_std"] }
diff --git a/media/audioipc/client/src/context.rs b/media/audioipc/client/src/context.rs
index 7441d0c0e0..57ad55316d 100644
--- a/media/audioipc/client/src/context.rs
+++ b/media/audioipc/client/src/context.rs
@@ -6,10 +6,6 @@
use crate::stream;
use crate::{assert_not_in_callback, run_in_callback};
use crate::{ClientStream, AUDIOIPC_INIT_PARAMS};
-#[cfg(target_os = "linux")]
-use audio_thread_priority::get_current_thread_info;
-#[cfg(not(target_os = "linux"))]
-use audio_thread_priority::promote_current_thread_to_real_time;
use audioipc::codec::LengthDelimitedCodec;
use audioipc::frame::{framed, Framed};
use audioipc::platformhandle_passing::{framed_with_platformhandles, FramedWithPlatformHandles};
@@ -77,31 +73,6 @@ impl ClientContext {
}
}
-#[cfg(target_os = "linux")]
-fn promote_thread(rpc: &rpc::ClientProxy<ServerMessage, ClientMessage>) {
- match get_current_thread_info() {
- Ok(info) => {
- let bytes = info.serialize();
- // Don't wait for the response, this is on the callback thread, which must not block.
- rpc.call(ServerMessage::PromoteThreadToRealTime(bytes));
- }
- Err(_) => {
- warn!("Could not remotely promote thread to RT.");
- }
- }
-}
-
-#[cfg(not(target_os = "linux"))]
-fn promote_thread(_rpc: &rpc::ClientProxy<ServerMessage, ClientMessage>) {
- match promote_current_thread_to_real_time(0, 48000) {
- Ok(_) => {
- info!("Audio thread promoted to real-time.");
- }
- Err(_) => {
- warn!("Could not promote thread to real-time.");
- }
- }
-}
fn register_thread(callback: Option<extern "C" fn(*const ::std::os::raw::c_char)>) {
if let Some(func) = callback {
@@ -121,7 +92,6 @@ fn promote_and_register_thread(
rpc: &rpc::ClientProxy<ServerMessage, ClientMessage>,
callback: Option<extern "C" fn(*const ::std::os::raw::c_char)>,
) {
- promote_thread(rpc);
register_thread(callback);
}
diff --git a/media/audioipc/server/Cargo.toml b/media/audioipc/server/Cargo.toml
index 155e69621e..99a3440d33 100644
--- a/media/audioipc/server/Cargo.toml
+++ b/media/audioipc/server/Cargo.toml
@@ -9,7 +9,6 @@ description = "Remote cubeb server"
edition = "2018"
[dependencies]
-audio_thread_priority = "0.23.4"
audioipc = { path = "../audioipc" }
cubeb-core = "0.7.0"
futures = "0.1.29"
diff --git a/media/audioipc/server/src/lib.rs b/media/audioipc/server/src/lib.rs
index 4d49c8fc08..3c44ee3def 100644
--- a/media/audioipc/server/src/lib.rs
+++ b/media/audioipc/server/src/lib.rs
@@ -9,7 +9,6 @@ extern crate error_chain;
#[macro_use]
extern crate log;
-use audio_thread_priority::promote_current_thread_to_real_time;
use audioipc::core;
use audioipc::platformhandle_passing::framed_with_platformhandles;
use audioipc::rpc;
@@ -64,12 +63,6 @@ fn run() -> Result<ServerWrapper> {
let callback_thread = core::spawn_thread(
"AudioIPC Callback RPC",
|| {
- match promote_current_thread_to_real_time(0, 48000) {
- Ok(_) => {}
- Err(_) => {
- debug!("Failed to promote audio callback thread to real-time.");
- }
- }
trace!("Starting up cubeb audio callback event loop thread...");
Ok(())
},
diff --git a/media/audioipc/server/src/server.rs b/media/audioipc/server/src/server.rs
index f07432f71f..b90e9d9be7 100644
--- a/media/audioipc/server/src/server.rs
+++ b/media/audioipc/server/src/server.rs
@@ -3,8 +3,6 @@
// This program is made available under an ISC-style license. See the
// accompanying file LICENSE for details
-#[cfg(target_os = "linux")]
-use audio_thread_priority::{promote_thread_to_real_time, RtPriorityThreadInfo};
use audioipc;
use audioipc::codec::LengthDelimitedCodec;
use audioipc::frame::{framed, Framed};
@@ -636,19 +634,6 @@ impl CubebServer {
)
.unwrap_or_else(error),
- #[cfg(target_os = "linux")]
- ServerMessage::PromoteThreadToRealTime(thread_info) => {
- let info = RtPriorityThreadInfo::deserialize(thread_info);
- match promote_thread_to_real_time(info, 0, 48000) {
- Ok(_) => {
- info!("Promotion of content process thread to real-time OK");
- }
- Err(_) => {
- warn!("Promotion of content process thread to real-time error");
- }
- }
- ClientMessage::ThreadPromoted
- }
};
trace!("process_msg: req={:?}, resp={:?}", msg, resp);
diff --git a/toolkit/library/rust/shared/Cargo.toml b/toolkit/library/rust/shared/Cargo.toml
index 0426ff4076..e678ab05bc 100644
--- a/toolkit/library/rust/shared/Cargo.toml
+++ b/toolkit/library/rust/shared/Cargo.toml
@@ -41,7 +41,6 @@ storage = { path = "../../../../storage/rust" }
bookmark_sync = { path = "../../../components/places/bookmark_sync", optional = true }
shift_or_euc_c = "0.1.0"
chardetng_c = "0.1.1"
-audio_thread_priority = "0.23.4"
mdns_service = { path="../../../../media/mtransport/mdns_service", optional = true }
neqo_glue = { path = "../../../../netwerk/socket/neqo_glue" }
rlbox_lucet_sandbox = { version = "0.1.0", optional = true }
@@ -103,7 +102,7 @@ remote_agent = ["remote"]
glean = ["fog"]
glean_with_gecko = ["fog/with_gecko"]
rust_fxa_client = ["firefox-accounts-bridge"]
-with_dbus = ["audio_thread_priority/with_dbus"]
+with_dbus = []
[lib]
path = "lib.rs"
diff --git a/toolkit/library/rust/shared/lib.rs b/toolkit/library/rust/shared/lib.rs
index eaaa6a6186..e576badc7d 100644
--- a/toolkit/library/rust/shared/lib.rs
+++ b/toolkit/library/rust/shared/lib.rs
@@ -52,7 +52,6 @@ extern crate xpcom;
#[cfg(feature = "new_xulstore")]
extern crate xulstore;
-extern crate audio_thread_priority;
#[cfg(not(target_os = "android"))]
extern crate webext_storage_bridge;

View File

@ -1,4 +1,3 @@
https://ftp.mozilla.org/pub/firefox/releases/80.0/source/firefox-80.0.source.tar.xz
https://ftp.gnu.org/gnu/autoconf/autoconf-2.13.tar.gz autoconf2.13/
https://www.tortall.net/projects/yasm/releases/yasm-1.3.0.tar.gz yasm/
patches/no-dbus.patch