Merge mozilla-central to mozilla-inbound

This commit is contained in:
arthur.iakab 2019-03-25 17:57:57 +02:00
Родитель c8131a108b ee02cd6515
Коммит 1ab45e3251
328 изменённых файлов: 17840 добавлений и 7114 удалений

Просмотреть файл

@ -22,5 +22,10 @@ git = "https://github.com/glandium/cc-rs"
branch = "1.0.23-clang-cl-aarch64"
replace-with = "vendored-sources"
[source."https://github.com/rust-lang-nursery/packed_simd"]
git = "https://github.com/hsivonen/packed_simd"
branch = "rust_1_32"
replace-with = "vendored-sources"
[source.vendored-sources]
directory = '@top_srcdir@/third_party/rust'

55
Cargo.lock сгенерированный
Просмотреть файл

@ -146,7 +146,7 @@ version = "0.3.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"backtrace-sys 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)",
"cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-demangle 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.3.6 (git+https://github.com/froydnj/winapi-rs?branch=aarch64)",
@ -232,7 +232,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
"cexpr 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
"cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
"clang-sys 0.26.1 (registry+https://github.com/rust-lang/crates.io-index)",
"clap 2.31.2 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
@ -451,7 +451,7 @@ dependencies = [
[[package]]
name = "cfg-if"
version = "0.1.2"
version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
@ -664,7 +664,7 @@ version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"arrayvec 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
"cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
"crossbeam-utils 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"memoffset 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
@ -678,7 +678,7 @@ version = "0.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"arrayvec 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
"cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
"crossbeam-utils 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"memoffset 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
@ -690,7 +690,7 @@ name = "crossbeam-utils"
version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@ -698,7 +698,7 @@ name = "crossbeam-utils"
version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@ -706,7 +706,7 @@ name = "crossbeam-utils"
version = "0.6.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@ -953,25 +953,25 @@ name = "encoding_c"
version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"encoding_rs 0.8.14 (registry+https://github.com/rust-lang/crates.io-index)",
"encoding_rs 0.8.16 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "encoding_glue"
version = "0.1.0"
dependencies = [
"encoding_rs 0.8.14 (registry+https://github.com/rust-lang/crates.io-index)",
"encoding_rs 0.8.16 (registry+https://github.com/rust-lang/crates.io-index)",
"nserror 0.1.0",
"nsstring 0.1.0",
]
[[package]]
name = "encoding_rs"
version = "0.8.14"
version = "0.8.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"simd 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
"cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
"packed_simd 0.3.3 (git+https://github.com/hsivonen/packed_simd?branch=rust_1_32)",
]
[[package]]
@ -1630,7 +1630,7 @@ name = "log"
version = "0.4.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@ -1897,7 +1897,7 @@ name = "net2"
version = "0.2.32"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.3.6 (git+https://github.com/froydnj/winapi-rs?branch=aarch64)",
]
@ -1951,7 +1951,7 @@ name = "nsstring"
version = "0.1.0"
dependencies = [
"bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
"encoding_rs 0.8.14 (registry+https://github.com/rust-lang/crates.io-index)",
"encoding_rs 0.8.16 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@ -2037,6 +2037,14 @@ dependencies = [
"stable_deref_trait 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "packed_simd"
version = "0.3.3"
source = "git+https://github.com/hsivonen/packed_simd?branch=rust_1_32#3541e3818fdc7c2a24f87e3459151a4ce955a67a"
dependencies = [
"cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "parking_lot"
version = "0.6.3"
@ -2550,11 +2558,6 @@ dependencies = [
"opaque-debug 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "simd"
version = "0.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "siphasher"
version = "0.2.1"
@ -3158,7 +3161,7 @@ name = "uuid"
version = "0.6.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
"rand 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
]
@ -3243,7 +3246,7 @@ dependencies = [
"bincode 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
"byteorder 1.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
"cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
"core-foundation 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)",
"core-graphics 0.17.1 (registry+https://github.com/rust-lang/crates.io-index)",
"core-text 13.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
@ -3483,7 +3486,7 @@ dependencies = [
"checksum cast 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "926013f2860c46252efceabb19f4a6b308197505082c609025aa6706c011d427"
"checksum cc 1.0.23 (git+https://github.com/glandium/cc-rs?branch=1.0.23-clang-cl-aarch64)" = "<none>"
"checksum cexpr 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "8fc0086be9ca82f7fc89fc873435531cb898b86e850005850de1f820e2db6e9b"
"checksum cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d4c819a1287eb618df47cc647173c5c4c66ba19d888a6e50d605672aed3140de"
"checksum cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "082bb9b28e00d3c9d39cc03e64ce4cea0f1bb9b3fde493f0cbc008472d22bdf4"
"checksum chrono 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "45912881121cb26fad7c38c17ba7daa18764771836b34fab7d3fbd93ed633878"
"checksum clang-sys 0.26.1 (registry+https://github.com/rust-lang/crates.io-index)" = "481e42017c1416b1c0856ece45658ecbb7c93d8a93455f7e5fa77f3b35455557"
"checksum clap 2.31.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f0f16b89cbb9ee36d87483dc939fe9f1e13c05898d56d7b230a0d4dff033a536"
@ -3536,7 +3539,7 @@ dependencies = [
"checksum either 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "18785c1ba806c258137c937e44ada9ee7e69a37e3c72077542cd2f069d78562a"
"checksum ena 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)" = "88dc8393b3c7352f94092497f6b52019643e493b6b890eb417cdb7c46117e621"
"checksum encoding_c 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "769ecb8b33323998e482b218c0d13cd64c267609023b4b7ec3ee740714c318ee"
"checksum encoding_rs 0.8.14 (registry+https://github.com/rust-lang/crates.io-index)" = "a69d152eaa438a291636c1971b0a370212165ca8a75759eb66818c5ce9b538f7"
"checksum encoding_rs 0.8.16 (registry+https://github.com/rust-lang/crates.io-index)" = "0535f350c60aac0b87ccf28319abc749391e912192255b0c00a2c12c6917bd73"
"checksum env_logger 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)" = "0561146661ae44c579e993456bc76d11ce1e0c7d745e57b2fa7146b6e49fa2ad"
"checksum error-chain 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ff511d5dc435d703f4971bc399647c9bc38e20cb41452e3b9feb4765419ed3f3"
"checksum euclid 0.19.5 (registry+https://github.com/rust-lang/crates.io-index)" = "d1a7698bdda3d7444a79d33bdc96e8b518d44ea3ff101d8492a6ca1207b886ea"
@ -3624,6 +3627,7 @@ dependencies = [
"checksum ordered-float 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2f0015e9e8e28ee20c581cfbfe47c650cedeb9ed0721090e0b7ebb10b9cdbcc2"
"checksum ordermap 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "a86ed3f5f244b372d6b1a00b72ef7f8876d0bc6a78a4c9985c53614041512063"
"checksum owning_ref 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "49a4b8ea2179e6a2e27411d3bca09ca6dd630821cf6894c6c7c8467a8ee7ef13"
"checksum packed_simd 0.3.3 (git+https://github.com/hsivonen/packed_simd?branch=rust_1_32)" = "<none>"
"checksum parking_lot 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)" = "69376b761943787ebd5cc85a5bc95958651a22609c5c1c2b65de21786baec72b"
"checksum parking_lot_core 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "4db1a8ccf734a7bce794cc19b3df06ed87ab2f3907036b693c68f56b4d4537fa"
"checksum peeking_take_while 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099"
@ -3679,7 +3683,6 @@ dependencies = [
"checksum serde_json 1.0.26 (registry+https://github.com/rust-lang/crates.io-index)" = "44dd2cfde475037451fa99b7e5df77aa3cfd1536575fa8e7a538ab36dcde49ae"
"checksum sha2 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9eb6be24e4c23a84d7184280d2722f7f2731fcdd4a9d886efbfe4413e4847ea0"
"checksum sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7b4d8bfd0e469f417657573d8451fb33d16cfe0989359b93baf3a1ffc639543d"
"checksum simd 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "0048b17eb9577ac545c61d85c3559b41dfb4cbea41c9bd9ca6a4f73ff05fda84"
"checksum siphasher 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2ffc669b726f2bc9a3bcff66e5e23b56ba6bf70e22a34c3d7b6d0b3450b65b84"
"checksum slab 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "17b4fcaed89ab08ef143da37bc52adbcc04d4a69014f4c1208d6b51f0c47bc23"
"checksum slab 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5f9776d6b986f77b35c6cf846c11ad986ff128fe0b2b63a3628e3755e8d3102d"

Просмотреть файл

@ -61,3 +61,4 @@ libudev-sys = { path = "dom/webauthn/libudev-sys" }
serde_derive = { git = "https://github.com/servo/serde", branch = "deserialize_from_enums9" }
winapi = { git = "https://github.com/froydnj/winapi-rs", branch = "aarch64" }
cc = { git = "https://github.com/glandium/cc-rs", branch = "1.0.23-clang-cl-aarch64" }
packed_simd = { git = "https://github.com/hsivonen/packed_simd", branch = "rust_1_32" }

Просмотреть файл

@ -1130,10 +1130,28 @@ Accessible* DocAccessible::GetAccessibleByUniqueIDInSubtree(void* aUniqueID) {
Accessible* DocAccessible::GetAccessibleOrContainer(nsINode* aNode,
int aARIAHiddenFlag) const {
if (!aNode || !aNode->GetComposedDoc()) return nullptr;
if (!aNode || !aNode->GetComposedDoc()) {
return nullptr;
}
for (nsINode* currNode = aNode; currNode;
currNode = currNode->GetFlattenedTreeParentNode()) {
nsINode* currNode = nullptr;
if (aNode->IsShadowRoot()) {
// This can happen, for example, when called within
// SelectionManager::ProcessSelectionChanged due to focusing a direct
// child of a shadow root.
// GetFlattenedTreeParent works on children of a shadow root, but not the
// shadow root itself.
const dom::ShadowRoot* shadowRoot = dom::ShadowRoot::FromNode(aNode);
currNode = shadowRoot->GetHost();
if (!currNode) {
return nullptr;
}
} else {
currNode = aNode;
}
MOZ_ASSERT(currNode);
for (; currNode; currNode = currNode->GetFlattenedTreeParentNode()) {
// No container if is inside of aria-hidden subtree.
if (aARIAHiddenFlag == eNoContainerIfARIAHidden && currNode->IsElement() &&
aria::HasDefinedARIAHidden(currNode->AsElement())) {

Просмотреть файл

@ -530,10 +530,6 @@ var gTests = [
desc: "'Always Allow' disabled on http pages",
run: async function checkNoAlwaysOnHttp() {
// Load an http page instead of the https version.
await SpecialPowers.pushPrefEnv({ set: [
["media.devices.insecure.enabled", true],
["media.getusermedia.insecure.enabled", true],
]});
let browser = gBrowser.selectedBrowser;
BrowserTestUtils.loadURI(browser, browser.documentURI.spec.replace("https://", "http://"));
await BrowserTestUtils.browserLoaded(browser);

Просмотреть файл

@ -856,12 +856,17 @@ class UrlbarInput {
this.view.panel.setAttribute("actionoverride", "true");
} else if (this._actionOverrideKeyCount &&
--this._actionOverrideKeyCount == 0) {
this.removeAttribute("actionoverride");
this.view.panel.removeAttribute("actionoverride");
this._clearActionOverride();
}
}
}
_clearActionOverride() {
this._actionOverrideKeyCount = 0;
this.removeAttribute("actionoverride");
this.view.panel.removeAttribute("actionoverride");
}
/**
* Get the url to load for the search query and records in telemetry that it
* is being loaded.
@ -1145,6 +1150,10 @@ class UrlbarInput {
// Event handlers below.
_on_blur(event) {
// In certain cases, like holding an override key and confirming an entry,
// we don't key a keyup event for the override key, thus we make this
// additional cleanup on blur.
this._clearActionOverride();
this.formatValue();
// Respect the autohide preference for easier inspecting/debugging via
// the browser toolbox.

Просмотреть файл

@ -17,7 +17,7 @@ add_task(async function test_switchtab_override() {
let tab = await BrowserTestUtils.openNewForegroundTab(gBrowser, TEST_URL);
info("Opening and selecting second tab");
let secondTab = gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser);
let secondTab = await BrowserTestUtils.openNewForegroundTab(gBrowser);
registerCleanupFunction(() => {
try {
gBrowser.removeTab(tab);
@ -48,13 +48,24 @@ add_task(async function test_switchtab_override() {
BrowserTestUtils.browserLoaded(secondTab.linkedBrowser).then(deferred.resolve);
EventUtils.synthesizeKey("KEY_Shift", {type: "keydown"});
registerCleanupFunction(() => {
// Avoid confusing next tests by leaving a pending keydown.
EventUtils.synthesizeKey("KEY_Shift", {type: "keyup"});
});
let attribute = UrlbarPrefs.get("quantumbar") ? "actionoverride" : "noactions";
Assert.ok(UrlbarTestUtils.getPanel(window).hasAttribute(attribute),
"We should be overriding");
EventUtils.synthesizeKey("KEY_Enter");
info(`gURLBar.value = ${gURLBar.value}`);
await deferred.promise;
// Loading the page may move focus, thus ensure the urlbar receives the keyup
// event, to avoid confusing next tests.
gURLBar.focus();
EventUtils.synthesizeKey("KEY_Shift", {type: "keyup"});
// Blurring the urlbar should have cleared the override.
Assert.ok(!UrlbarTestUtils.getPanel(window).hasAttribute(attribute),
"We should not be overriding anymore");
await PlacesUtils.history.clear();
gBrowser.removeTab(tab);
gBrowser.removeTab(secondTab);
});

Просмотреть файл

@ -94,8 +94,6 @@ skip-if = debug || asan # Frequent intermittent failures, Bug 1522800
[browser_aboutdebugging_sidebar_usb_status.js]
skip-if = (os == 'linux' && bits == 32) # ADB start() fails on linux 32, see Bug 1499638
[browser_aboutdebugging_sidebar_usb_unknown_runtime.js]
[browser_aboutdebugging_stop_adb.js]
skip-if = (os == 'linux' && bits == 32) # ADB start() fails on linux 32, see Bug 1499638
[browser_aboutdebugging_system_addons.js]
[browser_aboutdebugging_tab_favicons.js]
[browser_aboutdebugging_telemetry_basic.js]

Просмотреть файл

@ -54,7 +54,7 @@ add_task(async function() {
info("Uninstall the adb extension and wait for the message to udpate");
adbAddon.uninstall();
await waitUntil(() => usbStatusElement.textContent.includes("USB disabled"));
await waitForAdbStop();
await stopAdbProcess();
await waitForRequestsToSettle(window.AboutDebugging.store);
await removeTab(tab);

Просмотреть файл

@ -60,7 +60,7 @@ add_task(async function() {
ok(document.querySelector(".js-connect-usb-disabled-message"),
"The message about enabling USB devices is rendered again");
await waitForAdbStop();
await stopAdbProcess();
await removeTab(tab);
});

Просмотреть файл

@ -37,7 +37,7 @@ add_task(async function() {
info("Uninstall the adb extension and wait for the message to udpate");
adbAddon.uninstall();
await waitUntil(() => usbStatusElement.textContent.includes("USB disabled"));
await waitForAdbStop();
await stopAdbProcess();
await removeTab(tab);
});

Просмотреть файл

@ -1,56 +0,0 @@
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
"use strict";
/* import-globals-from helper-adb.js */
Services.scriptloader.loadSubScript(CHROME_URL_ROOT + "helper-adb.js", this);
const { adbAddon } = require("devtools/shared/adb/adb-addon");
const { check } = require("devtools/shared/adb/adb-running-checker");
/**
* Check that ADB is stopped:
* - when the adb extension is uninstalled
* - when no consumer is registered
*/
add_task(async function() {
await pushPref("devtools.remote.adb.extensionURL",
CHROME_URL_ROOT + "resources/test-adb-extension/adb-extension-#OS#.xpi");
await checkAdbNotRunning();
const { tab } = await openAboutDebugging();
info("Install the adb extension and wait for ADB to start");
// Use "internal" as the install source to avoid triggering telemetry.
adbAddon.install("internal");
await waitForAdbStart();
info("Open a second about:debugging");
const { tab: secondTab } = await openAboutDebugging();
info("Close the second about:debugging and check that ADB is still running");
await removeTab(secondTab);
ok(await check(), "ADB is still running");
await removeTab(tab);
info("Check that the adb process stops after closing about:debugging");
await waitForAdbStop();
info("Open a third about:debugging, wait for the ADB to start again");
const { tab: thirdTab } = await openAboutDebugging();
await waitForAdbStart();
info("Uninstall the addon, this should stop ADB as well");
adbAddon.uninstall();
await waitForAdbStop();
info("Reinstall the addon, this should start ADB again");
adbAddon.install("internal");
await waitForAdbStart();
info("Close the last tab, this should stop ADB");
await removeTab(thirdTab);
await waitForAdbStop();
});

Просмотреть файл

@ -29,10 +29,14 @@ async function waitForAdbStart() {
}
/* exported waitForAdbStart */
// Attempt to stop ADB. Will only work if ADB was started by the current Firefox instance.
// Returns a promise that resolves when the adb process is no longer running.
async function waitForAdbStop() {
info("Wait for ADB to stop");
async function stopAdbProcess() {
info("Attempt to stop ADB");
const { adbProcess } = require("devtools/shared/adb/adb-process");
await adbProcess.stop();
info("Wait for ADB to stop");
const { check } = require("devtools/shared/adb/adb-running-checker");
return asyncWaitUntil(async () => {
const isProcessReady = adbProcess.ready;
@ -40,4 +44,4 @@ async function waitForAdbStop() {
return !isProcessReady && !isRunning;
});
}
/* exported waitForAdbStop */
/* exported stopAdbProcess */

Просмотреть файл

@ -68,7 +68,7 @@ class Adb extends EventEmitter {
return this._runtimes;
}
async _startAdb() {
async _startTracking() {
this._isTrackingDevices = true;
await adbProcess.start();
@ -79,11 +79,10 @@ class Adb extends EventEmitter {
this._timer = setInterval(this.updateRuntimes.bind(this), UPDATE_RUNTIMES_INTERVAL);
}
async _stopAdb() {
async _stopTracking() {
clearInterval(this._timer);
this._isTrackingDevices = false;
this._trackDevicesCommand.stop();
await adbProcess.stop();
this._devices = new Map();
this._runtimes = [];
@ -96,9 +95,9 @@ class Adb extends EventEmitter {
_updateAdbProcess() {
if (!this._isTrackingDevices && this._shouldTrack()) {
this._startAdb();
this._startTracking();
} else if (this._isTrackingDevices && !this._shouldTrack()) {
this._stopAdb();
this._stopTracking();
}
}

Просмотреть файл

@ -1517,13 +1517,11 @@ JSObject* Navigator::WrapObject(JSContext* cx,
}
/* static */
bool Navigator::HasUserMediaSupport(JSContext* cx, JSObject* obj) {
// Make enabling peerconnection enable getUserMedia() as well.
// Emulate [SecureContext] unless media.devices.insecure.enabled=true
return (StaticPrefs::media_navigator_enabled() ||
StaticPrefs::media_peerconnection_enabled()) &&
(IsSecureContextOrObjectIsFromSecureContext(cx, obj) ||
StaticPrefs::media_devices_insecure_enabled());
bool Navigator::HasUserMediaSupport(JSContext* /* unused */,
JSObject* /* unused */) {
// Make enabling peerconnection enable getUserMedia() as well
return Preferences::GetBool("media.navigator.enabled", false) ||
Preferences::GetBool("media.peerconnection.enabled", false);
}
/* static */

Просмотреть файл

@ -576,7 +576,7 @@ bool AudioCallbackDriver::Init() {
RefPtr<CubebDeviceEnumerator> enumerator = Enumerator::GetInstance();
RefPtr<AudioDeviceInfo> device = enumerator->DeviceInfoFromName(
NS_ConvertUTF8toUTF16(forcedOutputDeviceName), EnumeratorSide::OUTPUT);
if (device->DeviceID()) {
if (device && device->DeviceID()) {
forcedOutputDeviceId = device->DeviceID();
}
}

Просмотреть файл

@ -2452,9 +2452,6 @@ RefPtr<MediaManager::StreamPromise> MediaManager::GetUserMedia(
bool privileged =
isChrome ||
Preferences::GetBool("media.navigator.permission.disabled", false);
bool isSecure = aWindow->IsSecureContext();
// Note: isHTTPS is for legacy telemetry only! Use isSecure for security, as
// it handles things like https iframes in http pages correctly.
bool isHTTPS = false;
bool isHandlingUserInput = EventStateManager::IsHandlingUserInput();
docURI->SchemeIs("https", &isHTTPS);
@ -2509,9 +2506,8 @@ RefPtr<MediaManager::StreamPromise> MediaManager::GetUserMedia(
__func__);
}
// Disallow access to null principal pages and http pages (unless pref)
if (principal->GetIsNullPrincipal() ||
!(isSecure || StaticPrefs::media_getusermedia_insecure_enabled())) {
// Disallow access to null principal pages.
if (principal->GetIsNullPrincipal()) {
return StreamPromise::CreateAndReject(
MakeRefPtr<MediaMgrError>(MediaMgrError::Name::NotAllowedError),
__func__);
@ -2872,9 +2868,8 @@ RefPtr<MediaManager::StreamPromise> MediaManager::GetUserMedia(
->Then(
GetCurrentThreadSerialEventTarget(), __func__,
[self, windowID, c, windowListener, sourceListener, askPermission,
prefs, isSecure, isHandlingUserInput, callID, principalInfo,
isChrome, devices,
resistFingerprinting](const char* badConstraint) mutable {
prefs, isHTTPS, isHandlingUserInput, callID, principalInfo, isChrome,
devices, resistFingerprinting](const char* badConstraint) mutable {
LOG("GetUserMedia: starting post enumeration promise2 success "
"callback!");
@ -2964,7 +2959,7 @@ RefPtr<MediaManager::StreamPromise> MediaManager::GetUserMedia(
callID.BeginReading());
} else {
auto req = MakeRefPtr<GetUserMediaRequest>(
window, callID, c, isSecure, isHandlingUserInput);
window, callID, c, isHTTPS, isHandlingUserInput);
if (!Preferences::GetBool("media.navigator.permission.force") &&
array->Length() > 1) {
// there is at least 1 pending gUM request

Просмотреть файл

@ -113,7 +113,7 @@ skip-if(Android&&AndroidVersion=='22') load video-replay-after-audio-end.html #
# This needs to run at the end to avoid leaking busted state into other tests.
skip-if(Android) load 691096-1.html # Bug 1365451
load 1236639.html
test-pref(media.navigator.permission.disabled,true) test-pref(media.getusermedia.insecure.enabled,true) test-pref(media.getusermedia.insecure.enabled,true) load 1388372.html
test-pref(media.navigator.permission.disabled,true) load 1388372.html
load 1494073.html
skip-if(Android) load 1526044.html # Bug 1528391
load 1533909.html

Просмотреть файл

@ -880,7 +880,6 @@ skip-if = toolkit == 'android' # android(bug 1232305)
[test_fastSeek-forwards.html]
skip-if = toolkit == 'android' # bug 1337590, android(bug 1232305)
[test_imagecapture.html]
scheme=https
[test_info_leak.html]
[test_invalid_reject.html]
skip-if = android_version == '17' # android(bug 1232305)
@ -904,7 +903,6 @@ skip-if = toolkit == 'android' # bug 1242112, android(bug 1232305)
skip-if = android_version == '17' # android(bug 1232305)
[test_mediarecorder_avoid_recursion.html]
skip-if = (os == 'win' && !debug) || (android_version == '17') # bug 1228605, android(bug 1232305)
scheme=https
tags=msg
[test_mediarecorder_bitrate.html]
skip-if = toolkit == 'android' # bug 1297432, android(bug 1232305)
@ -958,11 +956,9 @@ skip-if = toolkit == 'android' # android(bug 1232305)
tags=msg
[test_mediarecorder_record_gum_video_timeslice.html]
skip-if = android_version == '17' # bug 1297298, android(bug 1232305)
scheme=https
tags=msg
[test_mediarecorder_record_gum_video_timeslice_mixed.html]
skip-if = android_version == '17' # bug 1297298, android(bug 1232305)
scheme=https
tags=msg
[test_mediarecorder_record_immediate_stop.html]
skip-if = android_version == '17' # android(bug 1232305)
@ -988,7 +984,6 @@ tags=msg capturestream
skip-if = android_version == '17' # android(bug 1232305)
tags=msg capturestream
[test_mediarecorder_unsupported_src.html]
scheme=https
tags=msg
[test_mediarecorder_webm_support.html]
skip-if = android_version == '17' # android(bug 1232305)
@ -1000,11 +995,9 @@ tags=msg capturestream
skip-if = toolkit == 'android' # android(bug 1232305)
[test_mediatrack_consuming_mediastream.html]
skip-if = android_version == '17' # android(bug 1232305)
scheme=https
tags=msg
[test_mediatrack_events.html]
skip-if = android_version == '17' # android(bug 1232305)
scheme=https
[test_mediatrack_parsing_ogg.html]
skip-if = android_version == '17' # android(bug 1232305)
[test_mediatrack_replay_from_end.html]
@ -1017,7 +1010,6 @@ skip-if = toolkit == 'android' # bug 1309814, android(bug 1232305)
skip-if = toolkit == 'android' # android(bug 1232305)
[test_multiple_mediastreamtracks.html]
skip-if = android_version == '17' # android(bug 1232305)
scheme=https
[test_networkState.html]
skip-if = android_version == '17' # android(bug 1232305)
[test_new_audio.html]
@ -1196,7 +1188,6 @@ skip-if = android_version == '17' || (android_version == '19' && debug) # androi
tags=msg capturestream
[test_streams_individual_pause.html]
skip-if = android_version == '17' || android_version == '19' # android(bug 1232305)
scheme=https
tags=msg
[test_streams_srcObject.html]
skip-if = toolkit == 'android' # bug 1300443, android(bug 1232305)

Просмотреть файл

@ -1,4 +1,4 @@
default-preferences pref(media.peerconnection.enabled,true) pref(media.navigator.permission.disabled,true) pref(dom.disable_open_during_load,false) pref(media.getusermedia.insecure.enabled,true) pref(media.getusermedia.insecure.enabled,true)
default-preferences pref(media.peerconnection.enabled,true) pref(media.navigator.permission.disabled,true) pref(dom.disable_open_during_load,false)
load 780790.html
load 791270.html

Просмотреть файл

@ -33,21 +33,16 @@ skip-if = android_version == '22' # bug 1358876, bug 1361325
[test_fingerprints.html]
skip-if = android_version == '22' # bug 1329257, bug 1358876, bug 1361325
scheme=https
[test_getIdentityAssertion.html]
skip-if = android_version == '22' # bug 1358876, bug 1361325
[test_setIdentityProvider.html]
skip-if = android_version == '22' # bug 1358876, bug 1361325
scheme=https
[test_setIdentityProviderWithErrors.html]
skip-if = android_version == '22' # bug 1358876, bug 1361325
scheme=https
[test_peerConnection_peerIdentity.html]
skip-if = android_version == '22' # bug 1358876, bug 1361325
scheme=https
[test_peerConnection_asymmetricIsolation.html]
skip-if = android_version == '22' # bug 1358876, bug 1361325
scheme=https
[test_loginNeeded.html]
support-files =
/.well-known/idp-proxy/login.html

Просмотреть файл

@ -167,8 +167,7 @@ function createHTML(options) {
// media.navigator.permission.fake otherwise fake devices don't count as active.
var noGum = () => pushPrefs(["media.navigator.permission.disabled", false],
["media.navigator.permission.fake", true],
["media.devices.insecure.enabled", true])
["media.navigator.permission.fake", true])
.then(() => navigator.mediaDevices.enumerateDevices())
.then(([device]) => device &&
is(device.label, "", "Test must leave no active gUM streams behind."));

Просмотреть файл

@ -1,7 +1,6 @@
[DEFAULT]
tags = msg webrtc
subsuite = media
scheme = https
support-files =
head.js
dataChannel.js
@ -30,7 +29,6 @@ support-files =
[test_1488832.html]
[test_a_noOp.html]
scheme=http
[test_dataChannel_basicAudio.html]
skip-if = (android_version == '18') # Bug 962984 for debug, bug 963244 for opt
[test_dataChannel_basicAudioVideo.html]
@ -40,16 +38,13 @@ skip-if = android_version == '18' # android(Bug 1189784, timeouts on 4.3 emulato
[test_dataChannel_basicAudioVideoCombined.html]
skip-if = toolkit == 'android' # Bug 1189784
[test_dataChannel_basicDataOnly.html]
scheme=http
[test_dataChannel_basicVideo.html]
skip-if = android_version == '18' # android(Bug 1189784, timeouts on 4.3 emulator)
[test_dataChannel_bug1013809.html]
skip-if = android_version == '18' # android(Bug 1189784, timeouts on 4.3 emulator)
[test_dataChannel_dataOnlyBufferedAmountLow.html]
skip-if = android_version == '18' # android(Bug 1189784, timeouts on 4.3 emulator)
scheme=http
[test_dataChannel_noOffer.html]
scheme=http
[test_enumerateDevices.html]
[test_enumerateDevices_navigation.html]
[test_groupId.html]
@ -133,16 +128,12 @@ skip-if = (android_version == '18') # android(Bug 1189784, timeouts on 4.3 emula
skip-if = (android_version == '18') # android(Bug 1189784, timeouts on 4.3 emulator)
[test_peerConnection_basicAudioNATSrflx.html]
skip-if = toolkit == 'android' || (verify && (os == 'linux')) || socketprocess_e10s # websockets don't work on android (bug 1266217, IPV6 is busted in try which causes timeouts in socket process case (bug 1521117))
scheme=http
[test_peerConnection_basicAudioNATRelay.html]
skip-if = toolkit == 'android' || (verify && debug && (os == 'linux')) || socketprocess_e10s # websockets don't work on android (bug 1266217, IPV6 is busted in try which causes timeouts in socket process case (bug 1521117))
scheme=http
[test_peerConnection_basicAudioNATRelayTCP.html]
skip-if = toolkit == 'android' || socketprocess_e10s # websockets don't work on android (bug 1266217, IPV6 is busted in try which causes timeouts in socket process case (bug 1521117))
scheme=http
[test_peerConnection_basicAudioNATRelayTLS.html]
skip-if = true # need pyopenssl on builders, see bug 1323439 # toolkit == 'android' || socketprocess_e10s # websockets don't work on android (bug 1266217), IPV6 is busted in try which causes timeouts in socket process case (bug 1521117)
scheme=http
[test_peerConnection_basicAudioRequireEOC.html]
skip-if = (android_version == '18') # android(Bug 1189784, timeouts on 4.3 emulator)
[test_peerConnection_basicAudioPcmaPcmuOnly.html]
@ -182,13 +173,10 @@ skip-if = toolkit == 'android' # no screenshare on android
[test_peerConnection_basicH264Video.html]
skip-if = toolkit == 'android' # Bug 1043403, Bug 1355786, Bug 1149374
[test_peerConnection_bug822674.html]
scheme=http
[test_peerConnection_bug825703.html]
scheme=http
[test_peerConnection_bug827843.html]
skip-if = (android_version == '18') # android(Bug 1189784, timeouts on 4.3 emulator)
[test_peerConnection_bug834153.html]
scheme=http
[test_peerConnection_bug1013809.html]
skip-if = (android_version == '18') # android(Bug 1189784, timeouts on 4.3 emulator)
[test_peerConnection_bug1042791.html]
@ -198,30 +186,22 @@ tags=capturestream
skip-if = toolkit == 'android' # android(Bug 1189784, timeouts on 4.3 emulator), Bug 1264340
[test_peerConnection_captureStream_canvas_2d.html]
skip-if = android_version == '18' # android(Bug 1319019, timeouts on 4.3 emulator)
scheme=http
[test_peerConnection_captureStream_canvas_2d_noSSRC.html]
skip-if = android_version == '18' # android(Bug 1319019, timeouts on 4.3 emulator)
scheme=http
[test_peerConnection_multiple_captureStream_canvas_2d.html]
skip-if = (android_version == '18' && debug) # android(Bug 1189784, timeouts on 4.3 emulator)
scheme=http
[test_peerConnection_captureStream_canvas_webgl.html]
# Cross process WebGL doesn't seem to work in the emulator
skip-if = (toolkit == 'android' && e10s && is_emulator) || (android_version <= '17' || android_version == '18') # (<17: bug 1346630, 18: bug 1385950)
scheme=http
[test_peerConnection_certificates.html]
disabled=bug 1180968
scheme=http
[test_peerConnection_close.html]
scheme=http
[test_peerConnection_closeDuringIce.html]
[test_peerConnection_constructedStream.html]
skip-if = android_version == '18' # android(Bug 1189784, timeouts on 4.3 emulator)
[test_peerConnection_errorCallbacks.html]
scheme=http
[test_peerConnection_iceFailure.html]
skip-if = os == 'linux' || os == 'mac' || os == 'win' || toolkit == 'android' # (Bug 1180388 for win, mac and linux), android(Bug 1189784, timeouts on 4.3 emulator), Bug 1180388
scheme=http
[test_peerConnection_insertDTMF.html]
skip-if = (android_version == '18') # android(Bug 1189784, timeouts on 4.3 emulator)
[test_peerConnection_forwarding_basicAudioVideoCombined.html]
@ -242,7 +222,6 @@ skip-if = toolkit == 'android' # android(Bug 1189784)
skip-if = (android_version == '18') # android(Bug 1189784, 1318809 timeouts on 4.3 emulator)
[test_peerConnection_renderAfterRenegotiation.html]
skip-if = (android_version == '18') # android(Bug 1189784, 1326005 timeouts on 4.3 emulator)
scheme=http
[test_peerConnection_restartIce.html]
skip-if = toolkit == 'android'
[test_peerConnection_restartIceNoBundle.html]
@ -289,7 +268,6 @@ skip-if = (android_version == '18') || (os == 'win' && processor == 'aarch64') #
[test_peerConnection_setRemoteOfferInHaveLocalOffer.html]
[test_peerConnection_throwInCallbacks.html]
[test_peerConnection_toJSON.html]
scheme=http
[test_peerConnection_trackDisabling_clones.html]
skip-if = android_version == '18' # android(Bug 1189784, timeouts on 4.3 emulator)
[test_peerConnection_trackDisabling.html]
@ -353,7 +331,6 @@ skip-if = android_version == '18' # android(Bug 1189784, timeouts on 4.3 emulato
[test_peerConnection_webAudio.html]
tags = webaudio webrtc
skip-if = android_version == '18' # android(Bug 1189784, timeouts on 4.3 emulator)
scheme=http
[test_peerConnection_localRollback.html]
skip-if = (android_version == '18') # android(Bug 1189784, timeouts on 4.3 emulator)
[test_peerConnection_localReofferRollback.html]
@ -366,14 +343,11 @@ skip-if = (android_version == '18') # android(Bug 1189784, timeouts on 4.3 emula
skip-if = (android_version == '18') # android(Bug 1189784, timeouts on 4.3 emulator)
[test_selftest.html]
# Bug 1227781: Crash with bogus TURN server.
scheme=http
[test_peerConnection_bug1227781.html]
scheme=http
[test_peerConnection_stats.html]
skip-if = toolkit == 'android' # android(Bug 1189784, timeouts on 4.3 emulator, Bug 1373858)
[test_peerConnection_stats_relayProtocol.html]
skip-if = toolkit == 'android' || socketprocess_e10s # android(Bug 1189784, timeouts on 4.3 emulator, Bug 1373858, Bug 1521117)
scheme=http
[test_peerConnection_sender_and_receiver_stats.html]
skip-if = (android_version == '18') # android(Bug 1189784, timeouts on 4.3 emulator)
[test_peerConnection_trackless_sender_stats.html]
@ -385,6 +359,6 @@ skip-if = (android_version == '18')
[test_peerConnection_nonDefaultRate.html]
skip-if = android_version == '18' # android(Bug 1189784, timeouts on 4.3 emulator)
[test_forceSampleRate.html]
scheme=http
[test_setSinkId.html]
skip-if = os != 'linux' # the only platform with real devices

Просмотреть файл

@ -82,7 +82,7 @@ runTest(async () => {
// Check that deviceIds are stable for same origin and differ across origins.
const path = "/tests/dom/media/tests/mochitest/test_enumerateDevices_iframe.html";
const origins = ["https://example.com", "https://test1.example.com"];
const origins = ["http://mochi.test:8888", "http://test1.mochi.test:8888"];
info(window.location);
let haveDevicesMap = new Promise(resolve => {

Просмотреть файл

@ -14,7 +14,7 @@ var gUM = c => navigator.mediaDevices.getUserMedia(c);
await pushPrefs(["media.navigator.streams.fake", true]);
let devices = await navigator.mediaDevices.enumerateDevices();
parent.postMessage(JSON.stringify(devices), "https://example.com:443");
parent.postMessage(JSON.stringify(devices), "http://mochi.test:8888");
})().catch(e => setTimeout(() => { throw e; }));
</script>

Просмотреть файл

@ -41,7 +41,7 @@ runTest(async () => {
} catch(e) {
message = e.name;
}
parent.postMessage(message, 'https://example.com:443');
parent.postMessage(message, 'http://mochi.test:8888');
if (message == "success") {
stream.getTracks().forEach(track => track.stop());
@ -55,7 +55,7 @@ runTest(async () => {
// Test gUM in sandboxed vs. regular iframe.
for (const origin of ["https://example.com", "https://test1.example.com"]) {
for (const origin of ["http://mochi.test:8888", "http://test1.mochi.test:8888"]) {
const src = origin + path;
is(await iframeGum({ src, sandbox: "allow-scripts" }),
"NotAllowedError", "gUM fails in sandboxed iframe " + origin);

Просмотреть файл

@ -18,7 +18,7 @@ const gUM = c => navigator.mediaDevices.getUserMedia(c);
} catch(e) {
message = e.name;
}
parent.postMessage(message, "https://example.com:443");
parent.postMessage(message, "http://mochi.test:8888");
if (message == "success") {
stream.getTracks().forEach(track => track.stop());

Просмотреть файл

@ -12,28 +12,31 @@
title: "Basic audio-only peer connection with port dependent NAT"
});
// This test uses the NAT simulator, which doesn't work in https, so we turn
// on getUserMedia in http.
runNetworkTest(async (options = {}) => {
await pushPrefs(
['media.peerconnection.nat_simulator.filtering_type', 'PORT_DEPENDENT'],
['media.peerconnection.nat_simulator.mapping_type', 'PORT_DEPENDENT'],
['media.devices.insecure.enabled', true],
['media.getusermedia.insecure.enabled', true]);
options.expectedLocalCandidateType = "srflx";
options.expectedRemoteCandidateType = "relay";
// If both have TURN, it is a toss-up which one will end up using a
// relay.
options.turn_disabled_local = true;
const test = new PeerConnectionTest(options);
// Make sure we don't end up choosing the wrong thing due to delays in
// trickle. Once we are willing to accept trickle after ICE success, we
// can maybe wait a bit to allow things to stabilize.
// TODO(bug 1238249)
makeOffererNonTrickle(test.chain);
makeAnswererNonTrickle(test.chain);
test.setMediaConstraints([{audio: true}], [{audio: true}]);
test.run();
var test;
runNetworkTest(options => {
SpecialPowers.pushPrefEnv(
{
'set': [
['media.peerconnection.nat_simulator.filtering_type', 'PORT_DEPENDENT'],
['media.peerconnection.nat_simulator.mapping_type', 'PORT_DEPENDENT']
]
}, function (options) {
options = options || {};
options.expectedLocalCandidateType = "srflx";
options.expectedRemoteCandidateType = "relay";
// If both have TURN, it is a toss-up which one will end up using a
// relay.
options.turn_disabled_local = true;
test = new PeerConnectionTest(options);
// Make sure we don't end up choosing the wrong thing due to delays in
// trickle. Once we are willing to accept trickle after ICE success, we
// can maybe wait a bit to allow things to stabilize.
// TODO(bug 1238249)
makeOffererNonTrickle(test.chain);
makeAnswererNonTrickle(test.chain);
test.setMediaConstraints([{audio: true}], [{audio: true}]);
test.run();
})
}, { useIceServer: true });
</script>
</pre>

Просмотреть файл

@ -1,4 +1,4 @@
<!DOCTYPE HTML>
<!DOCTYPE HTML>
<html>
<head>
<script type="application/javascript" src="pc.js"></script>
@ -11,22 +11,25 @@
title: "Basic audio-only peer connection with port dependent NAT that blocks UDP"
});
// This test uses the NAT simulator, which doesn't work in https, so we turn
// on getUserMedia in http.
runNetworkTest(async (options = {}) => {
await pushPrefs(
['media.peerconnection.nat_simulator.filtering_type', 'PORT_DEPENDENT'],
['media.peerconnection.nat_simulator.mapping_type', 'PORT_DEPENDENT'],
['media.peerconnection.nat_simulator.block_udp', true],
['media.devices.insecure.enabled', true],
['media.getusermedia.insecure.enabled', true]);
options.expectedLocalCandidateType = "relay-tcp";
options.expectedRemoteCandidateType = "relay-tcp";
// No reason to wait for gathering to complete like the other NAT tests,
// since relayed-tcp is the only thing that can work.
const test = new PeerConnectionTest(options);
test.setMediaConstraints([{audio: true}], [{audio: true}]);
test.run();
var test;
runNetworkTest(options => {
SpecialPowers.pushPrefEnv(
{
'set': [
['media.peerconnection.nat_simulator.filtering_type', 'PORT_DEPENDENT'],
['media.peerconnection.nat_simulator.mapping_type', 'PORT_DEPENDENT'],
['media.peerconnection.nat_simulator.block_udp', true]
]
}, function (options) {
options = options || {};
options.expectedLocalCandidateType = "relay-tcp";
options.expectedRemoteCandidateType = "relay-tcp";
// No reason to wait for gathering to complete like the other NAT tests,
// since relayed-tcp is the only thing that can work.
test = new PeerConnectionTest(options);
test.setMediaConstraints([{audio: true}], [{audio: true}]);
test.run();
})
}, { useIceServer: true });
</script>
</pre>

Просмотреть файл

@ -1,4 +1,4 @@
<!DOCTYPE HTML>
<!DOCTYPE HTML>
<html>
<head>
<script type="application/javascript" src="pc.js"></script>
@ -11,23 +11,26 @@
title: "Basic audio-only peer connection with port dependent NAT that blocks STUN"
});
// This test uses the NAT simulator, which doesn't work in https, so we turn
// on getUserMedia in http.
runNetworkTest(async (options = {}) => {
await pushPrefs(
['media.peerconnection.nat_simulator.filtering_type', 'PORT_DEPENDENT'],
['media.peerconnection.nat_simulator.mapping_type', 'PORT_DEPENDENT'],
['media.peerconnection.nat_simulator.block_udp', true],
['media.peerconnection.nat_simulator.block_tcp', true],
['media.devices.insecure.enabled', true],
['media.getusermedia.insecure.enabled', true]);
options.expectedLocalCandidateType = "relay-tcp";
options.expectedRemoteCandidateType = "relay-tcp";
// No reason to wait for gathering to complete like the other NAT tests,
// since relayed-tcp is the only thing that can work.
const test = new PeerConnectionTest(options);
test.setMediaConstraints([{audio: true}], [{audio: true}]);
test.run();
var test;
runNetworkTest(options => {
SpecialPowers.pushPrefEnv(
{
'set': [
['media.peerconnection.nat_simulator.filtering_type', 'PORT_DEPENDENT'],
['media.peerconnection.nat_simulator.mapping_type', 'PORT_DEPENDENT'],
['media.peerconnection.nat_simulator.block_udp', true],
['media.peerconnection.nat_simulator.block_tcp', true]
]
}, function (options) {
options = options || {};
options.expectedLocalCandidateType = "relay-tcp";
options.expectedRemoteCandidateType = "relay-tcp";
// No reason to wait for gathering to complete like the other NAT tests,
// since relayed-tcp is the only thing that can work.
test = new PeerConnectionTest(options);
test.setMediaConstraints([{audio: true}], [{audio: true}]);
test.run();
})
}, { useIceServer: true });
</script>
</pre>

Просмотреть файл

@ -1,4 +1,4 @@
<!DOCTYPE HTML>
<!DOCTYPE HTML>
<html>
<head>
<script type="application/javascript" src="nonTrickleIce.js"></script>
@ -12,25 +12,28 @@
title: "Basic audio-only peer connection with endpoint independent NAT"
});
// This test uses the NAT simulator in order to get srflx candidates.
// It doesn't work in https, so we turn on getUserMedia in http.
runNetworkTest(async (options = {}) => {
await pushPrefs(
['media.peerconnection.nat_simulator.filtering_type', 'ENDPOINT_INDEPENDENT'],
['media.peerconnection.nat_simulator.mapping_type', 'ENDPOINT_INDEPENDENT'],
['media.devices.insecure.enabled', true],
['media.getusermedia.insecure.enabled', true]);
options.expectedLocalCandidateType = "srflx";
options.expectedRemoteCandidateType = "srflx";
const test = new PeerConnectionTest(options);
// Make sure we don't end up choosing the wrong thing due to delays in
// trickle. Once we are willing to accept trickle after ICE success, we
// can maybe wait a bit to allow things to stabilize.
// TODO(bug 1238249)
makeOffererNonTrickle(test.chain);
makeAnswererNonTrickle(test.chain);
test.setMediaConstraints([{audio: true}], [{audio: true}]);
test.run();
var test;
runNetworkTest(options => {
SpecialPowers.pushPrefEnv(
{
'set': [
['media.peerconnection.nat_simulator.filtering_type', 'ENDPOINT_INDEPENDENT'],
['media.peerconnection.nat_simulator.mapping_type', 'ENDPOINT_INDEPENDENT']
]
}, function (options) {
options = options || {};
options.expectedLocalCandidateType = "srflx";
options.expectedRemoteCandidateType = "srflx";
test = new PeerConnectionTest(options);
// Make sure we don't end up choosing the wrong thing due to delays in
// trickle. Once we are willing to accept trickle after ICE success, we
// can maybe wait a bit to allow things to stabilize.
// TODO(bug 1238249)
makeOffererNonTrickle(test.chain);
makeAnswererNonTrickle(test.chain);
test.setMediaConstraints([{audio: true}], [{audio: true}]);
test.run();
})
}, { useIceServer: true });
</script>
</pre>

Просмотреть файл

@ -30,23 +30,25 @@ var PC_LOCAL_TEST_LOCAL_STATS_RELAYCANDIDATE = test => {
});
}
// This test uses the NAT simulator in order to get srflx candidates.
// It doesn't work in https, so we turn on getUserMedia in http.
runNetworkTest(async (options = {}) => {
await pushPrefs(
['media.peerconnection.nat_simulator.filtering_type', 'ENDPOINT_INDEPENDENT'],
['media.peerconnection.nat_simulator.mapping_type', 'ENDPOINT_INDEPENDENT'],
['media.devices.insecure.enabled', true],
['media.getusermedia.insecure.enabled', true]);
const test = new PeerConnectionTest(options);
makeOffererNonTrickle(test.chain);
makeAnswererNonTrickle(test.chain);
runNetworkTest(options => {
// uses NAT simulator in order to get srflx candidates.
SpecialPowers.pushPrefEnv(
{
'set': [
['media.peerconnection.nat_simulator.filtering_type', 'ENDPOINT_INDEPENDENT'],
['media.peerconnection.nat_simulator.mapping_type', 'ENDPOINT_INDEPENDENT']
]
}, function (options) {
const test = new PeerConnectionTest(options);
makeOffererNonTrickle(test.chain);
makeAnswererNonTrickle(test.chain);
test.chain.removeAfter("PC_LOCAL_WAIT_FOR_MEDIA_FLOW");
test.chain.append([PC_LOCAL_TEST_LOCAL_STATS_RELAYCANDIDATE]);
test.chain.removeAfter("PC_LOCAL_WAIT_FOR_MEDIA_FLOW");
test.chain.append([PC_LOCAL_TEST_LOCAL_STATS_RELAYCANDIDATE]);
test.setMediaConstraints([{ audio: true }], [{ audio: true }]);
test.run();
test.setMediaConstraints([{ audio: true }], [{ audio: true }]);
test.run();
})
}, { useIceServer: true });
</script>
</pre>

Просмотреть файл

@ -683,7 +683,7 @@ void AudioContext::Shutdown() {
// We don't want to touch promises if the global is going away soon.
if (!mIsDisconnecting) {
if (!mIsOffline) {
RefPtr<Promise> ignored = Close(IgnoreErrors());
CloseInternal(nullptr);
}
for (auto p : mPromiseGripArray) {
@ -1106,6 +1106,12 @@ already_AddRefed<Promise> AudioContext::Close(ErrorResult& aRv) {
mPromiseGripArray.AppendElement(promise);
CloseInternal(promise);
return promise.forget();
}
void AudioContext::CloseInternal(void* aPromise) {
// This can be called when freeing a document, and the streams are dead at
// this point, so we need extra null-checks.
AudioNodeStream* ds = DestinationStream();
@ -1118,11 +1124,9 @@ already_AddRefed<Promise> AudioContext::Close(ErrorResult& aRv) {
streams = GetAllStreams();
}
Graph()->ApplyAudioContextOperation(ds, streams,
AudioContextOperation::Close, promise);
AudioContextOperation::Close, aPromise);
}
mCloseCalled = true;
return promise.forget();
}
void AudioContext::RegisterNode(AudioNode* aNode) {

Просмотреть файл

@ -334,6 +334,7 @@ class AudioContext final : public DOMEventTargetHelper,
void ResumeInternal();
void SuspendInternal(void* aPromise);
void CloseInternal(void* aPromise);
// Will report error message to console and dispatch testing event if needed
// when AudioContext is blocked by autoplay policy.

Просмотреть файл

@ -192,7 +192,6 @@ skip-if = toolkit == 'android' # bug 1145816
[test_mediaStreamAudioSourceNodeCrossOrigin.html]
tags=capturestream
[test_mediaStreamAudioSourceNodeNoGC.html]
scheme=https
[test_mediaStreamAudioSourceNodePassThrough.html]
[test_mediaStreamAudioSourceNodeResampling.html]
tags=capturestream

Просмотреть файл

@ -57,13 +57,11 @@ bool BasicCardService::IsValidBasicCardRequest(JSContext* aCx, JSObject* aData,
return false;
}
if (request.mSupportedNetworks.WasPassed()) {
for (const nsString& network : request.mSupportedNetworks.Value()) {
if (!IsValidNetwork(network)) {
aErrorMsg.Assign(network +
NS_LITERAL_STRING(" is not an valid network."));
return false;
}
for (const nsString& network : request.mSupportedNetworks) {
if (!IsValidNetwork(network)) {
aErrorMsg.Assign(network +
NS_LITERAL_STRING(" is not an valid network."));
return false;
}
}
return true;

Просмотреть файл

@ -8,7 +8,7 @@
*/
dictionary BasicCardRequest {
sequence<DOMString> supportedNetworks;
sequence<DOMString> supportedNetworks = [];
};
dictionary BasicCardResponse {

Просмотреть файл

@ -9,13 +9,14 @@ varying vec2 vLocalPos;
flat varying vec3 vClipParams; // xy = box size, z = radius
#else
varying vec3 vLocalPos;
flat varying float vClipMode;
flat varying vec4 vClipCenter_Radius_TL;
flat varying vec4 vClipCenter_Radius_TR;
flat varying vec4 vClipCenter_Radius_BL;
flat varying vec4 vClipCenter_Radius_BR;
#endif
flat varying float vClipMode;
#ifdef WR_VERTEX_SHADER
struct ClipRect {
RectWithSize rect;
@ -82,6 +83,8 @@ void main(void) {
cmi.device_pixel_scale
);
vClipMode = clip.rect.mode.x;
#ifdef WR_FEATURE_FAST_PATH
// If the radii are all uniform, we can use a much simpler 2d
// signed distance function to get a rounded rect clip.
@ -92,7 +95,6 @@ void main(void) {
vClipParams.z = radius;
#else
vLocalPos = vi.local_pos;
vClipMode = clip.rect.mode.x;
RectWithEndpoint clip_rect = to_rect_with_endpoint(local_rect);
@ -137,7 +139,8 @@ void main(void) {
#ifdef WR_FEATURE_FAST_PATH
float d = sdf_rounded_rect(local_pos, vClipParams);
float f = distance_aa(aa_range, d);
oFragColor = vec4(f);
float r = mix(f, 1.0 - f, vClipMode);
oFragColor = vec4(r);
#else
float alpha = init_transform_fs(local_pos.xy);

Просмотреть файл

@ -1041,12 +1041,11 @@ impl ClipItem {
fn supports_fast_path_rendering(&self) -> bool {
match *self {
ClipItem::Rectangle(..) |
ClipItem::RoundedRectangle(_, _, ClipMode::ClipOut) |
ClipItem::Image { .. } |
ClipItem::BoxShadow(..) => {
false
}
ClipItem::RoundedRectangle(_, ref radius, ClipMode::Clip) => {
ClipItem::RoundedRectangle(_, ref radius, _) => {
// The rounded clip rect fast path shader can only work
// if the radii are uniform.
radius.is_uniform().is_some()

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 148 KiB

После

Ширина:  |  Высота:  |  Размер: 148 KiB

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 59 KiB

После

Ширина:  |  Высота:  |  Размер: 59 KiB

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 7.4 KiB

После

Ширина:  |  Высота:  |  Размер: 7.3 KiB

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 16 KiB

После

Ширина:  |  Высота:  |  Размер: 16 KiB

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 84 KiB

После

Ширина:  |  Высота:  |  Размер: 84 KiB

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 21 KiB

После

Ширина:  |  Высота:  |  Размер: 21 KiB

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 19 KiB

После

Ширина:  |  Высота:  |  Размер: 19 KiB

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 692 B

После

Ширина:  |  Высота:  |  Размер: 674 B

Двоичные данные
gfx/wr/wrench/reftests/clip/clip-mode.png

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 2.6 KiB

После

Ширина:  |  Высота:  |  Размер: 2.7 KiB

Просмотреть файл

@ -14,7 +14,7 @@ fails-if(Android) == boxshadow-button.html boxshadow-button-ref.html
fuzzy-if(OSX==1010,0-1,0-24) fuzzy-if(d2d,0-16,0-999) fuzzy-if(skiaContent,0-1,0-12) fuzzy-if(webrender,5-9,700-1080) == boxshadow-large-border-radius.html boxshadow-large-border-radius-ref.html # Bug 1209649
fails-if(Android) == boxshadow-fileupload.html boxshadow-fileupload-ref.html
fuzzy-if(/^Windows\x20NT\x2010\.0/.test(http.oscpu),0-98,0-152) fuzzy-if(skiaContent,0-13,0-28) fuzzy-if(webrender,19-19,49-52) == boxshadow-inner-basic.html boxshadow-inner-basic-ref.svg
fuzzy-if(/^Windows\x20NT\x2010\.0/.test(http.oscpu),0-98,0-152) fuzzy-if(skiaContent,0-13,0-28) fuzzy-if(webrender,19-19,47-47) == boxshadow-inner-basic.html boxshadow-inner-basic-ref.svg
fuzzy-if(skiaContent,0-1,0-17) random-if(layersGPUAccelerated) == boxshadow-mixed.html boxshadow-mixed-ref.html
fuzzy-if(skiaContent,0-1,0-17) == boxshadow-mixed-2.html boxshadow-mixed-2-ref.html
random-if(d2d) fuzzy-if(skiaContent,0-1,0-212) fuzzy-if(webrender,0-127,0-3528) == boxshadow-rounded-spread.html boxshadow-rounded-spread-ref.html

Просмотреть файл

@ -53,6 +53,10 @@ bool TransportLayerSrtp::Setup() {
}
TransportResult TransportLayerSrtp::SendPacket(MediaPacket& packet) {
if (state() != TS_OPEN) {
return TE_ERROR;
}
if (packet.len() < 4) {
MOZ_ASSERT(false);
return TE_ERROR;

Просмотреть файл

@ -1367,47 +1367,7 @@ VARCACHE_PREF(
#endif // ANDROID
//---------------------------------------------------------------------------
// MediaCapture prefs
//---------------------------------------------------------------------------
// Enables navigator.mediaDevices and getUserMedia() support. See also
// media.peerconnection.enabled
VARCACHE_PREF(
"media.navigator.enabled",
media_navigator_enabled,
bool, true
)
// This pref turns off [SecureContext] on the navigator.mediaDevices object, for
// more compatible legacy behavior.
VARCACHE_PREF(
"media.devices.insecure.enabled",
media_devices_insecure_enabled,
bool, true
)
// If the above pref is also enabled, this pref enabled getUserMedia() support
// in http, bypassing the instant NotAllowedError you get otherwise.
VARCACHE_PREF(
"media.getusermedia.insecure.enabled",
media_getusermedia_insecure_enabled,
bool, false
)
//---------------------------------------------------------------------------
// WebRTC prefs
//---------------------------------------------------------------------------
// Enables RTCPeerConnection support. Note that, when true, this pref enables
// navigator.mediaDevices and getUserMedia() support as well.
// See also media.navigator.enabled
VARCACHE_PREF(
"media.peerconnection.enabled",
media_peerconnection_enabled,
bool, true
)
// WebRTC
#ifdef MOZ_WEBRTC
#ifdef ANDROID

Просмотреть файл

@ -427,6 +427,7 @@ pref("media.decoder-doctor.verbose", false);
pref("media.decoder-doctor.new-issue-endpoint", "https://webcompat.com/issues/new");
#ifdef MOZ_WEBRTC
pref("media.navigator.enabled", true);
pref("media.navigator.video.enabled", true);
pref("media.navigator.video.default_fps",30);
pref("media.navigator.video.use_remb", true);
@ -453,6 +454,7 @@ pref("media.webrtc.debug.aec_dump_max_size", 4194304); // 4MB
pref("media.navigator.video.default_width",0); // adaptive default
pref("media.navigator.video.default_height",0); // adaptive default
pref("media.peerconnection.enabled", true);
pref("media.peerconnection.video.enabled", true);
pref("media.navigator.video.max_fs", 12288); // Enough for 2048x1536
pref("media.navigator.video.max_fr", 60);

Просмотреть файл

@ -42,10 +42,13 @@ class MozlintParser(ArgumentParser):
'help': "Display and fail on warnings in addition to errors.",
}],
[['-f', '--format'],
{'dest': 'fmt',
'default': 'stylish',
'choices': all_formatters.keys(),
'help': "Formatter to use. Defaults to 'stylish'.",
{'dest': 'formats',
'action': 'append',
'help': "Formatter to use. Defaults to 'stylish' on stdout. "
"You can specify an optional path as --format formatter:path "
"that will be used instead of stdout. "
"You can also use multiple formatters at the same time. "
"Formatters available: {}.".format(', '.join(all_formatters.keys())),
}],
[['-n', '--no-filter'],
{'dest': 'use_filters',
@ -126,6 +129,29 @@ class MozlintParser(ArgumentParser):
if invalid:
self.error("the following paths do not exist:\n{}".format("\n".join(invalid)))
if args.formats:
formats = []
for fmt in args.formats:
path = None
if ':' in fmt:
# Detect optional formatter path
pos = fmt.index(':')
fmt, path = fmt[:pos], os.path.realpath(fmt[pos+1:])
# Check path is writable
fmt_dir = os.path.dirname(path)
if not os.access(fmt_dir, os.W_OK | os.X_OK):
self.error("the following directory is not writable: {}".format(fmt_dir))
if fmt not in all_formatters.keys():
self.error('the following formatter is not available: {}'.format(fmt))
formats.append((fmt, path))
args.formats = formats
else:
# Can't use argparse default or this choice will be always present
args.formats = [('stylish', None)]
def find_linters(linters=None):
lints = []
@ -150,7 +176,7 @@ def find_linters(linters=None):
return lints
def run(paths, linters, fmt, outgoing, workdir, edit,
def run(paths, linters, formats, outgoing, workdir, edit,
setup=False, list_linters=False, **lintargs):
from mozlint import LintRoller, formatters
from mozlint.editor import edit_issues
@ -177,13 +203,16 @@ def run(paths, linters, fmt, outgoing, workdir, edit,
edit_issues(result)
result = lint.roll(result.issues.keys())
formatter = formatters.get(fmt)
for formatter_name, path in formats:
formatter = formatters.get(formatter_name)
# Encode output with 'replace' to avoid UnicodeEncodeErrors on
# environments that aren't using utf-8.
out = formatter(result).encode(sys.stdout.encoding or 'ascii', 'replace')
if out:
output_file = open(path, 'w') if path else sys.stdout
print(out, file=output_file)
# Encode output with 'replace' to avoid UnicodeEncodeErrors on
# environments that aren't using utf-8.
out = formatter(result).encode(sys.stdout.encoding or 'ascii', 'replace')
if out:
print(out)
return result.returncode

Просмотреть файл

@ -9,6 +9,10 @@ job-defaults:
worker:
docker-image: {in-tree: "lint"}
max-run-time: 1800
artifacts:
- type: file
name: public/code-review/mozlint.json
path: /builds/worker/mozlint.json
run:
using: mach
when:
@ -23,7 +27,7 @@ codespell:
treeherder:
symbol: spell
run:
mach: lint -l codespell -f treeherder
mach: lint -l codespell -f treeherder -f json:/builds/worker/mozlint.json
when:
files-changed:
- '**/*.js'
@ -46,7 +50,7 @@ cpp-virtual-final:
treeherder:
symbol: Cvf
run:
mach: lint -l cpp-virtual-final -f treeherder
mach: lint -l cpp-virtual-final -f treeherder -f json:/builds/worker/mozlint.json
when:
files-changed:
- '**/*.cpp'
@ -65,7 +69,7 @@ eslint:
cp -r /build/node_modules_eslint node_modules &&
ln -s ../tools/lint/eslint/eslint-plugin-mozilla node_modules &&
ln -s ../tools/lint/eslint/eslint-plugin-spidermonkey-js node_modules &&
./mach lint -l eslint -f treeherder --quiet
./mach lint -l eslint -f treeherder --quiet -f json:/builds/worker/mozlint.json
when:
files-changed:
# Files that are likely audited.
@ -88,7 +92,7 @@ mingw-cap:
treeherder:
symbol: mingw
run:
mach: lint -l mingw-capitalization -f treeherder
mach: lint -l mingw-capitalization -f treeherder -f json:/builds/worker/mozlint.json
when:
files-changed:
- '**/*.cpp'
@ -102,7 +106,7 @@ py-compat:
treeherder:
symbol: py-compat
run:
mach: lint -l py2 -l py3 -f treeherder
mach: lint -l py2 -l py3 -f treeherder -f json:/builds/worker/mozlint.json
when:
files-changed:
- '**/*.py'
@ -114,7 +118,7 @@ py-flake8:
treeherder:
symbol: f8
run:
mach: lint -l flake8 -f treeherder
mach: lint -l flake8 -f treeherder -f json:/builds/worker/mozlint.json
when:
files-changed:
- '**/*.py'
@ -128,7 +132,7 @@ test-manifest:
treeherder:
symbol: tm
run:
mach: lint -l test-disable -f treeherder
mach: lint -l test-disable -f treeherder -f json:/builds/worker/mozlint.json
when:
files-changed:
- '**/*.ini'
@ -141,7 +145,7 @@ wptlint-gecko:
treeherder:
symbol: W
run:
mach: lint -l wpt -f treeherder
mach: lint -l wpt -f treeherder -f json:/builds/worker/mozlint.json
when:
files-changed:
- 'testing/web-platform/tests/**'
@ -153,7 +157,7 @@ yaml:
treeherder:
symbol: yaml
run:
mach: lint -l yaml -f treeherder
mach: lint -l yaml -f treeherder -f json:/builds/worker/mozlint.json
when:
files-changed:
- '**/*.yml'
@ -166,7 +170,7 @@ shellcheck:
treeherder:
symbol: shell
run:
mach: lint -l shellcheck -f treeherder
mach: lint -l shellcheck -f treeherder -f json:/builds/worker/mozlint.json
when:
files-changed:
- '**/*.sh'

Просмотреть файл

@ -74,11 +74,11 @@
},
"awscli": {
"hashes": [
"sha256:8abac6653219e64d008f8c5da9401a7ecac6e641978c55bc0a1c4864ec2df6ce",
"sha256:a56f53f9bfa3ddc172d03ae53ea7d05afef2aea0cb8962e122450a76fcb0f794"
"sha256:9cbc48eff6f8c9ee2072be2caf569dd5f18734d61e020556b792ba509bbb03f0",
"sha256:e0b9afc24c591ecb04d02a34d9e8d3508a4bd25c713d10a358cdad09abbbcf8e"
],
"index": "pypi",
"version": "==1.16.125"
"version": "==1.16.130"
},
"backports.lzma": {
"hashes": [
@ -88,10 +88,10 @@
},
"botocore": {
"hashes": [
"sha256:7c8ec120bc5bcc4076aebd7dac3a679777ff3a3ce3263c64d7342ea7982b578c",
"sha256:f4607f8800f87fd8eacd450699666f92d7fbc48fbb757903ad56825ce08e072a"
"sha256:2bf8768887bfb008406eec725eecf6f174307dac00f5fad244cdd5d39c6c2147",
"sha256:c0f9c57e7a8c65f17a62a0926c3e73686f6ae1c08abf3b5a63cc3a5bcc4c437b"
],
"version": "==1.12.115"
"version": "==1.12.120"
},
"certifi": {
"hashes": [
@ -420,11 +420,11 @@
},
"scriptworker": {
"hashes": [
"sha256:983eca7dc2bf56402c15e993f77586da1cab3894085997218cc588ae5250c005",
"sha256:e1a41d8e21b60cbaba18d1595f02ce3dc086f613da37652d9887834e45827e13"
"sha256:8ba955d1e6d8078e9e6da322d206045f15c150c1bffa21665df7d57ee1b3c3d2",
"sha256:cebb4b3a4dc130c4cc3112123301ca8cca53c3e33de37ae527e270c1ddca2099"
],
"index": "pypi",
"version": "==22.0.1"
"version": "==22.1.0"
},
"sh": {
"hashes": [
@ -450,10 +450,11 @@
},
"taskcluster": {
"hashes": [
"sha256:979beeeaa9d24d99a91a05d86c81b5b2bd43defe8fe9d4a775960004bb144314",
"sha256:e8f8e311e071cd0d2f36af136003cb87b09e87fde4a4bea98467334d6f2d5590"
"sha256:93027ec6949289d8267595c5770c3d3f0902d9461d98081544dce60764f94f46",
"sha256:97e19674738515e6891f4d7928280aecb2686def8b9d72a15477d7297f34c18c",
"sha256:c24a8a67db9306e5ff0fd140e5bb6489ba3dcaf0632b6a2052b2d649a30e7617"
],
"version": "==7.0.0"
"version": "==7.0.1"
},
"taskcluster-urls": {
"hashes": [

Просмотреть файл

@ -15,7 +15,7 @@ config = {
("{}{}".format(d, f),
"ac_add_options --with-branding=mobile/android/branding/beta",
"ac_add_options --with-branding=mobile/android/branding/official")
for d in ["mobile/android/config/mozconfigs/android-aarch64/"
for d in ["mobile/android/config/mozconfigs/android-aarch64/",
"mobile/android/config/mozconfigs/android-api-16/",
"mobile/android/config/mozconfigs/android-x86/",
"mobile/android/config/mozconfigs/android-x86_64/"]

Просмотреть файл

@ -14,7 +14,7 @@ config = {
("{}{}".format(d, f),
"ac_add_options --with-branding=mobile/android/branding/nightly",
"ac_add_options --with-branding=mobile/android/branding/beta")
for d in ["mobile/android/config/mozconfigs/android-aarch64/"
for d in ["mobile/android/config/mozconfigs/android-aarch64/",
"mobile/android/config/mozconfigs/android-api-16/",
"mobile/android/config/mozconfigs/android-x86/",
"mobile/android/config/mozconfigs/android-x86_64/"]

Просмотреть файл

@ -0,0 +1,4 @@
[MediaDevices-SecureContext.html]
[MediaDevices and SecureContext]
expected: FAIL

Просмотреть файл

@ -1,4 +1,4 @@
[MediaDevices-getSupportedConstraints.https.html]
[MediaDevices-getSupportedConstraints.html]
[sampleSize is supported]
expected: FAIL

Просмотреть файл

@ -1 +1 @@
prefs: [media.navigator.permission.disabled:true, media.navigator.streams.fake:true, media.devices.insecure.enabled:false, dom.security.featurePolicy.enabled:true, dom.security.featurePolicy.header.enabled:true, dom.security.featurePolicy.webidl.enabled:true]
prefs: [media.navigator.permission.disabled:true, media.navigator.streams.fake:true, dom.security.featurePolicy.enabled:true, dom.security.featurePolicy.header.enabled:true, dom.security.featurePolicy.webidl.enabled:true]

Просмотреть файл

@ -1,4 +1,4 @@
[historical.https.html]
[historical.html]
[navigator.mozGetUserMedia should not exist]
expected: FAIL

Просмотреть файл

@ -10,7 +10,6 @@
assert_false(window.isSecureContext, "This test must be run in a non secure context");
assert_false('MediaDevices' in window, "MediaDevices is not exposed");
assert_false('MediaDeviceInfo' in window, "MediaDeviceInfo is not exposed");
assert_false('getUserMedia' in navigator, "getUserMedia is not exposed");
assert_false('mediaDevices' in navigator, "mediaDevices is not exposed");

Просмотреть файл

@ -1 +1 @@
{"files":{"Cargo.toml":"764b9ce160653e841430da3919ff968b957ff811f7da42c8483c8bfc2f06be25","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","README.md":"3fa9368c60bc701dea294fbacae0469188c4be1de79f82e972bb9b321776cd52","src/lib.rs":"6915169e3ca05f28e1cb0e052379d74f2496400de1240b74c56e55c2674a6560","tests/xcrate.rs":"30dcb70fbb9c96fda2b7825592558279f534776f72e2a8a0a3e26df4dedb3caa"},"package":"d4c819a1287eb618df47cc647173c5c4c66ba19d888a6e50d605672aed3140de"}
{"files":{"Cargo.toml":"090d983ec20ad09e59f6b7679b48b9b54e9c0841cf2922b81cba485edcd40876","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","README.md":"1cd0ebc3b30a9c9eddb0fda5515b5a52ec2b85a087328f0ee9f4d68cbb28afc2","src/lib.rs":"f02d6e295109365cf54884e5282a3e7d1e1f62857c700f23cd013e94a56bd803","tests/xcrate.rs":"30dcb70fbb9c96fda2b7825592558279f534776f72e2a8a0a3e26df4dedb3caa"},"package":"082bb9b28e00d3c9d39cc03e64ce4cea0f1bb9b3fde493f0cbc008472d22bdf4"}

30
third_party/rust/cfg-if/Cargo.toml поставляемый
Просмотреть файл

@ -1,14 +1,24 @@
# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
#
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g. crates.io) dependencies
#
# If you believe there's an error in this file please file an
# issue against the rust-lang/cargo repository. If you're
# editing this file be aware that the upstream Cargo.toml
# will likely look very different (and much more reasonable)
[package]
name = "cfg-if"
version = "0.1.2"
version = "0.1.6"
authors = ["Alex Crichton <alex@alexcrichton.com>"]
license = "MIT/Apache-2.0"
readme = "README.md"
repository = "https://github.com/alexcrichton/cfg-if"
description = "A macro to ergonomically define an item depending on a large number of #[cfg]\nparameters. Structured like an if-else chain, the first matching branch is the\nitem that gets emitted.\n"
homepage = "https://github.com/alexcrichton/cfg-if"
documentation = "http://alexcrichton.com/cfg-if"
description = """
A macro to ergonomically define an item depending on a large number of #[cfg]
parameters. Structured like an if-else chain, the first matching branch is the
item that gets emitted.
"""
documentation = "https://docs.rs/cfg-if"
readme = "README.md"
license = "MIT/Apache-2.0"
repository = "https://github.com/alexcrichton/cfg-if"
[badges.travis-ci]
repository = "alexcrichton/cfg-if"

18
third_party/rust/cfg-if/README.md поставляемый
Просмотреть файл

@ -2,7 +2,7 @@
[![Build Status](https://travis-ci.org/alexcrichton/cfg-if.svg?branch=master)](https://travis-ci.org/alexcrichton/cfg-if)
[Documentation](http://alexcrichton.com/cfg-if)
[Documentation](https://docs.rs/cfg-if)
A macro to ergonomically define an item depending on a large number of #[cfg]
parameters. Structured like an if-else chain, the first matching branch is the
@ -36,9 +36,17 @@ fn main() {
# License
`cfg-if` is primarily distributed under the terms of both the MIT license and
the Apache License (Version 2.0), with portions covered by various BSD-like
licenses.
This project is licensed under either of
See LICENSE-APACHE, and LICENSE-MIT for details.
* Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or
http://www.apache.org/licenses/LICENSE-2.0)
* MIT license ([LICENSE-MIT](LICENSE-MIT) or
http://opensource.org/licenses/MIT)
at your option.
### Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in Serde by you, as defined in the Apache-2.0 license, shall be
dual licensed as above, without any additional terms or conditions.

53
third_party/rust/cfg-if/src/lib.rs поставляемый
Просмотреть файл

@ -1,10 +1,10 @@
//! A macro for defining #[cfg] if-else statements.
//! A macro for defining `#[cfg]` if-else statements.
//!
//! The macro provided by this crate, `cfg_if`, is similar to the `if/elif` C
//! preprocessor macro by allowing definition of a cascade of `#[cfg]` cases,
//! emitting the implementation which matches first.
//!
//! This allows you to conveniently provide a long list #[cfg]'d blocks of code
//! This allows you to conveniently provide a long list `#[cfg]`'d blocks of code
//! without having to rewrite each clause multiple times.
//!
//! # Example
@ -28,54 +28,63 @@
#![no_std]
#![doc(html_root_url = "http://alexcrichton.com/cfg-if")]
#![doc(html_root_url = "https://docs.rs/cfg-if")]
#![deny(missing_docs)]
#![cfg_attr(test, deny(warnings))]
#[macro_export]
#[macro_export(local_inner_macros)]
macro_rules! cfg_if {
// match if/else chains with a final `else`
($(
if #[cfg($($meta:meta),*)] { $($it:item)* }
) else * else {
$($it2:item)*
}) => {
__cfg_if_items! {
cfg_if! {
@__items
() ;
$( ( ($($meta),*) ($($it)*) ), )*
( () ($($it2)*) ),
}
};
// match if/else chains lacking a final `else`
(
if #[cfg($($i_met:meta),*)] { $($i_it:item)* }
$(
else if #[cfg($($e_met:meta),*)] { $($e_it:item)* }
)*
) => {
__cfg_if_items! {
cfg_if! {
@__items
() ;
( ($($i_met),*) ($($i_it)*) ),
$( ( ($($e_met),*) ($($e_it)*) ), )*
( () () ),
}
}
}
};
#[macro_export]
#[doc(hidden)]
macro_rules! __cfg_if_items {
(($($not:meta,)*) ; ) => {};
(($($not:meta,)*) ; ( ($($m:meta),*) ($($it:item)*) ), $($rest:tt)*) => {
__cfg_if_apply! { cfg(all($($m,)* not(any($($not),*)))), $($it)* }
__cfg_if_items! { ($($not,)* $($m,)*) ; $($rest)* }
}
}
// Internal and recursive macro to emit all the items
//
// Collects all the negated cfgs in a list at the beginning and after the
// semicolon is all the remaining items
(@__items ($($not:meta,)*) ; ) => {};
(@__items ($($not:meta,)*) ; ( ($($m:meta),*) ($($it:item)*) ), $($rest:tt)*) => {
// Emit all items within one block, applying an approprate #[cfg]. The
// #[cfg] will require all `$m` matchers specified and must also negate
// all previous matchers.
cfg_if! { @__apply cfg(all($($m,)* not(any($($not),*)))), $($it)* }
#[macro_export]
#[doc(hidden)]
macro_rules! __cfg_if_apply {
($m:meta, $($it:item)*) => {
// Recurse to emit all other items in `$rest`, and when we do so add all
// our `$m` matchers to the list of `$not` matchers as future emissions
// will have to negate everything we just matched as well.
cfg_if! { @__items ($($not,)* $($m,)*) ; $($rest)* }
};
// Internal macro to Apply a cfg attribute to a list of items
(@__apply $m:meta, $($it:item)*) => {
$(#[$m] $it)*
}
};
}
#[cfg(test)]

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

12
third_party/rust/encoding_rs/Cargo.toml поставляемый
Просмотреть файл

@ -12,7 +12,7 @@
[package]
name = "encoding_rs"
version = "0.8.14"
version = "0.8.16"
authors = ["Henri Sivonen <hsivonen@hsivonen.fi>"]
description = "A Gecko-oriented implementation of the Encoding Standard"
homepage = "https://docs.rs/encoding_rs/"
@ -27,12 +27,12 @@ lto = true
[dependencies.cfg-if]
version = "0.1.0"
[dependencies.serde]
version = "1.0"
[dependencies.packed_simd]
version = "0.3.3"
optional = true
[dependencies.simd]
version = "0.2.3"
[dependencies.serde]
version = "1.0"
optional = true
[dev-dependencies.bincode]
version = "0.8"
@ -53,6 +53,6 @@ fast-legacy-encode = ["fast-hangul-encode", "fast-hanja-encode", "fast-kanji-enc
less-slow-big5-hanzi-encode = []
less-slow-gb-hanzi-encode = []
less-slow-kanji-encode = []
simd-accel = ["simd"]
simd-accel = ["packed_simd", "packed_simd/into_bits"]
[badges.travis-ci]
repository = "hsivonen/encoding_rs"

50
third_party/rust/encoding_rs/README.md поставляемый
Просмотреть файл

@ -126,17 +126,39 @@ There are currently these optional cargo features:
### `simd-accel`
Enables SSE2 acceleration on x86 and x86_64 and NEON acceleration on Aarch64
and ARMv7. _Enabling this cargo feature is recommended when building for x86,
x86_64, ARMv7 or Aarch64._ The intention is for the functionality enabled by
this feature to become the normal on-by-default behavior once
[portable SIMD](https://github.com/rust-lang/rfcs/pull/2366) becames part of
stable Rust.
Enables SIMD acceleration using the nightly-dependent `packed_simd` crate.
Enabling this feature breaks the build unless the target is x86 with SSE2
(Rust's default 32-bit x86 target, `i686`, has SSE2, but Linux distros may
use an x86 target without SSE2, i.e. `i586` in `rustup` terms), ARMv7 or
thumbv7 with NEON (`-C target_feature=+neon`), x86_64 or Aarch64.
This is an opt-in feature, because enabling this feature _opts out_ of Rust's
guarantees of future compilers compiling old code (aka. "stability story").
Currently, this has not been tested to be an improvement except for these
targets:
* x86_64
* i686
* aarch64
* thumbv7neon
If you use nightly Rust, you use targets whose first component is one of the
above, and you are prepared _to have to revise your configuration when updating
Rust_, you should enable this feature. Otherwise, please _do not_ enable this
feature.
_Note!_ If you are compiling for a target that does not have 128-bit SIMD
enabled as part of the target definition and you are enabling 128-bit SIMD
using `-C target_feature`, you need to enable the `core_arch` Cargo feature
for `packed_simd` to compile a crates.io snapshot of `core_arch` instead of
using the standard-library copy of `core::arch`, because the `core::arch`
module of the pre-compiled standard library has been compiled with the
assumption that the CPU doesn't have 128-bit SIMD. At present this applies
mainly to 32-bit ARM targets whose first component does not include the
substring `neon`.
The encoding_rs side of things has not been properly set up for POWER,
PowerPC, MIPS, etc., SIMD at this time, so even if you were to follow
the advice from the previous paragraph, you probably shouldn't use
the `simd-accel` option on the less mainstream architectures at this
time.
Used by Firefox.
@ -382,6 +404,14 @@ To regenerate the generated code:
## Release Notes
### 0.8.16
* Switch from the `simd` crate to `packed_simd`.
### 0.8.15
* Adjust documentation for `simd-accel` (README-only release).
### 0.8.14
* Made UTF-16 to UTF-8 encode conversion fill the output buffer as

8
third_party/rust/encoding_rs/build.rs поставляемый
Просмотреть файл

@ -1,4 +1,12 @@
fn main() {
// This does not enable `RUSTC_BOOTSTRAP=1` for `packed_simd`.
// You still need to knowingly have a setup that makes
// `packed_simd` compile. Therefore, having this file on
// crates.io is harmless in terms of users of `encoding_rs`
// accidentally depending on nightly features. Having this
// here means that if you knowingly want this, you only
// need to maintain a fork of `packed_simd` without _also_
// having to maintain a fork of `encoding_rs`.
#[cfg(feature = "simd-accel")]
println!("cargo:rustc-env=RUSTC_BOOTSTRAP=1");
}

2
third_party/rust/encoding_rs/src/handles.rs поставляемый
Просмотреть файл

@ -34,7 +34,7 @@ use simd_funcs::*;
all(target_endian = "little", target_feature = "neon")
)
))]
use simd::u16x8;
use packed_simd::u16x8;
use super::DecoderResult;
use super::EncoderResult;

7
third_party/rust/encoding_rs/src/lib.rs поставляемый
Просмотреть файл

@ -11,7 +11,7 @@
feature = "cargo-clippy",
allow(doc_markdown, inline_always, new_ret_no_self)
)]
#![doc(html_root_url = "https://docs.rs/encoding_rs/0.8.14")]
#![doc(html_root_url = "https://docs.rs/encoding_rs/0.8.16")]
//! encoding_rs is a Gecko-oriented Free Software / Open Source implementation
//! of the [Encoding Standard](https://encoding.spec.whatwg.org/) in Rust.
@ -665,7 +665,7 @@
//! See the section [_UTF-16LE, UTF-16BE and Unicode Encoding Schemes_](#utf-16le-utf-16be-and-unicode-encoding-schemes)
//! for discussion about the UTF-16 family.
#![cfg_attr(feature = "simd-accel", feature(platform_intrinsics, core_intrinsics))]
#![cfg_attr(feature = "simd-accel", feature(stdsimd, core_intrinsics))]
#[macro_use]
extern crate cfg_if;
@ -678,7 +678,8 @@ extern crate cfg_if;
all(target_endian = "little", target_feature = "neon")
)
))]
extern crate simd;
#[macro_use(shuffle)]
extern crate packed_simd;
#[cfg(feature = "serde")]
extern crate serde;

24
third_party/rust/encoding_rs/src/mem.rs поставляемый
Просмотреть файл

@ -228,8 +228,8 @@ macro_rules! by_unit_check_simd {
cfg_if! {
if #[cfg(all(feature = "simd-accel", any(target_feature = "sse2", all(target_endian = "little", target_arch = "aarch64"), all(target_endian = "little", target_feature = "neon"))))] {
use simd_funcs::*;
use simd::u8x16;
use simd::u16x8;
use packed_simd::u8x16;
use packed_simd::u16x8;
const SIMD_ALIGNMENT: usize = 16;
@ -631,7 +631,6 @@ cfg_if! {
///
/// May read the entire buffer even if it isn't all-ASCII. (I.e. the function
/// is not guaranteed to fail fast.)
#[inline]
pub fn is_ascii(buffer: &[u8]) -> bool {
is_ascii_impl(buffer)
}
@ -641,7 +640,6 @@ pub fn is_ascii(buffer: &[u8]) -> bool {
///
/// May read the entire buffer even if it isn't all-ASCII. (I.e. the function
/// is not guaranteed to fail fast.)
#[inline]
pub fn is_basic_latin(buffer: &[u16]) -> bool {
is_basic_latin_impl(buffer)
}
@ -651,7 +649,6 @@ pub fn is_basic_latin(buffer: &[u16]) -> bool {
///
/// Fails fast. (I.e. returns before having read the whole buffer if UTF-8
/// invalidity or code points above U+00FF are discovered.
#[inline]
pub fn is_utf8_latin1(buffer: &[u8]) -> bool {
is_utf8_latin1_impl(buffer).is_none()
}
@ -661,7 +658,6 @@ pub fn is_utf8_latin1(buffer: &[u8]) -> bool {
///
/// Fails fast. (I.e. returns before having read the whole buffer if code
/// points above U+00FF are discovered.
#[inline]
pub fn is_str_latin1(buffer: &str) -> bool {
is_str_latin1_impl(buffer).is_none()
}
@ -671,7 +667,6 @@ pub fn is_str_latin1(buffer: &str) -> bool {
///
/// May read the entire buffer even if it isn't all-Latin1. (I.e. the function
/// is not guaranteed to fail fast.)
#[inline]
pub fn is_utf16_latin1(buffer: &[u16]) -> bool {
is_utf16_latin1_impl(buffer)
}
@ -1283,7 +1278,6 @@ pub fn is_str_bidi(buffer: &str) -> bool {
/// high surrogate that could be the high half of an RTL character.
/// Returns `false` if the input contains neither RTL characters nor
/// unpaired high surrogates that could be higher halves of RTL characters.
#[inline]
pub fn is_utf16_bidi(buffer: &[u16]) -> bool {
is_utf16_bidi_impl(buffer)
}
@ -1416,7 +1410,6 @@ pub fn is_utf16_code_unit_bidi(u: u16) -> bool {
/// Returns `Latin1Bidi::Latin1` if `is_utf8_latin1()` would return `true`.
/// Otherwise, returns `Latin1Bidi::Bidi` if `is_utf8_bidi()` would return
/// `true`. Otherwise, returns `Latin1Bidi::LeftToRight`.
#[inline]
pub fn check_utf8_for_latin1_and_bidi(buffer: &[u8]) -> Latin1Bidi {
if let Some(offset) = is_utf8_latin1_impl(buffer) {
if is_utf8_bidi(&buffer[offset..]) {
@ -1437,7 +1430,6 @@ pub fn check_utf8_for_latin1_and_bidi(buffer: &[u8]) -> Latin1Bidi {
/// Returns `Latin1Bidi::Latin1` if `is_str_latin1()` would return `true`.
/// Otherwise, returns `Latin1Bidi::Bidi` if `is_str_bidi()` would return
/// `true`. Otherwise, returns `Latin1Bidi::LeftToRight`.
#[inline]
pub fn check_str_for_latin1_and_bidi(buffer: &str) -> Latin1Bidi {
// The transition from the latin1 check to the bidi check isn't
// optimal but not tweaking it to perfection today.
@ -1460,7 +1452,6 @@ pub fn check_str_for_latin1_and_bidi(buffer: &str) -> Latin1Bidi {
/// Returns `Latin1Bidi::Latin1` if `is_utf16_latin1()` would return `true`.
/// Otherwise, returns `Latin1Bidi::Bidi` if `is_utf16_bidi()` would return
/// `true`. Otherwise, returns `Latin1Bidi::LeftToRight`.
#[inline]
pub fn check_utf16_for_latin1_and_bidi(buffer: &[u16]) -> Latin1Bidi {
check_utf16_for_latin1_and_bidi_impl(buffer)
}
@ -1476,7 +1467,6 @@ pub fn check_utf16_for_latin1_and_bidi(buffer: &[u16]) -> Latin1Bidi {
/// # Panics
///
/// Panics if the destination buffer is shorter than stated above.
#[inline]
pub fn convert_utf8_to_utf16(src: &[u8], dst: &mut [u16]) -> usize {
// TODO: Can the requirement for dst to be at least one unit longer
// be eliminated?
@ -1516,7 +1506,6 @@ pub fn convert_utf8_to_utf16(src: &[u8], dst: &mut [u16]) -> usize {
/// # Panics
///
/// Panics if the destination buffer is shorter than stated above.
#[inline]
pub fn convert_str_to_utf16(src: &str, dst: &mut [u16]) -> usize {
assert!(
dst.len() >= src.len(),
@ -1683,7 +1672,6 @@ pub fn convert_utf16_to_utf8(src: &[u16], dst: &mut [u8]) -> usize {
/// not allocating memory for the worst case up front. Specifically,
/// if the input starts with or ends with an unpaired surrogate, those are
/// replaced with the REPLACEMENT CHARACTER.
#[inline]
pub fn convert_utf16_to_str_partial(src: &[u16], dst: &mut str) -> (usize, usize) {
let bytes: &mut [u8] = unsafe { dst.as_bytes_mut() };
let (read, written) = convert_utf16_to_utf8_partial(src, bytes);
@ -1727,7 +1715,6 @@ pub fn convert_utf16_to_str(src: &[u16], dst: &mut str) -> usize {
/// # Panics
///
/// Panics if the destination buffer is shorter than stated above.
#[inline]
pub fn convert_latin1_to_utf16(src: &[u8], dst: &mut [u16]) {
assert!(
dst.len() >= src.len(),
@ -1755,7 +1742,6 @@ pub fn convert_latin1_to_utf16(src: &[u8], dst: &mut [u16]) {
/// indicated by the return value, so using a `&mut str` interpreted as
/// `&mut [u8]` as the destination is not safe. If you want to convert into
/// a `&mut str`, use `convert_utf16_to_str()` instead of this function.
#[inline]
pub fn convert_latin1_to_utf8_partial(src: &[u8], dst: &mut [u8]) -> (usize, usize) {
let src_len = src.len();
let src_ptr = src.as_ptr();
@ -1894,7 +1880,6 @@ pub fn convert_latin1_to_str(src: &[u8], dst: &mut str) -> usize {
///
/// If debug assertions are enabled (and not fuzzing) and the input is
/// not in the range U+0000 to U+00FF, inclusive.
#[inline]
pub fn convert_utf8_to_latin1_lossy(src: &[u8], dst: &mut [u8]) -> usize {
assert!(
dst.len() >= src.len(),
@ -1957,7 +1942,6 @@ pub fn convert_utf8_to_latin1_lossy(src: &[u8], dst: &mut [u8]) -> usize {
///
/// (Probably in future versions if debug assertions are enabled (and not
/// fuzzing) and the input is not in the range U+0000 to U+00FF, inclusive.)
#[inline]
pub fn convert_utf16_to_latin1_lossy(src: &[u16], dst: &mut [u8]) {
assert!(
dst.len() >= src.len(),
@ -2030,7 +2014,6 @@ pub fn encode_latin1_lossy<'a>(string: &'a str) -> Cow<'a, [u8]> {
/// Returns the index of the first unpaired surrogate or, if the input is
/// valid UTF-16 in its entirety, the length of the input.
#[inline]
pub fn utf16_valid_up_to(buffer: &[u16]) -> usize {
utf16_valid_up_to_impl(buffer)
}
@ -2060,7 +2043,6 @@ pub fn ensure_utf16_validity(buffer: &mut [u16]) {
/// # Panics
///
/// Panics if the destination buffer is shorter than stated above.
#[inline]
pub fn copy_ascii_to_ascii(src: &[u8], dst: &mut [u8]) -> usize {
assert!(
dst.len() >= src.len(),
@ -2087,7 +2069,6 @@ pub fn copy_ascii_to_ascii(src: &[u8], dst: &mut [u8]) -> usize {
/// # Panics
///
/// Panics if the destination buffer is shorter than stated above.
#[inline]
pub fn copy_ascii_to_basic_latin(src: &[u8], dst: &mut [u16]) -> usize {
assert!(
dst.len() >= src.len(),
@ -2114,7 +2095,6 @@ pub fn copy_ascii_to_basic_latin(src: &[u8], dst: &mut [u16]) -> usize {
/// # Panics
///
/// Panics if the destination buffer is shorter than stated above.
#[inline]
pub fn copy_basic_latin_to_ascii(src: &[u16], dst: &mut [u8]) -> usize {
assert!(
dst.len() >= src.len(),

Просмотреть файл

@ -7,9 +7,9 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use simd::u16x8;
use simd::u8x16;
use simd::Simd;
use packed_simd::u16x8;
use packed_simd::u8x16;
use packed_simd::FromBits;
// TODO: Migrate unaligned access to stdlib code if/when the RFC
// https://github.com/rust-lang/rfcs/pull/1725 is implemented.
@ -62,14 +62,29 @@ pub unsafe fn store8_aligned(ptr: *mut u16, s: u16x8) {
*(ptr as *mut u16x8) = s;
}
extern "platform-intrinsic" {
fn simd_shuffle16<T: Simd, U: Simd<Elem = T::Elem>>(x: T, y: T, idx: [u32; 16]) -> U;
cfg_if! {
if #[cfg(all(target_feature = "sse2", target_arch = "x86_64"))] {
use std::arch::x86_64::__m128i;
use std::arch::x86_64::_mm_movemask_epi8;
use std::arch::x86_64::_mm_packus_epi16;
} else if #[cfg(all(target_feature = "sse2", target_arch = "x86"))] {
use std::arch::x86::__m128i;
use std::arch::x86::_mm_movemask_epi8;
use std::arch::x86::_mm_packus_epi16;
} else if #[cfg(target_arch = "aarch64")]{
use std::arch::aarch64::uint8x16_t;
use std::arch::aarch64::uint16x8_t;
use std::arch::aarch64::vmaxvq_u8;
use std::arch::aarch64::vmaxvq_u16;
} else {
}
}
// #[inline(always)]
// fn simd_byte_swap_u8(s: u8x16) -> u8x16 {
// unsafe {
// simd_shuffle16(s, s, [1, 0, 3, 2, 5, 4, 7, 6, 9, 8, 11, 10, 13, 12, 15, 14])
// shuffle!(s, s, [1, 0, 3, 2, 5, 4, 7, 6, 9, 8, 11, 10, 13, 12, 15, 14])
// }
// }
@ -87,30 +102,18 @@ pub fn simd_byte_swap(s: u16x8) -> u16x8 {
#[inline(always)]
pub fn to_u16_lanes(s: u8x16) -> u16x8 {
unsafe { ::std::mem::transmute(s) }
u16x8::from_bits(s)
}
// #[inline(always)]
// pub fn to_u8_lanes(s: u16x8) -> u8x16 {
// unsafe { ::std::mem::transmute(s) }
// }
cfg_if! {
if #[cfg(target_feature = "sse2")] {
use simd::i16x8;
use simd::i8x16;
extern "platform-intrinsic" {
fn x86_mm_movemask_epi8(x: i8x16) -> i32;
}
// Expose low-level mask instead of higher-level conclusion,
// because the non-ASCII case would perform less well otherwise.
#[inline(always)]
pub fn mask_ascii(s: u8x16) -> i32 {
unsafe {
let signed: i8x16 = ::std::mem::transmute_copy(&s);
x86_mm_movemask_epi8(signed)
_mm_movemask_epi8(__m128i::from_bits(s))
}
}
@ -124,19 +127,14 @@ cfg_if! {
#[inline(always)]
pub fn simd_is_ascii(s: u8x16) -> bool {
unsafe {
let signed: i8x16 = ::std::mem::transmute_copy(&s);
x86_mm_movemask_epi8(signed) == 0
_mm_movemask_epi8(__m128i::from_bits(s)) == 0
}
}
} else if #[cfg(target_arch = "aarch64")]{
extern "platform-intrinsic" {
fn aarch64_vmaxvq_u8(x: u8x16) -> u8;
}
#[inline(always)]
pub fn simd_is_ascii(s: u8x16) -> bool {
unsafe {
aarch64_vmaxvq_u8(s) < 0x80
vmaxvq_u8(uint8x16_t::from_bits(s)) < 0x80
}
}
} else {
@ -164,7 +162,7 @@ cfg_if! {
#[inline(always)]
pub fn simd_is_str_latin1(s: u8x16) -> bool {
unsafe {
aarch64_vmaxvq_u8(s) < 0xC4
vmaxvq_u8(uint8x16_t::from_bits(s)) < 0xC4
}
}
} else {
@ -178,21 +176,17 @@ cfg_if! {
cfg_if! {
if #[cfg(target_arch = "aarch64")]{
extern "platform-intrinsic" {
fn aarch64_vmaxvq_u16(x: u16x8) -> u16;
}
#[inline(always)]
pub fn simd_is_basic_latin(s: u16x8) -> bool {
unsafe {
aarch64_vmaxvq_u16(s) < 0x80
vmaxvq_u16(uint16x8_t::from_bits(s)) < 0x80
}
}
#[inline(always)]
pub fn simd_is_latin1(s: u16x8) -> bool {
unsafe {
aarch64_vmaxvq_u16(s) < 0x100
vmaxvq_u16(uint16x8_t::from_bits(s)) < 0x100
}
}
} else {
@ -225,7 +219,7 @@ cfg_if! {
macro_rules! aarch64_return_false_if_below_hebrew {
($s:ident) => ({
unsafe {
if aarch64_vmaxvq_u16($s) < 0x0590 {
if vmaxvq_u16(uint16x8_t::from_bits($s)) < 0x0590 {
return false;
}
}
@ -292,47 +286,38 @@ pub fn is_u16x8_bidi(s: u16x8) -> bool {
#[inline(always)]
pub fn simd_unpack(s: u8x16) -> (u16x8, u16x8) {
unsafe {
let first: u8x16 = simd_shuffle16(
let first: u8x16 = shuffle!(
s,
u8x16::splat(0),
[0, 16, 1, 17, 2, 18, 3, 19, 4, 20, 5, 21, 6, 22, 7, 23],
[0, 16, 1, 17, 2, 18, 3, 19, 4, 20, 5, 21, 6, 22, 7, 23]
);
let second: u8x16 = simd_shuffle16(
let second: u8x16 = shuffle!(
s,
u8x16::splat(0),
[8, 24, 9, 25, 10, 26, 11, 27, 12, 28, 13, 29, 14, 30, 15, 31],
[8, 24, 9, 25, 10, 26, 11, 27, 12, 28, 13, 29, 14, 30, 15, 31]
);
(
::std::mem::transmute_copy(&first),
::std::mem::transmute_copy(&second),
)
(u16x8::from_bits(first), u16x8::from_bits(second))
}
}
cfg_if! {
if #[cfg(target_feature = "sse2")] {
extern "platform-intrinsic" {
fn x86_mm_packus_epi16(x: i16x8, y: i16x8) -> u8x16;
}
#[inline(always)]
pub fn simd_pack(a: u16x8, b: u16x8) -> u8x16 {
unsafe {
let first: i16x8 = ::std::mem::transmute_copy(&a);
let second: i16x8 = ::std::mem::transmute_copy(&b);
x86_mm_packus_epi16(first, second)
u8x16::from_bits(_mm_packus_epi16(__m128i::from_bits(a), __m128i::from_bits(b)))
}
}
} else {
#[inline(always)]
pub fn simd_pack(a: u16x8, b: u16x8) -> u8x16 {
unsafe {
let first: u8x16 = ::std::mem::transmute_copy(&a);
let second: u8x16 = ::std::mem::transmute_copy(&b);
simd_shuffle16(
let first = u8x16::from_bits(a);
let second = u8x16::from_bits(b);
shuffle!(
first,
second,
[0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30],
[0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30]
)
}
}

Просмотреть файл

@ -14,15 +14,12 @@ use variant::*;
cfg_if! {
if #[cfg(feature = "simd-accel")] {
use simd_funcs::*;
use simd::u16x8;
use packed_simd::u16x8;
#[inline(always)]
fn shift_upper(unpacked: u16x8) -> u16x8 {
let highest_ascii = u16x8::splat(0x7F);
let offset = u16x8::splat(0xF700);
let mask = unpacked.gt(highest_ascii).to_repr().to_u16();
unpacked + (offset & mask)
}
unpacked + unpacked.gt(highest_ascii).select(u16x8::splat(0xF700), u16x8::splat(0)) }
} else {
}
}

59
third_party/rust/packed_simd/.appveyor.yml поставляемый Normal file
Просмотреть файл

@ -0,0 +1,59 @@
matrix:
allow_failures:
# FIXME: https://github.com/rust-lang-nursery/packed_simd/issues/72
- TARGET: i686-pc-windows-msvc
- TARGET: i686-pc-windows-gnu
- TARGET: x86_64-pc-windows-gnu
fast_finish: true
environment:
matrix:
- TARGET: x86_64-pc-windows-msvc
MSYSTEM: MINGW64
NOVERIFY: "1"
- TARGET: x86_64-pc-windows-msvc
MSYSTEM: MINGW64
RUSTFLAGS: "-C target-feature=+sse4.2"
NOVERIFY: "1"
- TARGET: x86_64-pc-windows-msvc
MSYSTEM: MINGW64
RUSTFLAGS: "-C target-feature=+avx"
NOVERIFY: "1"
- TARGET: x86_64-pc-windows-msvc
MSYSTEM: MINGW64
RUSTFLAGS: "-C target-feature=+avx2"
NOVERIFY: "1"
- TARGET: i686-pc-windows-msvc
MSYSTEM: MINGW32
NOVERIFY: "1"
- TARGET: i686-pc-windows-msvc
MSYSTEM: MINGW32
RUSTFLAGS: "-C target-feature=+sse4.2"
NOVERIFY: "1"
- TARGET: i686-pc-windows-msvc
MSYSTEM: MINGW32
RUSTFLAGS: "-C target-feature=+avx"
NOVERIFY: "1"
- TARGET: i686-pc-windows-msvc
MSYSTEM: MINGW32
RUSTFLAGS: "-C target-feature=+avx2"
NOVERIFY: "1"
- TARGET: x86_64-pc-windows-gnu
MSYSTEM: MINGW64
- TARGET: i686-pc-windows-gnu
MSYSTEM: MINGW32
- TARGET: x86_64-pc-windows-gnu
MSYSTEM: MINGW64
install:
- ps: if (ls -r . -fi "*.rs" | sls "`t") { throw "Found tab character" }
- ps: Start-FileDownload "https://static.rust-lang.org/dist/rust-nightly-${env:TARGET}.exe" -FileName "rust-install.exe"
- ps: .\rust-install.exe /VERYSILENT /NORESTART /DIR="C:\rust" | Out-Null
- ps: $env:PATH="$env:PATH;C:\rust\bin"
- set PATH=c:\msys64\%MSYSTEM%\bin;c:\msys64\usr\bin;%PATH%
- rustc -vV
- cargo -vV
build: false
test_script: bash -c "ci/run.sh"

1
third_party/rust/packed_simd/.cargo-checksum.json поставляемый Normal file

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

308
third_party/rust/packed_simd/.travis.yml поставляемый Normal file
Просмотреть файл

@ -0,0 +1,308 @@
language: rust
sudo: false
rust: nightly
stages:
- tools
- linux-tier1
- osx-tier1
- osx-tier2
- linux-tier2
- android
matrix:
fast_finish: true
include:
# Android:
- env: TARGET=x86_64-linux-android NOVERIFY=1
name: "x86_64-unknown-linux-android + SSE2"
stage: android
- env: TARGET=arm-linux-androideabi
name: "arm-linux-androideabi"
stage: android
- env: TARGET=arm-linux-androideabi RUSTFLAGS="-C target-feature=+v7,+neon"
name: "arm-linux-androideabi + NEON"
stage: android
- env: TARGET=aarch64-linux-android
name: "aarch64-unknown-linux-android"
stage: android
- env: TARGET=aarch64-linux-android RUSTFLAGS="-C target-feature=+neon"
name: "aarch64-unknown-linux-android + NEON"
stage: android
- env: TARGET="thumbv7neon-linux-androideabi"
name: "thumbv7neon-linux-androideabi"
stage: android
# Linux:
- env: TARGET=i586-unknown-linux-gnu
name: "i586-unknown-linux-gnu"
stage: linux-tier2
- env: TARGET=i586-unknown-linux-gnu RUSTFLAGS="-C target-feature=+sse"
name: "i586-unknown-linux-gnu + SSE"
stage: linux-tier2
- env: TARGET=i586-unknown-linux-gnu RUSTFLAGS="-C target-feature=+sse2"
name: "i586-unknown-linux-gnu + SSE2"
stage: linux-tier2
- env: TARGET=i686-unknown-linux-gnu
name: "i686-unknown-linux-gnu + SSE2"
stage: linux-tier1
- env: TARGET=i686-unknown-linux-gnu RUSTFLAGS="-C target-feature=+sse4.2"
name: "i686-unknown-linux-gnu + SSE4.2"
stage: linux-tier1
- env: TARGET=i686-unknown-linux-gnu RUSTFLAGS="-C target-feature=+avx2"
name: "i686-unknown-linux-gnu + AVX2"
stage: linux-tier1
- env: TARGET=x86_64-unknown-linux-gnu
name: "x86_64-unknown-linux-gnu + SSE2"
install: rustup component add rustfmt-preview
stage: linux-tier1
- env: TARGET=x86_64-unknown-linux-gnu RUSTFLAGS="-C target-feature=+sse4.2"
name: "x86_64-unknown-linux-gnu + SSE4.2"
install: rustup component add rustfmt-preview
stage: linux-tier1
- env: TARGET=x86_64-unknown-linux-gnu RUSTFLAGS="-C target-feature=+avx"
name: "x86_64-unknown-linux-gnu + AVX"
install: rustup component add rustfmt-preview
stage: linux-tier1
- env: TARGET=x86_64-unknown-linux-gnu RUSTFLAGS="-C target-feature=+avx2"
name: "x86_64-unknown-linux-gnu + AVX2"
install: rustup component add rustfmt-preview
stage: linux-tier1
- env: TARGET=x86_64-unknown-linux-gnu-emulated
name: "Intel SDE + SSE2"
install: true
stage: linux-tier1
- env: TARGET=x86_64-unknown-linux-gnu-emulated RUSTFLAGS="-C target-feature=+sse4.2"
name: "Intel SDE + SSE4.2"
install: true
stage: linux-tier1
- env: TARGET=x86_64-unknown-linux-gnu-emulated RUSTFLAGS="-C target-feature=+avx"
name: "Intel SDE + AVX"
install: true
stage: linux-tier1
- env: TARGET=x86_64-unknown-linux-gnu-emulated RUSTFLAGS="-C target-feature=+avx2"
name: "Intel SDE + AVX2"
install: true
stage: linux-tier1
- env: TARGET=x86_64-unknown-linux-gnu-emulated RUSTFLAGS="-C target-feature=+avx-512f"
name: "Intel SDE + AVX-512"
install: true
stage: linux-tier1
- env: TARGET=arm-unknown-linux-gnueabi
name: "arm-unknown-linux-gnueabi"
stage: linux-tier2
- env: TARGET=arm-unknown-linux-gnueabi RUSTFLAGS="-C target-feature=+v7,+neon"
name: "arm-unknown-linux-gnueabi + NEON"
stage: linux-tier2
- env: TARGET=arm-unknown-linux-gnueabihf
name: "arm-unknown-linux-gnueabihf"
stage: linux-tier2
- env: TARGET=arm-unknown-linux-gnueabihf RUSTFLAGS="-C target-feature=+v7,+neon"
name: "arm-unknown-linux-gnueabihf + NEON"
stage: linux-tier2
- env: TARGET=armv7-unknown-linux-gnueabihf
name: "armv7-unknown-linux-gnueabihf"
stage: linux-tier2
- env: TARGET=armv7-unknown-linux-gnueabihf RUSTFLAGS="-C target-feature=+neon"
name: "armv7-unknown-linux-gnueabihf + NEON"
stage: linux-tier2
- env: TARGET="thumbv7neon-unknown-linux-gnueabihf"
name: "thumbv7neon-unknown-linux-gnueabihf"
stage: linux-tier2
- env: TARGET=aarch64-unknown-linux-gnu
name: "aarch64-unknown-linux-gnu"
stage: linux-tier2
- env: TARGET=aarch64-unknown-linux-gnu RUSTFLAGS="-C target-feature=+neon"
name: "aarch64-unknown-linux-gnu + NEON"
stage: linux-tier2
- env: TARGET=mips-unknown-linux-gnu
name: "mips-unknown-linux-gnu"
stage: linux-tier2
- env: TARGET=mipsel-unknown-linux-musl
name: "mipsel-unknown-linux-musl"
stage: linux-tier2
- env: TARGET=mips64-unknown-linux-gnuabi64
name: "mips64-unknown-linux-gnuabi64"
stage: linux-tier2
- env: TARGET=mips64el-unknown-linux-gnuabi64
name: "mips64el-unknown-linux-gnuabi64"
stage: linux-tier2
# FIXME: https://github.com/rust-lang-nursery/packed_simd/issues/18
# env: TARGET=mips64el-unknown-linux-gnuabi64 RUSTFLAGS="-C target-feature=+msa -C target-cpu=mips64r6"
- env: TARGET=powerpc-unknown-linux-gnu
name: "powerpc-unknown-linux-gnu"
stage: linux-tier2
- env: TARGET=powerpc64-unknown-linux-gnu
name: "powerpc64-unknown-linux-gnu"
stage: linux-tier2
- env: TARGET=powerpc64le-unknown-linux-gnu
name: "powerpc64le-unknown-linux-gnu"
stage: linux-tier2
- env: TARGET=powerpc64le-unknown-linux-gnu RUSTFLAGS="-C target-feature=+altivec"
name: "powerpc64le-unknown-linux-gnu + ALTIVEC"
stage: linux-tier2
- env: TARGET=powerpc64le-unknown-linux-gnu RUSTFLAGS="-C target-feature=+vsx"
name: "powerpc64le-unknown-linux-gnu + VSX"
stage: linux-tier2
- env: TARGET=s390x-unknown-linux-gnu
name: "s390x-unknown-linux-gnu"
stage: linux-tier2
- env: TARGET=sparc64-unknown-linux-gnu
name: "sparc64-unknown-linux-gnu"
stage: linux-tier2
# WebAssembly:
- env: TARGET=wasm32-unknown-unknown
name: "wasm32-unknown-unknown"
stage: osx-tier1 # For now
# MacOSX:
- os: osx
env: TARGET=i686-apple-darwin
name: "i686-apple-darwin + SSE2"
script: ci/run.sh
osx_image: xcode10
stage: osx-tier1
- os: osx
env: TARGET=i686-apple-darwin RUSTFLAGS="-C target-feature=+sse4.2"
name: "i686-apple-darwin + SSE4.2"
script: ci/run.sh
osx_image: xcode10
stage: osx-tier1
# Travis-CI OSX build bots do not support AVX2:
- os: osx
env: TARGET=i686-apple-darwin RUSTFLAGS="-C target-feature=+avx"
name: "i686-apple-darwin + AVX"
script: ci/run.sh
osx_image: xcode10
stage: osx-tier1
- os: osx
env: TARGET=x86_64-apple-darwin
name: "x86_64-apple-darwin + SSE2"
install: true
script: ci/run.sh
osx_image: xcode10
stage: osx-tier1
- os: osx
env: TARGET=x86_64-apple-darwin RUSTFLAGS="-C target-feature=+sse4.2"
name: "x86_64-apple-darwin + SSE4.2"
install: true
script: ci/run.sh
osx_image: xcode10
stage: osx-tier1
# Travis-CI OSX build bots do not support AVX2:
- os: osx
env: TARGET=x86_64-apple-darwin RUSTFLAGS="-C target-feature=+avx"
name: "x86_64-apple-darwin + AVX"
install: true
script: ci/run.sh
osx_image: xcode10
stage: osx-tier1
# *BSDs:
#- env: TARGET=i686-unknown-freebsd NORUN=1
# script: ci/run.sh
#- env: TARGET=x86_64-unknown-freebsd NORUN=1
# script: ci/run.sh
#- env: TARGET=x86_64-unknown-netbsd NORUN=1
# script: ci/run.sh
# Solaris:
#- env: TARGET=x86_64-sun-solaris NORUN=1
# script: ci/run.sh
# iOS:
- os: osx
env: TARGET=i386-apple-ios
name: "i386-apple-ios"
script: ci/run.sh
osx_image: xcode9.4
stage: osx-tier2
- os: osx
env: TARGET=x86_64-apple-ios
name: "x86_64-apple-ios + SSE2"
script: ci/run.sh
osx_image: xcode9.4
stage: osx-tier2
- os: osx
env: TARGET=armv7-apple-ios NORUN=1
name: "armv7-apple-ios [Build only]"
script: ci/run.sh
osx_image: xcode9.4
stage: osx-tier2
- os: osx
env: TARGET=aarch64-apple-ios NORUN=1
name: "aarch64-apple-ios [Build only]"
script: ci/run.sh
osx_image: xcode9.4
stage: osx-tier2
# BENCHMARKS:
- name: "Benchmarks - x86_64-unknown-linux-gnu"
install: TARGET=x86_64-unknown-linux-gnu ./ci/setup_benchmarks.sh
script: PATH=$(pwd):$PATH NORUN=1 VERIFY=1 FEATURES=core_arch,ispc,sleef-sys ci/benchmark.sh
stage: tools
- name: "Benchmarks - x86_64-apple-darwin"
install: TARGET=x86_64-apple-darwin ./ci/setup_benchmarks.sh
script: PATH=$(pwd):$PATH NORUN=1 VERIFY=1 FEATURES=core_arch,ispc,sleef-sys ci/benchmark.sh
os: osx
osx_image: xcode9.4
stage: tools
# TOOLS:
- name: "Documentation"
install: cargo install mdbook
script: ci/dox.sh
stage: tools
- name: "rustfmt"
install: true
before_script: rustup component add rustfmt-preview
script: ci/all.sh check_fmt || true
stage: tools
- name: "clippy"
install: true
before_script: rustup component add clippy-preview
script: ci/all.sh clippy
stage: tools
allow_failures:
# FIXME: ISPC cannot be found?
- name: "Benchmarks - x86_64-apple-darwin"
# FIXME: TBD
- env: TARGET=powerpc-unknown-linux-gnu
- env: TARGET=powerpc64-unknown-linux-gnu
- env: TARGET=powerpc64le-unknown-linux-gnu
- env: TARGET=powerpc64le-unknown-linux-gnu RUSTFLAGS="-C target-feature=+altivec"
- env: TARGET=powerpc64le-unknown-linux-gnu RUSTFLAGS="-C target-feature=+vsx"
#- env: TARGET=i686-unknown-freebsd NORUN=1
#- env: TARGET=x86_64-unknown-freebsd NORUN=1
#- env: TARGET=x86_64-unknown-netbsd NORUN=1
#- env: TARGET=x86_64-sun-solaris NORUN=1
# FIXME: TBD
- env: TARGET=arm-linux-androideabi
- env: TARGET=arm-linux-androideabi RUSTFLAGS="-C target-feature=+v7,+neon"
- env: TARGET=aarch64-linux-android
- env: TARGET=aarch64-linux-android RUSTFLAGS="-C target-feature=+neon"
# FIXME: iOS
# https://github.com/rust-lang-nursery/packed_simd/issues/26
- env: TARGET=i386-apple-ios
- env: TARGET=x86_64-apple-ios
# FIXME: https://github.com/rust-lang-nursery/packed_simd/issues/182
- env: TARGET=arm-unknown-linux-gnueabi RUSTFLAGS="-C target-feature=+v7,+neon"
- env: TARGET=arm-unknown-linux-gnueabihf RUSTFLAGS="-C target-feature=+v7,+neon"
- env: TARGET=armv7-unknown-linux-gnueabihf RUSTFLAGS="-C target-feature=+neon"
# FIXME: https://github.com/rust-lang-nursery/packed_simd/issues/183
- env: TARGET=wasm32-unknown-unknown
install: travis_retry rustup target add $TARGET
before_script: cargo generate-lockfile
script: travis_wait 50 ci/run-docker.sh
after_script: sleep 5
env:
global:
secure: "lPHv7s6+AxQYNaFncycVFQt++Y1asQmMhOikQU1ztlP8CK7+hn2m98cg/euOJyzIOb2iJ3ZX4cGZkzw4lc59MQBByb1GtDbazQoUOzVDbVfe9BDD2f8JVoIFh1CMfjPKQ7Gg/rJqWlwrUlSd5GNxPCutKjY7qZhJuR6SQbJjlWaGN2Vd4fVCzKXz8fHRXgMEZS+d+CR4Nsrkb83J3Z4s5kSdJmhYxJ61AWjuzJVwUh4l3/HEYlSL5XXpuh5R2i7W16h1PlNdaTUgkZli1lHzO8+6Q8LzX9+XiLIEVX9lw3A2NdIKGz8E/+7Qs5oYOkwYhjROsDQxIK7xkSM30bQuN7cwMBybAVIyOPJkqXQ1dQyp83KSdsOj7JMyDDRvcEDLI6ehRlm5EcdH7YrReuboN81iUo0Sa7VsuUmgj5hjERCt9r30f9aWuitABai7vKRtjglg7Sp5CrEVPA4PQs6PqKCCRogoggbXJ/Z5Dyw/RZaXPeNR9+qIKN1Vjm9Gew1sRN2JK/3+vXTKtyJXH/uBxgJt4jQlbuShOJuF+BSfTF88sMe67a/357SSOIb4JkaCyd0flDCWYE8576kaHPlVVMT2peXee0LeRXm1e13nG3Na0t3LS/orJLPHOShNQGoDj7qAP5aEKggRya896JGwtvlaBHHTmSQh65G7cyNErZo="
branches:
only:
- staging # bors r+
- trying # bors try
- master
notifications:
email:
on_success: never

42
third_party/rust/packed_simd/Cargo.toml поставляемый Normal file
Просмотреть файл

@ -0,0 +1,42 @@
[package]
name = "packed_simd"
version = "0.3.3"
authors = ["Gonzalo Brito Gadeschi <gonzalobg88@gmail.com>"]
description = "Portable Packed SIMD vectors"
documentation = "https://docs.rs/crate/packed_simd/"
homepage = "https://github.com/rust-lang-nursery/packed_simd"
repository = "https://github.com/rust-lang-nursery/packed_simd"
keywords = ["simd", "vector", "portability"]
categories = ["hardware-support", "concurrency", "no-std", "data-structures"]
license = "MIT/Apache-2.0"
build = "build.rs"
edition = "2018"
[badges]
appveyor = { repository = "rust-lang-nursery/packed_simd" }
travis-ci = { repository = "rust-lang-nursery/packed_simd" }
codecov = { repository = "rust-lang-nursery/packed_simd" }
is-it-maintained-issue-resolution = { repository = "rust-lang-nursery/packed_simd" }
is-it-maintained-open-issues = { repository = "rust-lang-nursery/packed_simd" }
maintenance = { status = "experimental" }
[dependencies]
cfg-if = "^0.1.6"
core_arch = { version = "^0.1.3", optional = true }
[features]
default = []
into_bits = []
libcore_neon = []
[dev-dependencies]
paste = "^0.1.3"
arrayvec = { version = "^0.4", default-features = false }
[target.'cfg(target_arch = "x86_64")'.dependencies.sleef-sys]
version = "^0.1.2"
optional = true
[target.wasm32-unknown-unknown.dev-dependencies]
wasm-bindgen = "=0.2.19"
wasm-bindgen-test = "=0.2.19"

Просмотреть файл

Просмотреть файл

@ -1,4 +1,4 @@
Copyright (c) 2014 Huon Wilson
Copyright (c) 2014 The Rust Project Developers
Permission is hereby granted, free of charge, to any
person obtaining a copy of this software and associated
@ -22,4 +22,4 @@ SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
DEALINGS IN THE SOFTWARE.

3
third_party/rust/packed_simd/bors.toml поставляемый Normal file
Просмотреть файл

@ -0,0 +1,3 @@
status = [
"continuous-integration/travis-ci/push"
]

8
third_party/rust/packed_simd/build.rs поставляемый Normal file
Просмотреть файл

@ -0,0 +1,8 @@
fn main() {
println!("cargo:rustc-env=RUSTC_BOOTSTRAP=1");
let target = std::env::var("TARGET")
.expect("TARGET environment variable not defined");
if target.contains("neon") {
println!("cargo:rustc-cfg=libcore_neon");
}
}

71
third_party/rust/packed_simd/ci/all.sh поставляемый Normal file
Просмотреть файл

@ -0,0 +1,71 @@
#!/usr/bin/env bash
#
# Performs an operation on all targets
set -ex
: "${1?The all.sh script requires one argument.}"
op=$1
cargo_clean() {
cargo clean
}
cargo_check_fmt() {
cargo fmt --all -- --check
}
cargo_fmt() {
cargo fmt --all
}
cargo_clippy() {
cargo clippy --all -- -D clippy::pedantic
}
CMD="-1"
case $op in
clean*)
CMD=cargo_clean
;;
check_fmt*)
CMD=cargo_check_fmt
;;
fmt*)
CMD=cargo_fmt
;;
clippy)
CMD=cargo_clippy
;;
*)
echo "Unknown operation: \"${op}\""
exit 1
;;
esac
echo "Operation is: ${CMD}"
# On src/
$CMD
# Check examples/
for dir in examples/*/
do
dir=${dir%*/}
(
cd "${dir%*/}"
$CMD
)
done
(
cd verify/verify
$CMD
)
(
cd micro_benchmarks
$CMD
)

37
third_party/rust/packed_simd/ci/android-install-ndk.sh поставляемый Normal file
Просмотреть файл

@ -0,0 +1,37 @@
#!/usr/bin/env sh
# Copyright 2016 The Rust Project Developers. See the COPYRIGHT
# file at the top-level directory of this distribution and at
# http://rust-lang.org/COPYRIGHT.
#
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
# option. This file may not be copied, modified, or distributed
# except according to those terms.
set -ex
curl --retry 5 -O https://dl.google.com/android/repository/android-ndk-r15b-linux-x86_64.zip
unzip -q android-ndk-r15b-linux-x86_64.zip
case "$1" in
aarch64)
arch=arm64
;;
i686)
arch=x86
;;
*)
arch=$1
;;
esac;
android-ndk-r15b/build/tools/make_standalone_toolchain.py \
--unified-headers \
--install-dir "/android/ndk-${1}" \
--arch "${arch}" \
--api 24
rm -rf ./android-ndk-r15b-linux-x86_64.zip ./android-ndk-r15b

60
third_party/rust/packed_simd/ci/android-install-sdk.sh поставляемый Normal file
Просмотреть файл

@ -0,0 +1,60 @@
#!/usr/bin/env sh
# Copyright 2016 The Rust Project Developers. See the COPYRIGHT
# file at the top-level directory of this distribution and at
# http://rust-lang.org/COPYRIGHT.
#
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
# option. This file may not be copied, modified, or distributed
# except according to those terms.
set -ex
# Prep the SDK and emulator
#
# Note that the update process requires that we accept a bunch of licenses, and
# we can't just pipe `yes` into it for some reason, so we take the same strategy
# located in https://github.com/appunite/docker by just wrapping it in a script
# which apparently magically accepts the licenses.
mkdir sdk
curl --retry 5 https://dl.google.com/android/repository/sdk-tools-linux-3859397.zip -O
unzip -d sdk sdk-tools-linux-3859397.zip
case "$1" in
arm | armv7)
abi=armeabi-v7a
;;
aarch64)
abi=arm64-v8a
;;
i686)
abi=x86
;;
x86_64)
abi=x86_64
;;
*)
echo "invalid arch: $1"
exit 1
;;
esac;
# --no_https avoids
# javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: No trusted certificate found
yes | ./sdk/tools/bin/sdkmanager --licenses --no_https
yes | ./sdk/tools/bin/sdkmanager --no_https \
"emulator" \
"platform-tools" \
"platforms;android-24" \
"system-images;android-24;default;$abi"
echo "no" |
./sdk/tools/bin/avdmanager create avd \
--name "${1}" \
--package "system-images;android-24;default;$abi"

56
third_party/rust/packed_simd/ci/android-sysimage.sh поставляемый Normal file
Просмотреть файл

@ -0,0 +1,56 @@
#!/usr/bin/env bash
# Copyright 2017 The Rust Project Developers. See the COPYRIGHT
# file at the top-level directory of this distribution and at
# http://rust-lang.org/COPYRIGHT.
#
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
# option. This file may not be copied, modified, or distributed
# except according to those terms.
set -ex
URL=https://dl.google.com/android/repository/sys-img/android
main() {
local arch="${1}"
local name="${2}"
local dest=/system
local td
td="$(mktemp -d)"
apt-get install --no-install-recommends e2tools
pushd "${td}"
curl --retry 5 -O "${URL}/${name}"
unzip -q "${name}"
local system
system="$(find . -name system.img)"
mkdir -p ${dest}/{bin,lib,lib64}
# Extract android linker and libraries to /system
# This allows android executables to be run directly (or with qemu)
if [ "${arch}" = "x86_64" ] || [ "${arch}" = "arm64" ]; then
e2cp -p "${system}:/bin/linker64" "${dest}/bin/"
e2cp -p "${system}:/lib64/libdl.so" "${dest}/lib64/"
e2cp -p "${system}:/lib64/libc.so" "${dest}/lib64/"
e2cp -p "${system}:/lib64/libm.so" "${dest}/lib64/"
else
e2cp -p "${system}:/bin/linker" "${dest}/bin/"
e2cp -p "${system}:/lib/libdl.so" "${dest}/lib/"
e2cp -p "${system}:/lib/libc.so" "${dest}/lib/"
e2cp -p "${system}:/lib/libm.so" "${dest}/lib/"
fi
# clean up
apt-get purge --auto-remove -y e2tools
popd
rm -rf "${td}"
}
main "${@}"

32
third_party/rust/packed_simd/ci/benchmark.sh поставляемый Normal file
Просмотреть файл

@ -0,0 +1,32 @@
#!/usr/bin/env bash
#
# Runs all benchmarks. Controlled by the following environment variables:
#
# FEATURES={} - cargo features to pass to all benchmarks (e.g. core_arch,sleef-sys,ispc)
# NORUN={1} - only builds the benchmarks
set -ex
if [[ ${NORUN} != 1 ]]; then
# Most benchmarks require hyperfine; require it upfront.
hash hyperfine 2>/dev/null || { echo >&2 "hyperfine is not in PATH."; exit 1; }
fi
# If the ispc benchmark feature is enabled, ispc must be in the path of the
# benchmarks.
if echo "$FEATURES" | grep -q "ispc"; then
hash ispc 2>/dev/null || { echo >&2 "ispc is not in PATH."; exit 1; }
fi
# An example with a benchmark.sh is a benchmark:
for dir in examples/*/
do
dir=${dir%*/}
cd ${dir%*/}
if [ -f "benchmark.sh" ]; then
./benchmark.sh
fi
cd -
done

Просмотреть файл

@ -0,0 +1,176 @@
// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// This is a script to deploy and execute a binary on an iOS simulator.
// The primary use of this is to be able to run unit tests on the simulator and
// retrieve the results.
//
// To do this through Cargo instead, use Dinghy
// (https://github.com/snipsco/dinghy): cargo dinghy install, then cargo dinghy
// test.
use std::env;
use std::fs::{self, File};
use std::io::Write;
use std::path::Path;
use std::process;
use std::process::Command;
macro_rules! t {
($e:expr) => (match $e {
Ok(e) => e,
Err(e) => panic!("{} failed with: {}", stringify!($e), e),
})
}
// Step one: Wrap as an app
fn package_as_simulator_app(crate_name: &str, test_binary_path: &Path) {
println!("Packaging simulator app");
drop(fs::remove_dir_all("ios_simulator_app"));
t!(fs::create_dir("ios_simulator_app"));
t!(fs::copy(test_binary_path,
Path::new("ios_simulator_app").join(crate_name)));
let mut f = t!(File::create("ios_simulator_app/Info.plist"));
t!(f.write_all(format!(r#"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC
"-//Apple//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleExecutable</key>
<string>{}</string>
<key>CFBundleIdentifier</key>
<string>com.rust.unittests</string>
</dict>
</plist>
"#, crate_name).as_bytes()));
}
// Step two: Start the iOS simulator
fn start_simulator() {
println!("Looking for iOS simulator");
let output = t!(Command::new("xcrun").arg("simctl").arg("list").output());
assert!(output.status.success());
let mut simulator_exists = false;
let mut simulator_booted = false;
let mut found_rust_sim = false;
let stdout = t!(String::from_utf8(output.stdout));
for line in stdout.lines() {
if line.contains("rust_ios") {
if found_rust_sim {
panic!("Duplicate rust_ios simulators found. Please \
double-check xcrun simctl list.");
}
simulator_exists = true;
simulator_booted = line.contains("(Booted)");
found_rust_sim = true;
}
}
if simulator_exists == false {
println!("Creating iOS simulator");
Command::new("xcrun")
.arg("simctl")
.arg("create")
.arg("rust_ios")
.arg("com.apple.CoreSimulator.SimDeviceType.iPhone-SE")
.arg("com.apple.CoreSimulator.SimRuntime.iOS-10-2")
.check_status();
} else if simulator_booted == true {
println!("Shutting down already-booted simulator");
Command::new("xcrun")
.arg("simctl")
.arg("shutdown")
.arg("rust_ios")
.check_status();
}
println!("Starting iOS simulator");
// We can't uninstall the app (if present) as that will hang if the
// simulator isn't completely booted; just erase the simulator instead.
Command::new("xcrun").arg("simctl").arg("erase").arg("rust_ios").check_status();
Command::new("xcrun").arg("simctl").arg("boot").arg("rust_ios").check_status();
}
// Step three: Install the app
fn install_app_to_simulator() {
println!("Installing app to simulator");
Command::new("xcrun")
.arg("simctl")
.arg("install")
.arg("booted")
.arg("ios_simulator_app/")
.check_status();
}
// Step four: Run the app
fn run_app_on_simulator() {
println!("Running app");
let output = t!(Command::new("xcrun")
.arg("simctl")
.arg("launch")
.arg("--console")
.arg("booted")
.arg("com.rust.unittests")
.output());
println!("stdout --\n{}\n", String::from_utf8_lossy(&output.stdout));
println!("stderr --\n{}\n", String::from_utf8_lossy(&output.stderr));
let stdout = String::from_utf8_lossy(&output.stdout);
let failed = stdout.lines()
.find(|l| l.contains("FAILED"))
.map(|l| l.contains("FAILED"))
.unwrap_or(false);
let passed = stdout.lines()
.find(|l| l.contains("test result: ok"))
.map(|l| l.contains("test result: ok"))
.unwrap_or(false);
println!("Shutting down simulator");
Command::new("xcrun")
.arg("simctl")
.arg("shutdown")
.arg("rust_ios")
.check_status();
if !(passed && !failed) {
panic!("tests didn't pass");
}
}
trait CheckStatus {
fn check_status(&mut self);
}
impl CheckStatus for Command {
fn check_status(&mut self) {
println!("\trunning: {:?}", self);
assert!(t!(self.status()).success());
}
}
fn main() {
let args: Vec<String> = env::args().collect();
if args.len() != 2 {
println!("Usage: {} <executable>", args[0]);
process::exit(-1);
}
let test_binary_path = Path::new(&args[1]);
let crate_name = test_binary_path.file_name().unwrap();
package_as_simulator_app(crate_name.to_str().unwrap(), test_binary_path);
start_simulator();
install_app_to_simulator();
run_app_on_simulator();
}

Просмотреть файл

@ -0,0 +1,47 @@
FROM ubuntu:16.04
RUN dpkg --add-architecture i386 && \
apt-get update && \
apt-get install -y --no-install-recommends \
file \
make \
curl \
ca-certificates \
python \
unzip \
expect \
openjdk-9-jre \
libstdc++6:i386 \
libpulse0 \
gcc \
libc6-dev
WORKDIR /android/
COPY android* /android/
ENV ANDROID_ARCH=aarch64
ENV PATH=$PATH:/android/ndk-$ANDROID_ARCH/bin:/android/sdk/tools:/android/sdk/platform-tools
RUN sh /android/android-install-ndk.sh $ANDROID_ARCH
RUN sh /android/android-install-sdk.sh $ANDROID_ARCH
RUN mv /root/.android /tmp
RUN chmod 777 -R /tmp/.android
RUN chmod 755 /android/sdk/tools/* /android/sdk/emulator/qemu/linux-x86_64/*
ENV PATH=$PATH:/rust/bin \
CARGO_TARGET_AARCH64_LINUX_ANDROID_LINKER=aarch64-linux-android-gcc \
CARGO_TARGET_AARCH64_LINUX_ANDROID_RUNNER=/tmp/runtest \
OBJDUMP=aarch64-linux-android-objdump \
HOME=/tmp
ADD runtest-android.rs /tmp/runtest.rs
ENTRYPOINT [ \
"bash", \
"-c", \
# set SHELL so android can detect a 64bits system, see
# http://stackoverflow.com/a/41789144
"SHELL=/bin/dash /android/sdk/emulator/emulator @aarch64 -no-window & \
rustc /tmp/runtest.rs -o /tmp/runtest && \
exec \"$@\"", \
"--" \
]

Просмотреть файл

@ -0,0 +1,14 @@
FROM ubuntu:17.10
RUN apt-get update && apt-get install -y --no-install-recommends \
gcc \
ca-certificates \
libc6-dev \
gcc-aarch64-linux-gnu \
libc6-dev-arm64-cross \
qemu-user \
make \
file
ENV CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc \
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_RUNNER="qemu-aarch64 -L /usr/aarch64-linux-gnu" \
OBJDUMP=aarch64-linux-gnu-objdump

Просмотреть файл

@ -0,0 +1,47 @@
FROM ubuntu:16.04
RUN dpkg --add-architecture i386 && \
apt-get update && \
apt-get install -y --no-install-recommends \
file \
make \
curl \
ca-certificates \
python \
unzip \
expect \
openjdk-9-jre \
libstdc++6:i386 \
libpulse0 \
gcc \
libc6-dev
WORKDIR /android/
COPY android* /android/
ENV ANDROID_ARCH=arm
ENV PATH=$PATH:/android/ndk-$ANDROID_ARCH/bin:/android/sdk/tools:/android/sdk/platform-tools
RUN sh /android/android-install-ndk.sh $ANDROID_ARCH
RUN sh /android/android-install-sdk.sh $ANDROID_ARCH
RUN mv /root/.android /tmp
RUN chmod 777 -R /tmp/.android
RUN chmod 755 /android/sdk/tools/* /android/sdk/emulator/qemu/linux-x86_64/*
ENV PATH=$PATH:/rust/bin \
CARGO_TARGET_ARM_LINUX_ANDROIDEABI_LINKER=arm-linux-androideabi-gcc \
CARGO_TARGET_ARM_LINUX_ANDROIDEABI_RUNNER=/tmp/runtest \
OBJDUMP=arm-linux-androideabi-objdump \
HOME=/tmp
ADD runtest-android.rs /tmp/runtest.rs
ENTRYPOINT [ \
"bash", \
"-c", \
# set SHELL so android can detect a 64bits system, see
# http://stackoverflow.com/a/41789144
"SHELL=/bin/dash /android/sdk/emulator/emulator @arm -no-window & \
rustc /tmp/runtest.rs -o /tmp/runtest && \
exec \"$@\"", \
"--" \
]

Просмотреть файл

@ -0,0 +1,15 @@
FROM ubuntu:17.10
RUN apt-get update && apt-get install -y --no-install-recommends \
gcc \
ca-certificates \
libc6-dev \
libc6-armel-cross \
libc6-dev-armel-cross \
binutils-arm-linux-gnueabi \
gcc-arm-linux-gnueabi \
qemu-user \
make \
file
ENV CARGO_TARGET_ARM_UNKNOWN_LINUX_GNUEABI_LINKER=arm-linux-gnueabi-gcc \
CARGO_TARGET_ARM_UNKNOWN_LINUX_GNUEABI_RUNNER="qemu-arm -L /usr/arm-linux-gnueabi" \
OBJDUMP=arm-linux-gnueabi-objdump

Просмотреть файл

@ -0,0 +1,13 @@
FROM ubuntu:17.10
RUN apt-get update && apt-get install -y --no-install-recommends \
gcc \
ca-certificates \
libc6-dev \
gcc-arm-linux-gnueabihf \
libc6-dev-armhf-cross \
qemu-user \
make \
file
ENV CARGO_TARGET_ARM_UNKNOWN_LINUX_GNUEABIHF_LINKER=arm-linux-gnueabihf-gcc \
CARGO_TARGET_ARM_UNKNOWN_LINUX_GNUEABIHF_RUNNER="qemu-arm -L /usr/arm-linux-gnueabihf" \
OBJDUMP=arm-linux-gnueabihf-objdump

Просмотреть файл

@ -0,0 +1,13 @@
FROM ubuntu:17.10
RUN apt-get update && apt-get install -y --no-install-recommends \
gcc \
ca-certificates \
libc6-dev \
gcc-arm-linux-gnueabihf \
libc6-dev-armhf-cross \
qemu-user \
make \
file
ENV CARGO_TARGET_ARMV7_UNKNOWN_LINUX_GNUEABIHF_LINKER=arm-linux-gnueabihf-gcc \
CARGO_TARGET_ARMV7_UNKNOWN_LINUX_GNUEABIHF_RUNNER="qemu-arm -L /usr/arm-linux-gnueabihf" \
OBJDUMP=arm-linux-gnueabihf-objdump

Просмотреть файл

@ -0,0 +1,7 @@
FROM ubuntu:17.10
RUN apt-get update && apt-get install -y --no-install-recommends \
gcc-multilib \
libc6-dev \
file \
make \
ca-certificates

Просмотреть файл

@ -0,0 +1,7 @@
FROM ubuntu:17.10
RUN apt-get update && apt-get install -y --no-install-recommends \
gcc-multilib \
libc6-dev \
file \
make \
ca-certificates

Просмотреть файл

@ -0,0 +1,13 @@
FROM ubuntu:17.10
RUN apt-get update && apt-get install -y --no-install-recommends \
gcc libc6-dev qemu-user ca-certificates \
gcc-mips-linux-gnu libc6-dev-mips-cross \
qemu-system-mips \
qemu-user \
make \
file
ENV CARGO_TARGET_MIPS_UNKNOWN_LINUX_GNU_LINKER=mips-linux-gnu-gcc \
CARGO_TARGET_MIPS_UNKNOWN_LINUX_GNU_RUNNER="qemu-mips -L /usr/mips-linux-gnu" \
OBJDUMP=mips-linux-gnu-objdump

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше