Merge autoland to mozilla-central. a=merge

This commit is contained in:
Daniel Varga 2020-01-21 02:16:46 +02:00
Родитель 84ee07b418 edaac73a6d
Коммит e5860143f4
1483 изменённых файлов: 20288 добавлений и 8984 удалений

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

@ -40,7 +40,7 @@ rev = "8069f8f4189982e0b38fa6dc8993dd4fab41f728"
[source."https://github.com/bytecodealliance/cranelift"]
git = "https://github.com/bytecodealliance/cranelift"
replace-with = "vendored-sources"
rev = "ec787eb281bb2e18e191508c17abe694e91f0677"
rev = "b01bee7c5269f72196b42e8bdd874425166bf429"
[source."https://github.com/badboy/failure"]
git = "https://github.com/badboy/failure"

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

@ -124,15 +124,14 @@ devtools/client/inspector/markup/test/events_bundle.js
devtools/client/netmonitor/test/xhr_bundle.js
devtools/client/webconsole/test/browser/code_bundle_nosource.js
devtools/client/webconsole/test/browser/code_bundle_invalidmap.js
devtools/server/tests/unit/babel_and_browserify_script_with_source_map.js
devtools/server/tests/unit/setBreakpoint*
devtools/server/tests/unit/sourcemapped.js
devtools/server/tests/xpcshell/setBreakpoint*
devtools/server/tests/xpcshell/sourcemapped.js
# Testing syntax error
devtools/client/webconsole/test/browser/test-syntaxerror-worklet.js
# devtools specific format test file
devtools/server/tests/unit/xpcshell_debugging_script.js
devtools/server/tests/xpcshell/xpcshell_debugging_script.js
# Third-party
dom/canvas/test/webgl-conf/

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

@ -178,8 +178,8 @@ name = "baldrdash"
version = "0.1.0"
dependencies = [
"bindgen 0.51.1 (registry+https://github.com/rust-lang/crates.io-index)",
"cranelift-codegen 0.51.0 (git+https://github.com/bytecodealliance/cranelift?rev=ec787eb281bb2e18e191508c17abe694e91f0677)",
"cranelift-wasm 0.51.0 (git+https://github.com/bytecodealliance/cranelift?rev=ec787eb281bb2e18e191508c17abe694e91f0677)",
"cranelift-codegen 0.55.0 (git+https://github.com/bytecodealliance/cranelift?rev=b01bee7c5269f72196b42e8bdd874425166bf429)",
"cranelift-wasm 0.55.0 (git+https://github.com/bytecodealliance/cranelift?rev=b01bee7c5269f72196b42e8bdd874425166bf429)",
"env_logger 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
"smallvec 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
@ -635,41 +635,41 @@ dependencies = [
[[package]]
name = "cranelift-bforest"
version = "0.51.0"
source = "git+https://github.com/bytecodealliance/cranelift?rev=ec787eb281bb2e18e191508c17abe694e91f0677#ec787eb281bb2e18e191508c17abe694e91f0677"
version = "0.55.0"
source = "git+https://github.com/bytecodealliance/cranelift?rev=b01bee7c5269f72196b42e8bdd874425166bf429#b01bee7c5269f72196b42e8bdd874425166bf429"
dependencies = [
"cranelift-entity 0.51.0 (git+https://github.com/bytecodealliance/cranelift?rev=ec787eb281bb2e18e191508c17abe694e91f0677)",
"cranelift-entity 0.55.0 (git+https://github.com/bytecodealliance/cranelift?rev=b01bee7c5269f72196b42e8bdd874425166bf429)",
]
[[package]]
name = "cranelift-codegen"
version = "0.51.0"
source = "git+https://github.com/bytecodealliance/cranelift?rev=ec787eb281bb2e18e191508c17abe694e91f0677#ec787eb281bb2e18e191508c17abe694e91f0677"
version = "0.55.0"
source = "git+https://github.com/bytecodealliance/cranelift?rev=b01bee7c5269f72196b42e8bdd874425166bf429#b01bee7c5269f72196b42e8bdd874425166bf429"
dependencies = [
"byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
"cranelift-bforest 0.51.0 (git+https://github.com/bytecodealliance/cranelift?rev=ec787eb281bb2e18e191508c17abe694e91f0677)",
"cranelift-codegen-meta 0.51.0 (git+https://github.com/bytecodealliance/cranelift?rev=ec787eb281bb2e18e191508c17abe694e91f0677)",
"cranelift-codegen-shared 0.51.0 (git+https://github.com/bytecodealliance/cranelift?rev=ec787eb281bb2e18e191508c17abe694e91f0677)",
"cranelift-entity 0.51.0 (git+https://github.com/bytecodealliance/cranelift?rev=ec787eb281bb2e18e191508c17abe694e91f0677)",
"cranelift-bforest 0.55.0 (git+https://github.com/bytecodealliance/cranelift?rev=b01bee7c5269f72196b42e8bdd874425166bf429)",
"cranelift-codegen-meta 0.55.0 (git+https://github.com/bytecodealliance/cranelift?rev=b01bee7c5269f72196b42e8bdd874425166bf429)",
"cranelift-codegen-shared 0.55.0 (git+https://github.com/bytecodealliance/cranelift?rev=b01bee7c5269f72196b42e8bdd874425166bf429)",
"cranelift-entity 0.55.0 (git+https://github.com/bytecodealliance/cranelift?rev=b01bee7c5269f72196b42e8bdd874425166bf429)",
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
"smallvec 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"target-lexicon 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
"target-lexicon 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
"thiserror 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "cranelift-codegen-meta"
version = "0.51.0"
source = "git+https://github.com/bytecodealliance/cranelift?rev=ec787eb281bb2e18e191508c17abe694e91f0677#ec787eb281bb2e18e191508c17abe694e91f0677"
version = "0.55.0"
source = "git+https://github.com/bytecodealliance/cranelift?rev=b01bee7c5269f72196b42e8bdd874425166bf429#b01bee7c5269f72196b42e8bdd874425166bf429"
dependencies = [
"cranelift-codegen-shared 0.51.0 (git+https://github.com/bytecodealliance/cranelift?rev=ec787eb281bb2e18e191508c17abe694e91f0677)",
"cranelift-entity 0.51.0 (git+https://github.com/bytecodealliance/cranelift?rev=ec787eb281bb2e18e191508c17abe694e91f0677)",
"cranelift-codegen-shared 0.55.0 (git+https://github.com/bytecodealliance/cranelift?rev=b01bee7c5269f72196b42e8bdd874425166bf429)",
"cranelift-entity 0.55.0 (git+https://github.com/bytecodealliance/cranelift?rev=b01bee7c5269f72196b42e8bdd874425166bf429)",
]
[[package]]
name = "cranelift-codegen-shared"
version = "0.51.0"
source = "git+https://github.com/bytecodealliance/cranelift?rev=ec787eb281bb2e18e191508c17abe694e91f0677#ec787eb281bb2e18e191508c17abe694e91f0677"
version = "0.55.0"
source = "git+https://github.com/bytecodealliance/cranelift?rev=b01bee7c5269f72196b42e8bdd874425166bf429#b01bee7c5269f72196b42e8bdd874425166bf429"
[[package]]
name = "cranelift-entity"
@ -678,31 +678,31 @@ source = "git+https://github.com/PLSysSec/lucet_sandbox_compiler?rev=58498599272
[[package]]
name = "cranelift-entity"
version = "0.51.0"
source = "git+https://github.com/bytecodealliance/cranelift?rev=ec787eb281bb2e18e191508c17abe694e91f0677#ec787eb281bb2e18e191508c17abe694e91f0677"
version = "0.55.0"
source = "git+https://github.com/bytecodealliance/cranelift?rev=b01bee7c5269f72196b42e8bdd874425166bf429#b01bee7c5269f72196b42e8bdd874425166bf429"
[[package]]
name = "cranelift-frontend"
version = "0.51.0"
source = "git+https://github.com/bytecodealliance/cranelift?rev=ec787eb281bb2e18e191508c17abe694e91f0677#ec787eb281bb2e18e191508c17abe694e91f0677"
version = "0.55.0"
source = "git+https://github.com/bytecodealliance/cranelift?rev=b01bee7c5269f72196b42e8bdd874425166bf429#b01bee7c5269f72196b42e8bdd874425166bf429"
dependencies = [
"cranelift-codegen 0.51.0 (git+https://github.com/bytecodealliance/cranelift?rev=ec787eb281bb2e18e191508c17abe694e91f0677)",
"cranelift-codegen 0.55.0 (git+https://github.com/bytecodealliance/cranelift?rev=b01bee7c5269f72196b42e8bdd874425166bf429)",
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
"smallvec 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"target-lexicon 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
"target-lexicon 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "cranelift-wasm"
version = "0.51.0"
source = "git+https://github.com/bytecodealliance/cranelift?rev=ec787eb281bb2e18e191508c17abe694e91f0677#ec787eb281bb2e18e191508c17abe694e91f0677"
version = "0.55.0"
source = "git+https://github.com/bytecodealliance/cranelift?rev=b01bee7c5269f72196b42e8bdd874425166bf429#b01bee7c5269f72196b42e8bdd874425166bf429"
dependencies = [
"cranelift-codegen 0.51.0 (git+https://github.com/bytecodealliance/cranelift?rev=ec787eb281bb2e18e191508c17abe694e91f0677)",
"cranelift-entity 0.51.0 (git+https://github.com/bytecodealliance/cranelift?rev=ec787eb281bb2e18e191508c17abe694e91f0677)",
"cranelift-frontend 0.51.0 (git+https://github.com/bytecodealliance/cranelift?rev=ec787eb281bb2e18e191508c17abe694e91f0677)",
"cranelift-codegen 0.55.0 (git+https://github.com/bytecodealliance/cranelift?rev=b01bee7c5269f72196b42e8bdd874425166bf429)",
"cranelift-entity 0.55.0 (git+https://github.com/bytecodealliance/cranelift?rev=b01bee7c5269f72196b42e8bdd874425166bf429)",
"cranelift-frontend 0.55.0 (git+https://github.com/bytecodealliance/cranelift?rev=b01bee7c5269f72196b42e8bdd874425166bf429)",
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
"thiserror 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)",
"wasmparser 0.39.2 (registry+https://github.com/rust-lang/crates.io-index)",
"wasmparser 0.47.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@ -3800,6 +3800,11 @@ name = "target-lexicon"
version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "target-lexicon"
version = "0.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "tempfile"
version = "3.1.0"
@ -4291,7 +4296,7 @@ dependencies = [
[[package]]
name = "wasmparser"
version = "0.39.2"
version = "0.47.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
@ -4695,14 +4700,14 @@ dependencies = [
"checksum coreaudio-sys-utils 0.1.0 (git+https://github.com/ChunMinChang/cubeb-coreaudio-rs?rev=acb90e9bf36e6e035ac6bbe51efa0a8825b5b6be)" = "<none>"
"checksum cose 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "72fa26cb151d3ae4b70f63d67d0fed57ce04220feafafbae7f503bef7aae590d"
"checksum cose-c 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "49726015ab0ca765144fcca61e4a7a543a16b795a777fa53f554da2fffff9a94"
"checksum cranelift-bforest 0.51.0 (git+https://github.com/bytecodealliance/cranelift?rev=ec787eb281bb2e18e191508c17abe694e91f0677)" = "<none>"
"checksum cranelift-codegen 0.51.0 (git+https://github.com/bytecodealliance/cranelift?rev=ec787eb281bb2e18e191508c17abe694e91f0677)" = "<none>"
"checksum cranelift-codegen-meta 0.51.0 (git+https://github.com/bytecodealliance/cranelift?rev=ec787eb281bb2e18e191508c17abe694e91f0677)" = "<none>"
"checksum cranelift-codegen-shared 0.51.0 (git+https://github.com/bytecodealliance/cranelift?rev=ec787eb281bb2e18e191508c17abe694e91f0677)" = "<none>"
"checksum cranelift-bforest 0.55.0 (git+https://github.com/bytecodealliance/cranelift?rev=b01bee7c5269f72196b42e8bdd874425166bf429)" = "<none>"
"checksum cranelift-codegen 0.55.0 (git+https://github.com/bytecodealliance/cranelift?rev=b01bee7c5269f72196b42e8bdd874425166bf429)" = "<none>"
"checksum cranelift-codegen-meta 0.55.0 (git+https://github.com/bytecodealliance/cranelift?rev=b01bee7c5269f72196b42e8bdd874425166bf429)" = "<none>"
"checksum cranelift-codegen-shared 0.55.0 (git+https://github.com/bytecodealliance/cranelift?rev=b01bee7c5269f72196b42e8bdd874425166bf429)" = "<none>"
"checksum cranelift-entity 0.41.0 (git+https://github.com/PLSysSec/lucet_sandbox_compiler?rev=58498599272e23ef797bb4304d0f181d7455ca57)" = "<none>"
"checksum cranelift-entity 0.51.0 (git+https://github.com/bytecodealliance/cranelift?rev=ec787eb281bb2e18e191508c17abe694e91f0677)" = "<none>"
"checksum cranelift-frontend 0.51.0 (git+https://github.com/bytecodealliance/cranelift?rev=ec787eb281bb2e18e191508c17abe694e91f0677)" = "<none>"
"checksum cranelift-wasm 0.51.0 (git+https://github.com/bytecodealliance/cranelift?rev=ec787eb281bb2e18e191508c17abe694e91f0677)" = "<none>"
"checksum cranelift-entity 0.55.0 (git+https://github.com/bytecodealliance/cranelift?rev=b01bee7c5269f72196b42e8bdd874425166bf429)" = "<none>"
"checksum cranelift-frontend 0.55.0 (git+https://github.com/bytecodealliance/cranelift?rev=b01bee7c5269f72196b42e8bdd874425166bf429)" = "<none>"
"checksum cranelift-wasm 0.55.0 (git+https://github.com/bytecodealliance/cranelift?rev=b01bee7c5269f72196b42e8bdd874425166bf429)" = "<none>"
"checksum crc32fast 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ba125de2af0df55319f41944744ad91c71113bf74a4646efff39afe1f6842db1"
"checksum crossbeam-deque 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c3aa945d63861bfe624b55d153a39684da1e8c0bc8fba932f7ee3a3c16cea3ca"
"checksum crossbeam-epoch 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5064ebdbf05ce3cb95e45c8b086f72263f4166b29b97f6baff7ef7fe047b55ac"
@ -4966,6 +4971,7 @@ dependencies = [
"checksum svg_fmt 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c666f0fed8e1e20e057af770af9077d72f3d5a33157b8537c1475dd8ffd6d32b"
"checksum syn 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "66850e97125af79138385e9b88339cbcd037e3f28ceab8c5ad98e64f0f1f80bf"
"checksum synstructure 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3f085a5855930c0441ca1288cf044ea4aecf4f43a91668abdb870b4ba546a203"
"checksum target-lexicon 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ab0e7238dcc7b40a7be719a25365910f6807bd864f4cce6b2e6b873658e2b19d"
"checksum target-lexicon 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6f4c118a7a38378f305a9e111fcb2f7f838c0be324bfb31a77ea04f7f6e684b4"
"checksum tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6e24d9338a0a5be79593e2fa15a648add6138caa803e2d5bc782c371732ca9"
"checksum term_size 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e2b6b55df3198cc93372e85dd2ed817f0e38ce8cc0f22eb32391bfad9c4bf209"
@ -5018,7 +5024,7 @@ dependencies = [
"checksum walkdir 2.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "63636bd0eb3d00ccb8b9036381b526efac53caf112b7783b730ab3f8e44da369"
"checksum want 0.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "797464475f30ddb8830cc529aaaae648d581f99e2036a928877dfde027ddf6b3"
"checksum warp 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)" = "33857527c63bc514452f885d0a57019f28139c58fef2b3566016ecc0d44e5d24"
"checksum wasmparser 0.39.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e5083b449454f7de0b15f131eee17de54b5a71dcb9adcf11df2b2f78fad0cd82"
"checksum wasmparser 0.47.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1add8db5a53a2f64f13418b241982c4ab533d7a9e1e8a5dcadccce633d8d393b"
"checksum webrtc-sdp 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "75fb1417c7262d8bdc0f0a2b0e32607675c9315dcbb6fccfdf75ece04e01326a"
"checksum weedle 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "26a4c67f132386d965390b8a734d5d10adbcd30eb5cc74bd9229af8b83f10044"
"checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a"

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

@ -71,8 +71,8 @@ failure_derive = { git = "https://github.com/badboy/failure", rev = "64af847bc5f
[patch.crates-io.cranelift-codegen]
git = "https://github.com/bytecodealliance/cranelift"
rev = "ec787eb281bb2e18e191508c17abe694e91f0677"
rev = "b01bee7c5269f72196b42e8bdd874425166bf429"
[patch.crates-io.cranelift-wasm]
git = "https://github.com/bytecodealliance/cranelift"
rev = "ec787eb281bb2e18e191508c17abe694e91f0677"
rev = "b01bee7c5269f72196b42e8bdd874425166bf429"

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

@ -7,7 +7,8 @@
#ifndef mozilla_a11y_TextRange_h__
#define mozilla_a11y_TextRange_h__
#include "mozilla/Move.h"
#include <utility>
#include "nsCaseTreatment.h"
#include "nsRect.h"
#include "nsTArray.h"

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

@ -6,16 +6,17 @@
#include "mozilla/a11y/COMPtrTypes.h"
#include <utility>
#include "MainThreadUtils.h"
#include "mozilla/a11y/Accessible.h"
#include "mozilla/a11y/Platform.h"
#include "mozilla/a11y/HandlerProvider.h"
#include "mozilla/Assertions.h"
#include "mozilla/Move.h"
#include "mozilla/mscom/MainThreadHandoff.h"
#include "mozilla/mscom/Utils.h"
#include "mozilla/Preferences.h"
#include "mozilla/RefPtr.h"
#include "mozilla/a11y/Accessible.h"
#include "mozilla/a11y/HandlerProvider.h"
#include "mozilla/a11y/Platform.h"
#include "mozilla/mscom/MainThreadHandoff.h"
#include "mozilla/mscom/Utils.h"
#include "nsXULAppAPI.h"
using mozilla::mscom::MainThreadHandoff;

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

@ -6,6 +6,10 @@
#include "mozilla/a11y/HandlerProvider.h"
#include <memory.h>
#include <utility>
#include "Accessible2_3.h"
#include "AccessibleDocument.h"
#include "AccessibleRelation.h"
@ -15,10 +19,10 @@
#include "HandlerData.h"
#include "HandlerData_i.c"
#include "mozilla/Assertions.h"
#include "mozilla/UniquePtr.h"
#include "mozilla/a11y/AccessibleWrap.h"
#include "mozilla/a11y/HandlerDataCleanup.h"
#include "mozilla/dom/ContentChild.h"
#include "mozilla/Move.h"
#include "mozilla/mscom/AgileReference.h"
#include "mozilla/mscom/FastMarshaler.h"
#include "mozilla/mscom/Interceptor.h"
@ -27,11 +31,8 @@
#include "mozilla/mscom/Ptr.h"
#include "mozilla/mscom/StructStream.h"
#include "mozilla/mscom/Utils.h"
#include "mozilla/UniquePtr.h"
#include "nsThreadUtils.h"
#include "nsTArray.h"
#include <memory.h>
#include "nsThreadUtils.h"
namespace mozilla {
namespace a11y {

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

@ -10,11 +10,10 @@
#include "AccessibleHandlerControl.h"
#include "AccessibleHandler.h"
#include <utility>
#include "AccessibleEventId.h"
#include "mozilla/Move.h"
#include "AccessibleHandler.h"
#include "mozilla/RefPtr.h"
namespace mozilla {

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

@ -7,11 +7,11 @@
#ifndef mozilla_a11y_xpcAccessibleTextRange_h_
#define mozilla_a11y_xpcAccessibleTextRange_h_
#include "nsIAccessibleTextRange.h"
#include "TextRange.h"
#include <utility>
#include "mozilla/Move.h"
#include "TextRange.h"
#include "nsCycleCollectionParticipant.h"
#include "nsIAccessibleTextRange.h"
namespace mozilla {
namespace a11y {

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

@ -12,6 +12,10 @@ class BrowserTabParent extends JSWindowActorParent {
return; // Can happen sometimes if browser is being destroyed
}
if (browser.outerBrowser) {
browser = browser.outerBrowser; // handle RDM mode
}
let gBrowser = browser.ownerGlobal.gBrowser;
if (!gBrowser) {
@ -43,6 +47,11 @@ class BrowserTabParent extends JSWindowActorParent {
break;
}
case "Browser:LoadURI": {
gBrowser.ownerGlobal.RedirectLoad(browser, message.data);
break;
}
case "PointerLock:Entered": {
browser.ownerGlobal.PointerLock.entered(message.data.originNoSuffix);
break;

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

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?>
<blocklist xmlns="http://www.mozilla.org/2006/addons-blocklist" lastupdate="1579039687654">
<blocklist xmlns="http://www.mozilla.org/2006/addons-blocklist" lastupdate="1579250265716">
<emItems>
<emItem blockID="i334" id="{0F827075-B026-42F3-885D-98981EE7B1AE}">
<prefs/>
@ -3504,6 +3504,22 @@
<prefs/>
<versionRange minVersion="0" maxVersion="*" severity="3"/>
</emItem>
<emItem blockID="21b59bc5-57db-4f31-9e18-614c03858e5c" id="{f6766565-1c5d-4eff-bda7-20f00aaedd11}">
<prefs/>
<versionRange minVersion="0" maxVersion="*" severity="3"/>
</emItem>
<emItem blockID="7e5aad13-e8ee-43bc-91fc-4805c8195f3e" id="/^((\{61e9b862-ef9b-4cc1-9dc2-ec00e437118c\})|(\{29828604-0f21-4ce2-8df7-b840aa53d713\})|(\{9430316a-f94c-40b6-9cea-8ac0df5c6638\})|(\{87ad96b4-86e8-4d94-aee1-7b607d02effb\})|(\{26f61847-2e07-4b10-a030-267eea1bf3b7\})|(\{450eb888-9bba-4de7-8821-4bb806ff82bc\}))$/">
<prefs/>
<versionRange minVersion="0" maxVersion="*" severity="3"/>
</emItem>
<emItem blockID="ebca1ceb-555d-4ce0-8c06-5b1475f08d45" id="/^((_65Members_1202@download\.fromdoctopdf\.com)|(_65Members_1202test@download\.fromdoctopdf\.com))$/">
<prefs/>
<versionRange minVersion="0" maxVersion="*" severity="3"/>
</emItem>
<emItem blockID="d845bc55-9b05-4dc7-ba4a-57462a51be39" id="/^((\{5335fd1c-3baf-4578-b339-516dbdcec832\})|(\{1bf381aa-a819-4067-a537-eadb0d6538ba\})|(\{0e3703a0-46ae-4d18-bd04-8f8f570fdb77\})|(\{b350dc7e-cfcc-4ffe-9225-9feefe922bdb\})|(\{eeb3bf29-f1db-4f75-a6cb-8675ace58390\})|(\{9a216bb4-d664-4535-baef-ee1f4db012d2\}))$/">
<prefs/>
<versionRange minVersion="0" maxVersion="*" severity="3"/>
</emItem>
</emItems>
<pluginItems>
<pluginItem blockID="p332">

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

@ -6,18 +6,19 @@
#include "ErrorHandler.h"
#include <utility>
#include "mozilla/ArrayUtils.h"
#include "mozilla/CmdLineAndEnvUtils.h"
#include "mozilla/DebugOnly.h"
#include "mozilla/glue/WindowsDllServices.h"
#include "mozilla/JSONWriter.h"
#include "mozilla/Move.h"
#include "mozilla/mscom/ProcessRuntime.h"
#include "mozilla/UniquePtr.h"
#include "mozilla/Unused.h"
#include "mozilla/WindowsVersion.h"
#include "mozilla/WinTokenUtils.h"
#include "mozilla/WindowsVersion.h"
#include "mozilla/XREAppData.h"
#include "mozilla/glue/WindowsDllServices.h"
#include "mozilla/mscom/ProcessRuntime.h"
#include "nsWindowsHelpers.h"
#if defined(MOZ_LAUNCHER_PROCESS)

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

@ -7,14 +7,15 @@
#ifndef mozilla_ProcThreadAttributes_h
#define mozilla_ProcThreadAttributes_h
#include <windows.h>
#include <utility>
#include "mozilla/Attributes.h"
#include "mozilla/Maybe.h"
#include "mozilla/Move.h"
#include "mozilla/UniquePtr.h"
#include "mozilla/Vector.h"
#include <windows.h>
namespace mozilla {
class MOZ_RAII ProcThreadAttributes final {

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

@ -4,21 +4,21 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
#include "SameBinary.h"
#include <stdio.h>
#include <stdlib.h>
#include <utility>
#include "SameBinary.h"
#include "mozilla/ArrayUtils.h"
#include "mozilla/Assertions.h"
#include "mozilla/CmdLineAndEnvUtils.h"
#include "mozilla/Move.h"
#include "mozilla/NativeNt.h"
#include "mozilla/Unused.h"
#include "mozilla/Vector.h"
#include "mozilla/WinHeaderOnlyUtils.h"
#include "nsWindowsHelpers.h"
#include <stdio.h>
#include <stdlib.h>
#define EXPECT_SAMEBINARY_IS(expected, option, message) \
do { \
mozilla::LauncherResult<bool> isSame = \

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

@ -235,7 +235,7 @@
<menuseparator hidden="true" id="documentDirection-separator"/>
<menuitem id="documentDirection-swap"
hidden="true"
oncommand="gBrowser.selectedBrowser.sendMessageToActor('SwitchDocumentDirection', {}, 'SwitchDocumentDirection', true);" data-l10n-id="menu-view-bidi-switch-page-direction"/>
oncommand="gBrowser.selectedBrowser.sendMessageToActor('SwitchDocumentDirection', {}, 'SwitchDocumentDirection', 'roots');" data-l10n-id="menu-view-bidi-switch-page-direction"/>
</menupopup>
</menu>

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

@ -1592,7 +1592,7 @@ function LoadInOtherProcess(browser, loadOptions, historyIndex = -1) {
// Called when a docshell has attempted to load a page in an incorrect process.
// This function is responsible for loading the page in the correct process.
function RedirectLoad({ target: browser, data }) {
function RedirectLoad(browser, data) {
if (browser.getAttribute("preloadedState") === "consumed") {
browser.removeAttribute("preloadedState");
data.loadOptions.newFrameloader = true;
@ -1805,8 +1805,6 @@ var gBrowserInit = {
let mm = window.getGroupMessageManager("browsers");
mm.loadFrameScript("chrome://browser/content/tab-content.js", true, true);
window.messageManager.addMessageListener("Browser:LoadURI", RedirectLoad);
if (!gMultiProcessBrowser) {
// There is a Content:Click message manually sent from content.
Services.els.addSystemEventListener(
@ -2489,10 +2487,6 @@ var gBrowserInit = {
gKeywordURIFixup
);
Services.obs.removeObserver(gKeywordURIFixupObs, "keyword-uri-fixup");
window.messageManager.removeMessageListener(
"Browser:LoadURI",
RedirectLoad
);
if (AppConstants.isPlatformAndVersionAtLeast("win", "10")) {
MenuTouchModeObserver.uninit();

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

@ -1855,7 +1855,7 @@ class nsContextMenu {
"SwitchDocumentDirection",
{},
"SwitchDocumentDirection",
true
"roots"
);
}

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

@ -1717,41 +1717,6 @@ BrowserGlue.prototype = {
Services.telemetry.scalarSet("contentblocking.category", categoryPref);
},
_recordContentBlockerTelemetry() {
[
"other",
"script",
"image",
"stylesheet",
"object",
"document",
"subdocument",
"refresh",
"xbl",
"ping",
"xmlhttprequest",
"objectsubrequest",
"dtd",
"font",
"media",
"websocket",
"csp_report",
"xslt",
"beacon",
"fetch",
"image",
"manifest",
"saveas_download",
"speculative",
].forEach(type => {
Services.telemetry.keyedScalarSet(
"security.contentblocker_permissions",
type,
Services.perms.getAllWithTypePrefix(type).length
);
});
},
_recordDataSanitizationPrefs() {
Services.telemetry.scalarSet(
"datasanitization.network_cookie_lifetimePolicy",
@ -2032,10 +1997,6 @@ BrowserGlue.prototype = {
this._recordContentBlockingTelemetry();
});
Services.tm.idleDispatchToMainThread(() => {
this._recordContentBlockerTelemetry();
});
Services.tm.idleDispatchToMainThread(() => {
this._recordDataSanitizationPrefs();
});

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

@ -30,12 +30,12 @@ const tests = [
/*
* Engagement tests.
*/
async function() {
async function(win) {
info("Type something, press Enter.");
gURLBar.select();
let promise = BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser);
await promiseAutocompleteResultPopup("x", window, true);
EventUtils.synthesizeKey("VK_RETURN");
win.gURLBar.select();
let promise = BrowserTestUtils.browserLoaded(win.gBrowser.selectedBrowser);
await promiseAutocompleteResultPopup("x", win, true);
EventUtils.synthesizeKey("VK_RETURN", {}, win);
await promise;
return {
category: "urlbar",
@ -51,17 +51,17 @@ const tests = [
};
},
async function() {
async function(win) {
info("Paste something, press Enter.");
gURLBar.select();
let promise = BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser);
win.gURLBar.select();
let promise = BrowserTestUtils.browserLoaded(win.gBrowser.selectedBrowser);
await SimpleTest.promiseClipboardChange("test", () => {
clipboardHelper.copyString("test");
});
document.commandDispatcher
win.document.commandDispatcher
.getControllerForCommand("cmd_paste")
.doCommand("cmd_paste");
EventUtils.synthesizeKey("VK_RETURN");
EventUtils.synthesizeKey("VK_RETURN", {}, win);
await promise;
return {
category: "urlbar",
@ -77,13 +77,13 @@ const tests = [
};
},
async function() {
async function(win) {
info("Type something, click one-off.");
gURLBar.select();
let promise = BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser);
await promiseAutocompleteResultPopup("moz", window, true);
EventUtils.synthesizeKey("KEY_ArrowDown", { altKey: true });
UrlbarTestUtils.getOneOffSearchButtons(window).selectedButton.click();
win.gURLBar.select();
let promise = BrowserTestUtils.browserLoaded(win.gBrowser.selectedBrowser);
await promiseAutocompleteResultPopup("moz", win, true);
EventUtils.synthesizeKey("KEY_ArrowDown", { altKey: true }, win);
UrlbarTestUtils.getOneOffSearchButtons(win).selectedButton.click();
await promise;
return {
category: "urlbar",
@ -99,14 +99,14 @@ const tests = [
};
},
async function() {
async function(win) {
info("Type something, select one-off, Enter.");
gURLBar.select();
let promise = BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser);
await promiseAutocompleteResultPopup("moz", window, true);
EventUtils.synthesizeKey("KEY_ArrowDown", { altKey: true });
Assert.ok(UrlbarTestUtils.getOneOffSearchButtons(window).selectedButton);
EventUtils.synthesizeKey("VK_RETURN");
win.gURLBar.select();
let promise = BrowserTestUtils.browserLoaded(win.gBrowser.selectedBrowser);
await promiseAutocompleteResultPopup("moz", win, true);
EventUtils.synthesizeKey("KEY_ArrowDown", { altKey: true }, win);
Assert.ok(UrlbarTestUtils.getOneOffSearchButtons(win).selectedButton);
EventUtils.synthesizeKey("VK_RETURN", {}, win);
await promise;
return {
category: "urlbar",
@ -122,14 +122,14 @@ const tests = [
};
},
async function() {
async function(win) {
info("Type something, ESC, type something else, press Enter.");
gURLBar.select();
let promise = BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser);
EventUtils.synthesizeKey("x");
EventUtils.synthesizeKey("VK_ESCAPE");
EventUtils.synthesizeKey("y");
EventUtils.synthesizeKey("VK_RETURN");
win.gURLBar.select();
let promise = BrowserTestUtils.browserLoaded(win.gBrowser.selectedBrowser);
EventUtils.synthesizeKey("x", {}, win);
EventUtils.synthesizeKey("VK_ESCAPE", {}, win);
EventUtils.synthesizeKey("y", {}, win);
EventUtils.synthesizeKey("VK_RETURN", {}, win);
await promise;
return {
category: "urlbar",
@ -145,12 +145,12 @@ const tests = [
};
},
async function() {
async function(win) {
info("Type a keyword, Enter.");
gURLBar.select();
let promise = BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser);
await promiseAutocompleteResultPopup("kw test", window, true);
EventUtils.synthesizeKey("VK_RETURN");
win.gURLBar.select();
let promise = BrowserTestUtils.browserLoaded(win.gBrowser.selectedBrowser);
await promiseAutocompleteResultPopup("kw test", win, true);
EventUtils.synthesizeKey("VK_RETURN", {}, win);
await promise;
return {
category: "urlbar",
@ -166,14 +166,14 @@ const tests = [
};
},
async function() {
async function(win) {
let tipProvider = registerTipProvider();
info("Selecting a tip's main button, enter.");
gURLBar.search("x");
await promiseSearchComplete();
EventUtils.synthesizeKey("KEY_ArrowDown");
EventUtils.synthesizeKey("KEY_ArrowDown");
EventUtils.synthesizeKey("VK_RETURN");
win.gURLBar.search("x");
await UrlbarTestUtils.promiseSearchComplete(win);
EventUtils.synthesizeKey("KEY_ArrowDown", {}, win);
EventUtils.synthesizeKey("KEY_ArrowDown", {}, win);
EventUtils.synthesizeKey("VK_RETURN", {}, win);
unregisterTipProvider(tipProvider);
return {
category: "urlbar",
@ -189,16 +189,16 @@ const tests = [
};
},
async function() {
async function(win) {
let tipProvider = registerTipProvider();
info("Selecting a tip's help button, enter.");
let promise = BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser);
gURLBar.search("x");
await promiseSearchComplete();
EventUtils.synthesizeKey("KEY_ArrowDown");
EventUtils.synthesizeKey("KEY_ArrowDown");
EventUtils.synthesizeKey("KEY_ArrowDown");
EventUtils.synthesizeKey("VK_RETURN");
let promise = BrowserTestUtils.browserLoaded(win.gBrowser.selectedBrowser);
win.gURLBar.search("x");
await UrlbarTestUtils.promiseSearchComplete(win);
EventUtils.synthesizeKey("KEY_ArrowDown", {}, win);
EventUtils.synthesizeKey("KEY_ArrowDown", {}, win);
EventUtils.synthesizeKey("KEY_ArrowDown", {}, win);
EventUtils.synthesizeKey("VK_RETURN", {}, win);
await promise;
unregisterTipProvider(tipProvider);
return {
@ -215,12 +215,12 @@ const tests = [
};
},
async function() {
async function(win) {
info("Type something and canonize");
gURLBar.select();
let promise = BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser);
await promiseAutocompleteResultPopup("example", window, true);
EventUtils.synthesizeKey("VK_RETURN", { ctrlKey: true });
win.gURLBar.select();
let promise = BrowserTestUtils.browserLoaded(win.gBrowser.selectedBrowser);
await promiseAutocompleteResultPopup("example", win, true);
EventUtils.synthesizeKey("VK_RETURN", { ctrlKey: true }, win);
await promise;
return {
category: "urlbar",
@ -236,21 +236,21 @@ const tests = [
};
},
async function() {
async function(win) {
info("Type something, click on bookmark entry.");
gURLBar.select();
win.gURLBar.select();
let url = "http://example.com/?q=%s";
let promise = BrowserTestUtils.browserLoaded(
gBrowser.selectedBrowser,
win.gBrowser.selectedBrowser,
false,
url
);
await promiseAutocompleteResultPopup("exa", window, true);
while (gURLBar.untrimmedValue != url) {
EventUtils.synthesizeKey("KEY_ArrowDown");
await promiseAutocompleteResultPopup("exa", win, true);
while (win.gURLBar.untrimmedValue != url) {
EventUtils.synthesizeKey("KEY_ArrowDown", {}, win);
}
let element = UrlbarTestUtils.getSelectedRow(window);
EventUtils.synthesizeMouseAtCenter(element, {});
let element = UrlbarTestUtils.getSelectedRow(win);
EventUtils.synthesizeMouseAtCenter(element, {}, win);
await promise;
return {
category: "urlbar",
@ -266,15 +266,15 @@ const tests = [
};
},
async function() {
async function(win) {
info("Type an autofilled string, Enter.");
gURLBar.select();
let promise = BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser);
await promiseAutocompleteResultPopup("exa", window, true);
win.gURLBar.select();
let promise = BrowserTestUtils.browserLoaded(win.gBrowser.selectedBrowser);
await promiseAutocompleteResultPopup("exa", win, true);
// Check it's autofilled.
Assert.equal(gURLBar.selectionStart, 3);
Assert.equal(gURLBar.selectionEnd, 12);
EventUtils.synthesizeKey("VK_RETURN");
Assert.equal(win.gURLBar.selectionStart, 3);
Assert.equal(win.gURLBar.selectionEnd, 12);
EventUtils.synthesizeKey("VK_RETURN", {}, win);
await promise;
return {
category: "urlbar",
@ -290,15 +290,15 @@ const tests = [
};
},
async function() {
async function(win) {
info("Type something, select bookmark entry, Enter.");
gURLBar.select();
let promise = BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser);
await promiseAutocompleteResultPopup("exa", window, true);
while (gURLBar.untrimmedValue != "http://example.com/?q=%s") {
EventUtils.synthesizeKey("KEY_ArrowDown");
win.gURLBar.select();
let promise = BrowserTestUtils.browserLoaded(win.gBrowser.selectedBrowser);
await promiseAutocompleteResultPopup("exa", win, true);
while (win.gURLBar.untrimmedValue != "http://example.com/?q=%s") {
EventUtils.synthesizeKey("KEY_ArrowDown", {}, win);
}
EventUtils.synthesizeKey("VK_RETURN");
EventUtils.synthesizeKey("VK_RETURN", {}, win);
await promise;
return {
category: "urlbar",
@ -314,15 +314,15 @@ const tests = [
};
},
async function() {
async function(win) {
info("Type @, Enter on a keywordoffer");
gURLBar.select();
await promiseAutocompleteResultPopup("@", window, true);
while (gURLBar.untrimmedValue != "@test ") {
EventUtils.synthesizeKey("KEY_ArrowDown");
win.gURLBar.select();
await promiseAutocompleteResultPopup("@", win, true);
while (win.gURLBar.untrimmedValue != "@test ") {
EventUtils.synthesizeKey("KEY_ArrowDown", {}, win);
}
EventUtils.synthesizeKey("VK_RETURN");
await UrlbarTestUtils.promiseSearchComplete(window);
EventUtils.synthesizeKey("VK_RETURN", {}, win);
await UrlbarTestUtils.promiseSearchComplete(win);
return {
category: "urlbar",
method: "engagement",
@ -337,15 +337,15 @@ const tests = [
};
},
async function() {
async function(win) {
info("Drop something.");
let promise = BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser);
let promise = BrowserTestUtils.browserLoaded(win.gBrowser.selectedBrowser);
EventUtils.synthesizeDrop(
document.getElementById("home-button"),
gURLBar.inputField,
win.document.getElementById("home-button"),
win.gURLBar.inputField,
[[{ type: "text/plain", data: "www.example.com" }]],
"copy",
window
win
);
await promise;
return {
@ -362,22 +362,26 @@ const tests = [
};
},
async function() {
async function(win) {
info("Paste & Go something.");
let promise = BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser);
let promise = BrowserTestUtils.browserLoaded(win.gBrowser.selectedBrowser);
await SimpleTest.promiseClipboardChange("www.example.com", () => {
clipboardHelper.copyString("www.example.com");
});
let inputBox = gURLBar.querySelector("moz-input-box");
let inputBox = win.gURLBar.querySelector("moz-input-box");
let cxmenu = inputBox.menupopup;
let cxmenuPromise = BrowserTestUtils.waitForEvent(cxmenu, "popupshown");
EventUtils.synthesizeMouseAtCenter(gURLBar.inputField, {
type: "contextmenu",
button: 2,
});
EventUtils.synthesizeMouseAtCenter(
win.gURLBar.inputField,
{
type: "contextmenu",
button: 2,
},
win
);
await cxmenuPromise;
let menuitem = inputBox.getMenuItem("paste-and-go");
EventUtils.synthesizeMouseAtCenter(menuitem, {});
EventUtils.synthesizeMouseAtCenter(menuitem, {}, win);
await promise;
return {
category: "urlbar",
@ -396,20 +400,20 @@ const tests = [
// The URLs in the down arrow/openViewOnFocus tests must vary from test to test,
// else the first Top Site results will be a switch-to-tab result and a page
// load will not occur.
async function() {
async function(win) {
info("Open the panel with DOWN, select with DOWN, Enter.");
await addTopSite("http://example.org/");
gURLBar.value = "";
gURLBar.select();
let promise = BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser);
await UrlbarTestUtils.promisePopupOpen(window, () => {
EventUtils.synthesizeKey("KEY_ArrowDown", {});
win.gURLBar.value = "";
win.gURLBar.select();
let promise = BrowserTestUtils.browserLoaded(win.gBrowser.selectedBrowser);
await UrlbarTestUtils.promisePopupOpen(win, () => {
EventUtils.synthesizeKey("KEY_ArrowDown", {}, win);
});
await UrlbarTestUtils.promiseSearchComplete(window);
while (gURLBar.untrimmedValue != "http://example.org/") {
EventUtils.synthesizeKey("KEY_ArrowDown");
await UrlbarTestUtils.promiseSearchComplete(win);
while (win.gURLBar.untrimmedValue != "http://example.org/") {
EventUtils.synthesizeKey("KEY_ArrowDown", {}, win);
}
EventUtils.synthesizeKey("VK_RETURN");
EventUtils.synthesizeKey("VK_RETURN", {}, win);
await promise;
return {
category: "urlbar",
@ -425,20 +429,20 @@ const tests = [
};
},
async function() {
async function(win) {
info("Open the panel with DOWN, click on entry.");
await addTopSite("http://example.com/");
gURLBar.value = "";
gURLBar.select();
let promise = BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser);
await UrlbarTestUtils.promisePopupOpen(window, () => {
EventUtils.synthesizeKey("KEY_ArrowDown", {});
win.gURLBar.value = "";
win.gURLBar.select();
let promise = BrowserTestUtils.browserLoaded(win.gBrowser.selectedBrowser);
await UrlbarTestUtils.promisePopupOpen(win, () => {
EventUtils.synthesizeKey("KEY_ArrowDown", {}, win);
});
while (gURLBar.untrimmedValue != "http://example.com/") {
EventUtils.synthesizeKey("KEY_ArrowDown");
while (win.gURLBar.untrimmedValue != "http://example.com/") {
EventUtils.synthesizeKey("KEY_ArrowDown", {}, win);
}
let element = UrlbarTestUtils.getSelectedRow(window);
EventUtils.synthesizeMouseAtCenter(element, {});
let element = UrlbarTestUtils.getSelectedRow(win);
EventUtils.synthesizeMouseAtCenter(element, {}, win);
await promise;
return {
category: "urlbar",
@ -454,22 +458,17 @@ const tests = [
};
},
async function() {
async function(win) {
info("Open the panel with dropmarker, type something, Enter.");
Services.prefs.setBoolPref("browser.urlbar.openViewOnFocus", false);
await BrowserTestUtils.withNewTab(
{ gBrowser, url: "about:blank" },
async browser => {
gURLBar.select();
let promise = BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser);
await UrlbarTestUtils.promisePopupOpen(window, () => {
EventUtils.synthesizeMouseAtCenter(gURLBar.dropmarker, {}, window);
});
await promiseAutocompleteResultPopup("x", window, true);
EventUtils.synthesizeKey("VK_RETURN");
await promise;
}
);
win.gURLBar.select();
let promise = BrowserTestUtils.browserLoaded(win.gBrowser.selectedBrowser);
await UrlbarTestUtils.promisePopupOpen(win, () => {
EventUtils.synthesizeMouseAtCenter(win.gURLBar.dropmarker, {}, win);
});
await promiseAutocompleteResultPopup("x", win, true);
EventUtils.synthesizeKey("VK_RETURN", {}, win);
await promise;
Services.prefs.clearUserPref("browser.urlbar.openViewOnFocus");
return {
category: "urlbar",
@ -488,7 +487,7 @@ const tests = [
// The URLs in the openViewOnFocus tests must vary from test to test, else
// the first Top Site results will be a switch-to-tab result and a page load
// will not occur.
async function() {
async function(win) {
info(
"With pageproxystate=valid, open the panel with openViewOnFocus, select with DOWN, Enter."
);
@ -499,17 +498,17 @@ const tests = [
],
});
await addTopSite("http://example.org/");
gURLBar.value = "";
let promise = BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser);
await UrlbarTestUtils.promisePopupOpen(window, () => {
window.document.getElementById("Browser:OpenLocation").doCommand();
win.gURLBar.value = "";
let promise = BrowserTestUtils.browserLoaded(win.gBrowser.selectedBrowser);
await UrlbarTestUtils.promisePopupOpen(win, () => {
win.document.getElementById("Browser:OpenLocation").doCommand();
});
await SpecialPowers.popPrefEnv();
await UrlbarTestUtils.promiseSearchComplete(window);
while (gURLBar.untrimmedValue != "http://example.org/") {
EventUtils.synthesizeKey("KEY_ArrowDown");
await UrlbarTestUtils.promiseSearchComplete(win);
while (win.gURLBar.untrimmedValue != "http://example.org/") {
EventUtils.synthesizeKey("KEY_ArrowDown", {}, win);
}
EventUtils.synthesizeKey("VK_RETURN");
EventUtils.synthesizeKey("VK_RETURN", {}, win);
await promise;
return {
category: "urlbar",
@ -525,7 +524,7 @@ const tests = [
};
},
async function() {
async function(win) {
info(
"With pageproxystate=valid, open the panel with openViewOnFocus, click on entry."
);
@ -537,18 +536,18 @@ const tests = [
],
});
await addTopSite("http://example.com/");
gURLBar.value = "";
let promise = BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser);
await UrlbarTestUtils.promisePopupOpen(window, () => {
window.document.getElementById("Browser:OpenLocation").doCommand();
win.gURLBar.value = "";
let promise = BrowserTestUtils.browserLoaded(win.gBrowser.selectedBrowser);
await UrlbarTestUtils.promisePopupOpen(win, () => {
win.document.getElementById("Browser:OpenLocation").doCommand();
});
await SpecialPowers.popPrefEnv();
await UrlbarTestUtils.promiseSearchComplete(window);
while (gURLBar.untrimmedValue != "http://example.com/") {
EventUtils.synthesizeKey("KEY_ArrowDown");
await UrlbarTestUtils.promiseSearchComplete(win);
while (win.gURLBar.untrimmedValue != "http://example.com/") {
EventUtils.synthesizeKey("KEY_ArrowDown", {}, win);
}
let element = UrlbarTestUtils.getSelectedRow(window);
EventUtils.synthesizeMouseAtCenter(element, {});
let element = UrlbarTestUtils.getSelectedRow(win);
EventUtils.synthesizeMouseAtCenter(element, {}, win);
await promise;
return {
category: "urlbar",
@ -564,7 +563,7 @@ const tests = [
};
},
async function() {
async function(win) {
info(
"With pageproxystate=invalid, open the panel with openViewOnFocus, Enter."
);
@ -575,15 +574,15 @@ const tests = [
],
});
await addTopSite("http://example.org/");
gURLBar.value = "example.org";
gURLBar.setAttribute("pageproxystate", "invalid");
let promise = BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser);
await UrlbarTestUtils.promisePopupOpen(window, () => {
window.document.getElementById("Browser:OpenLocation").doCommand();
win.gURLBar.value = "example.org";
win.gURLBar.setAttribute("pageproxystate", "invalid");
let promise = BrowserTestUtils.browserLoaded(win.gBrowser.selectedBrowser);
await UrlbarTestUtils.promisePopupOpen(win, () => {
win.document.getElementById("Browser:OpenLocation").doCommand();
});
await SpecialPowers.popPrefEnv();
await UrlbarTestUtils.promiseSearchComplete(window);
EventUtils.synthesizeKey("VK_RETURN");
await UrlbarTestUtils.promiseSearchComplete(win);
EventUtils.synthesizeKey("VK_RETURN", {}, win);
await promise;
return {
category: "urlbar",
@ -599,7 +598,7 @@ const tests = [
};
},
async function() {
async function(win) {
info(
"With pageproxystate=invalid, open the panel with openViewOnFocus, click on entry."
);
@ -612,16 +611,16 @@ const tests = [
// This value must be different from the previous test, or else the
// Megabar's "retained results" feature will interfere with openViewOnFocus.
// This issue will be addressed in bug 1601052.
gURLBar.value = "example.com";
gURLBar.setAttribute("pageproxystate", "invalid");
let promise = BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser);
await UrlbarTestUtils.promisePopupOpen(window, () => {
window.document.getElementById("Browser:OpenLocation").doCommand();
win.gURLBar.value = "example.com";
win.gURLBar.setAttribute("pageproxystate", "invalid");
let promise = BrowserTestUtils.browserLoaded(win.gBrowser.selectedBrowser);
await UrlbarTestUtils.promisePopupOpen(win, () => {
win.document.getElementById("Browser:OpenLocation").doCommand();
});
await SpecialPowers.popPrefEnv();
await UrlbarTestUtils.promiseSearchComplete(window);
let element = UrlbarTestUtils.getSelectedRow(window);
EventUtils.synthesizeMouseAtCenter(element, {});
await UrlbarTestUtils.promiseSearchComplete(win);
let element = UrlbarTestUtils.getSelectedRow(win);
EventUtils.synthesizeMouseAtCenter(element, {}, win);
await promise;
return {
category: "urlbar",
@ -637,21 +636,21 @@ const tests = [
};
},
async function() {
async function(win) {
info("Retained result: type, blur, focus, confirm.");
await SpecialPowers.pushPrefEnv({
set: [["browser.urlbar.update1", true]],
});
await promiseAutocompleteResultPopup("search", window, true);
await UrlbarTestUtils.promisePopupClose(window, () => {
gURLBar.blur();
await promiseAutocompleteResultPopup("search", win, true);
await UrlbarTestUtils.promisePopupClose(win, () => {
win.gURLBar.blur();
});
await UrlbarTestUtils.promisePopupOpen(window, () => {
document.getElementById("Browser:OpenLocation").doCommand();
await UrlbarTestUtils.promisePopupOpen(win, () => {
win.document.getElementById("Browser:OpenLocation").doCommand();
});
await UrlbarTestUtils.promiseSearchComplete(window);
let promise = BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser);
EventUtils.synthesizeKey("VK_RETURN");
await UrlbarTestUtils.promiseSearchComplete(win);
let promise = BrowserTestUtils.browserLoaded(win.gBrowser.selectedBrowser);
EventUtils.synthesizeKey("VK_RETURN", {}, win);
await promise;
await SpecialPowers.popPrefEnv();
return [
@ -680,12 +679,12 @@ const tests = [
];
},
async function() {
async function(win) {
info("Sanity check we are not stuck on 'returned'");
gURLBar.select();
let promise = BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser);
await promiseAutocompleteResultPopup("x", window, true);
EventUtils.synthesizeKey("VK_RETURN");
win.gURLBar.select();
let promise = BrowserTestUtils.browserLoaded(win.gBrowser.selectedBrowser);
await promiseAutocompleteResultPopup("x", win, true);
EventUtils.synthesizeKey("VK_RETURN", {}, win);
await promise;
return {
category: "urlbar",
@ -701,24 +700,24 @@ const tests = [
};
},
async function() {
async function(win) {
info("Retained result: type, blur, focus, backspace, type, confirm.");
await SpecialPowers.pushPrefEnv({
set: [["browser.urlbar.update1", true]],
});
await promiseAutocompleteResultPopup("search", window, true);
await UrlbarTestUtils.promisePopupClose(window, () => {
gURLBar.blur();
await promiseAutocompleteResultPopup("search", win, true);
await UrlbarTestUtils.promisePopupClose(win, () => {
win.gURLBar.blur();
});
await UrlbarTestUtils.promisePopupOpen(window, () => {
document.getElementById("Browser:OpenLocation").doCommand();
await UrlbarTestUtils.promisePopupOpen(win, () => {
win.document.getElementById("Browser:OpenLocation").doCommand();
});
EventUtils.synthesizeKey("VK_RIGHT");
EventUtils.synthesizeKey("VK_BACK_SPACE");
EventUtils.synthesizeKey("x");
await UrlbarTestUtils.promiseSearchComplete(window);
let promise = BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser);
EventUtils.synthesizeKey("VK_RETURN");
EventUtils.synthesizeKey("VK_RIGHT", {}, win);
EventUtils.synthesizeKey("VK_BACK_SPACE", {}, win);
EventUtils.synthesizeKey("x", {}, win);
await UrlbarTestUtils.promiseSearchComplete(win);
let promise = BrowserTestUtils.browserLoaded(win.gBrowser.selectedBrowser);
EventUtils.synthesizeKey("VK_RETURN", {}, win);
await promise;
await SpecialPowers.popPrefEnv();
return [
@ -747,22 +746,22 @@ const tests = [
];
},
async function() {
async function(win) {
info("Retained result: type, blur, focus, type (overwrite), confirm.");
await SpecialPowers.pushPrefEnv({
set: [["browser.urlbar.update1", true]],
});
await promiseAutocompleteResultPopup("search", window, true);
await UrlbarTestUtils.promisePopupClose(window, () => {
gURLBar.blur();
await promiseAutocompleteResultPopup("search", win, true);
await UrlbarTestUtils.promisePopupClose(win, () => {
win.gURLBar.blur();
});
await UrlbarTestUtils.promisePopupOpen(window, () => {
document.getElementById("Browser:OpenLocation").doCommand();
await UrlbarTestUtils.promisePopupOpen(win, () => {
win.document.getElementById("Browser:OpenLocation").doCommand();
});
EventUtils.synthesizeKey("x");
await UrlbarTestUtils.promiseSearchComplete(window);
let promise = BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser);
EventUtils.synthesizeKey("VK_RETURN");
EventUtils.synthesizeKey("x", {}, win);
await UrlbarTestUtils.promiseSearchComplete(win);
let promise = BrowserTestUtils.browserLoaded(win.gBrowser.selectedBrowser);
EventUtils.synthesizeKey("VK_RETURN", {}, win);
await promise;
await SpecialPowers.popPrefEnv();
return [
@ -791,12 +790,12 @@ const tests = [
];
},
async function() {
async function(win) {
info("Sanity check we are not stuck on 'restarted'");
gURLBar.select();
let promise = BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser);
await promiseAutocompleteResultPopup("x", window, true);
EventUtils.synthesizeKey("VK_RETURN");
win.gURLBar.select();
let promise = BrowserTestUtils.browserLoaded(win.gBrowser.selectedBrowser);
await promiseAutocompleteResultPopup("x", win, true);
EventUtils.synthesizeKey("VK_RETURN", {}, win);
await promise;
return {
category: "urlbar",
@ -816,11 +815,11 @@ const tests = [
* Abandonment tests.
*/
async function() {
async function(win) {
info("Type something, blur.");
gURLBar.select();
EventUtils.synthesizeKey("x");
gURLBar.blur();
win.gURLBar.select();
EventUtils.synthesizeKey("x", {}, win);
win.gURLBar.blur();
return {
category: "urlbar",
method: "abandonment",
@ -833,14 +832,14 @@ const tests = [
};
},
async function() {
async function(win) {
info("Open the panel with DOWN, don't type, blur it.");
gURLBar.value = "";
gURLBar.select();
await UrlbarTestUtils.promisePopupOpen(window, () => {
EventUtils.synthesizeKey("KEY_ArrowDown", {});
win.gURLBar.value = "";
win.gURLBar.select();
await UrlbarTestUtils.promisePopupOpen(win, () => {
EventUtils.synthesizeKey("KEY_ArrowDown", {}, win);
});
gURLBar.blur();
win.gURLBar.blur();
return {
category: "urlbar",
method: "abandonment",
@ -853,18 +852,18 @@ const tests = [
};
},
async function() {
async function(win) {
info("Open the panel with dropmarker, type something, blur it.");
Services.prefs.setBoolPref("browser.urlbar.openViewOnFocus", false);
await BrowserTestUtils.withNewTab(
{ gBrowser, url: "about:blank" },
{ gBrowser: win.gBrowser, url: "about:blank" },
async browser => {
gURLBar.select();
await UrlbarTestUtils.promisePopupOpen(window, () => {
EventUtils.synthesizeMouseAtCenter(gURLBar.dropmarker, {}, window);
win.gURLBar.select();
await UrlbarTestUtils.promisePopupOpen(win, () => {
EventUtils.synthesizeMouseAtCenter(gURLBar.dropmarker, {}, win);
});
EventUtils.synthesizeKey("x");
gURLBar.blur();
EventUtils.synthesizeKey("x", {}, win);
win.gURLBar.blur();
}
);
Services.prefs.clearUserPref("browser.urlbar.openViewOnFocus");
@ -880,17 +879,17 @@ const tests = [
};
},
async function() {
async function(win) {
info(
"With pageproxystate=valid, open the panel with openViewOnFocus, don't type, blur it."
);
gURLBar.value = "";
win.gURLBar.value = "";
Services.prefs.setBoolPref("browser.urlbar.openViewOnFocus", true);
await UrlbarTestUtils.promisePopupOpen(window, () => {
window.document.getElementById("Browser:OpenLocation").doCommand();
await UrlbarTestUtils.promisePopupOpen(win, () => {
win.document.getElementById("Browser:OpenLocation").doCommand();
});
Services.prefs.clearUserPref("browser.urlbar.openViewOnFocus");
gURLBar.blur();
win.gURLBar.blur();
return {
category: "urlbar",
method: "abandonment",
@ -903,18 +902,18 @@ const tests = [
};
},
async function() {
async function(win) {
info(
"With pageproxystate=invalid, open the panel with openViewOnFocus, don't type, blur it."
);
gURLBar.value = "mochi.test";
gURLBar.setAttribute("pageproxystate", "invalid");
win.gURLBar.value = "mochi.test";
win.gURLBar.setAttribute("pageproxystate", "invalid");
Services.prefs.setBoolPref("browser.urlbar.openViewOnFocus", true);
await UrlbarTestUtils.promisePopupOpen(window, () => {
window.document.getElementById("Browser:OpenLocation").doCommand();
await UrlbarTestUtils.promisePopupOpen(win, () => {
win.document.getElementById("Browser:OpenLocation").doCommand();
});
Services.prefs.clearUserPref("browser.urlbar.openViewOnFocus");
gURLBar.blur();
win.gURLBar.blur();
return {
category: "urlbar",
method: "abandonment",
@ -926,42 +925,40 @@ const tests = [
},
};
},
];
/*
* No event tests.
*/
async function() {
const noEventTests = [
async function(win) {
info("Type something, click on search settings.");
await BrowserTestUtils.withNewTab(
{ gBrowser, url: "about:blank" },
{ gBrowser: win.gBrowser, url: "about:blank" },
async browser => {
gURLBar.select();
win.gURLBar.select();
let promise = BrowserTestUtils.browserLoaded(browser);
await promiseAutocompleteResultPopup("x", window, true);
UrlbarTestUtils.getOneOffSearchButtons(window).settingsButton.click();
await promiseAutocompleteResultPopup("x", win, true);
UrlbarTestUtils.getOneOffSearchButtons(win).settingsButton.click();
await promise;
}
);
return null;
},
async function() {
async function(win) {
info("Type something, Up, Enter on search settings.");
await BrowserTestUtils.withNewTab(
{ gBrowser, url: "about:blank" },
{ gBrowser: win.gBrowser, url: "about:blank" },
async browser => {
gURLBar.select();
win.gURLBar.select();
let promise = BrowserTestUtils.browserLoaded(browser);
await promiseAutocompleteResultPopup("x", window, true);
EventUtils.synthesizeKey("KEY_ArrowUp");
await promiseAutocompleteResultPopup("x", win, true);
EventUtils.synthesizeKey("KEY_ArrowUp", {}, win);
Assert.ok(
UrlbarTestUtils.getOneOffSearchButtons(
window
win
).selectedButton.classList.contains("search-setting-button-compact"),
"Should have selected the settings button"
);
EventUtils.synthesizeKey("VK_RETURN");
EventUtils.synthesizeKey("VK_RETURN", {}, win);
await promise;
}
);
@ -1019,15 +1016,25 @@ add_task(async function test() {
for (let i = 0; i < tests.length; i++) {
info(`Running test at index ${i}`);
let testFn = tests[i];
let events = await testFn();
// Some prefs only apply to new windows.
let win = await BrowserTestUtils.openNewBrowserWindow();
let events = await tests[i](win);
if (!Array.isArray(events)) {
events = [events].filter(e => !!e);
events = [events];
}
// Always blur to ensure it's not accounted as an additional abandonment.
gURLBar.blur();
win.gURLBar.blur();
await BrowserTestUtils.closeWindow(win);
TelemetryTestUtils.assertEvents(events, { category: "urlbar" });
}
for (let i = 0; i < noEventTests.length; i++) {
info(`Running no event test at index ${i}`);
await noEventTests[i](window);
// Always blur to ensure it's not accounted as an additional abandonment.
gURLBar.blur();
TelemetryTestUtils.assertEvents([], { category: "urlbar" });
}
});
/**

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

@ -33,5 +33,6 @@ CHECK(RefCountedCopyConstructorChecker, "refcounted-copy-constructor")
CHECK(RefCountedInsideLambdaChecker, "refcounted-inside-lambda")
CHECK(ScopeChecker, "scope")
CHECK(SprintfLiteralChecker, "sprintf-literal")
CHECK(TempRefPtrChecker, "performance-temp-refptr")
CHECK(TrivialCtorDtorChecker, "trivial-constructor-destructor")
CHECK(TrivialDtorChecker, "trivial-destructor")

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

@ -34,6 +34,6 @@
#include "RefCountedInsideLambdaChecker.h"
#include "ScopeChecker.h"
#include "SprintfLiteralChecker.h"
#include "TempRefPtrChecker.h"
#include "TrivialCtorDtorChecker.h"
#include "TrivialDtorChecker.h"

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

@ -306,6 +306,18 @@ AST_MATCHER(QualType, isSmartPtrToRefCounted) {
return D && hasCustomAttribute<moz_is_smartptr_to_refcounted>(D);
}
AST_MATCHER(ClassTemplateSpecializationDecl, isSmartPtrToRefCountedDecl) {
auto *D = dyn_cast_or_null<CXXRecordDecl>(Node.getSpecializedTemplate()->getTemplatedDecl());
if (!D) {
return false;
}
D = D->getCanonicalDecl();
return D && hasCustomAttribute<moz_is_smartptr_to_refcounted>(D);
}
AST_MATCHER(CXXRecordDecl, hasBaseClasses) {
const CXXRecordDecl *Decl = Node.getCanonicalDecl();

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

@ -0,0 +1,57 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "TempRefPtrChecker.h"
#include "CustomMatchers.h"
constexpr const char *kCallExpr = "call-expr";
constexpr const char *kOperatorCallExpr = "operator-call";
void TempRefPtrChecker::registerMatchers(MatchFinder *AstMatcher) {
AstMatcher->addMatcher(
cxxOperatorCallExpr(
hasOverloadedOperatorName("->"),
hasAnyArgument(implicitCastExpr(
hasSourceExpression(materializeTemporaryExpr(anyOf(
hasDescendant(callExpr().bind(kCallExpr)), anything()))))),
callee(hasDeclContext(classTemplateSpecializationDecl(
isSmartPtrToRefCountedDecl(),
// ignore any calls on temporary RefPtr<MozPromise<T>>,
// since these typically need to be locally ref-counted,
// e.g. in Then chains where the promise might be resolved
// concurrently
unless(hasTemplateArgument(
0, refersToType(hasDeclaration(
cxxRecordDecl(hasName("mozilla::MozPromise"))))))))))
.bind(kOperatorCallExpr),
this);
}
void TempRefPtrChecker::check(const MatchFinder::MatchResult &Result) {
const auto *OCE =
Result.Nodes.getNodeAs<CXXOperatorCallExpr>(kOperatorCallExpr);
const auto *refPtrDecl =
dyn_cast<const CXXRecordDecl>(OCE->getCalleeDecl()->getDeclContext());
diag(OCE->getOperatorLoc(),
"performance issue: temporary %0 is only dereferenced here once which "
"involves short-lived AddRef/Release calls")
<< refPtrDecl;
const auto *InnerCE = Result.Nodes.getNodeAs<CallExpr>(kCallExpr);
if (InnerCE) {
const auto functionName =
InnerCE->getCalleeDecl()->getAsFunction()->getQualifiedNameAsString();
if (functionName != "mozilla::MakeRefPtr") {
diag(
OCE->getOperatorLoc(),
"consider changing function %0 to return a raw reference instead (be "
"sure that the pointee is held alive by someone else though!)",
DiagnosticIDs::Note)
<< functionName;
}
}
}

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

@ -0,0 +1,21 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef TempRefPtrChecker_h__
#define TempRefPtrChecker_h__
#include "plugin.h"
class TempRefPtrChecker final : public BaseCheck {
public:
TempRefPtrChecker(StringRef CheckName, ContextType *Context = nullptr)
: BaseCheck(CheckName, Context) {}
void registerMatchers(MatchFinder *AstMatcher) override;
void check(const MatchFinder::MatchResult &Result) override;
private:
CompilerInstance *CI;
};
#endif

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

@ -39,6 +39,7 @@ HOST_SOURCES += [
'RefCountedInsideLambdaChecker.cpp',
'ScopeChecker.cpp',
'SprintfLiteralChecker.cpp',
'TempRefPtrChecker.cpp',
'TrivialCtorDtorChecker.cpp',
'TrivialDtorChecker.cpp',
'VariableUsageHelpers.cpp',

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

@ -375,7 +375,7 @@ struct DisallowConstNonRefPtrMemberArgs {
};
MOZ_CAN_RUN_SCRIPT void test_temporary_1() {
RefPtr<RefCountedBase>(new RefCountedBase())->method_test();
RefPtr<RefCountedBase>(new RefCountedBase())->method_test(); // expected-warning {{performance issue: temporary 'RefPtr<RefCountedBase>' is only dereferenced here once which involves short-lived AddRef/Release calls}}
}
MOZ_CAN_RUN_SCRIPT void test_temporary_2() {

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

@ -0,0 +1,52 @@
#include <mozilla/RefPtr.h>
using namespace mozilla;
struct RefCountedBase {
void AddRef();
void Release();
void method_test();
};
struct RefCountedBaseHolder {
RefPtr<RefCountedBase> GetRefCountedBase() const {
return mRefCountedBase;
}
private:
RefPtr<RefCountedBase> mRefCountedBase = MakeRefPtr<RefCountedBase>();
};
void test_arrow_temporary_new_refptr_function_style_cast() {
RefPtr<RefCountedBase>(new RefCountedBase())->method_test(); // expected-warning {{performance issue: temporary 'RefPtr<RefCountedBase>' is only dereferenced here once which involves short-lived AddRef/Release calls}}
}
void test_arrow_temporary_new_refptr_brace() {
RefPtr<RefCountedBase>{new RefCountedBase()}->method_test(); // expected-warning {{performance issue: temporary 'RefPtr<RefCountedBase>' is only dereferenced here once which involves short-lived AddRef/Release calls}}
}
void test_arrow_temporary_new_c_style_cast() {
((RefPtr<RefCountedBase>)(new RefCountedBase()))->method_test(); // expected-warning {{performance issue: temporary 'RefPtr<RefCountedBase>' is only dereferenced here once which involves short-lived AddRef/Release calls}}
}
void test_arrow_temporary_new_static_cast() {
static_cast<RefPtr<RefCountedBase>>(new RefCountedBase())->method_test(); // expected-warning {{performance issue: temporary 'RefPtr<RefCountedBase>' is only dereferenced here once which involves short-lived AddRef/Release calls}}
}
void test_arrow_temporary_new_refptr_makerefptr() {
MakeRefPtr<RefCountedBase>()->method_test(); // expected-warning {{performance issue: temporary 'RefPtr<RefCountedBase>' is only dereferenced here once which involves short-lived AddRef/Release calls}}
}
void test_arrow_temporary_get_refptr_from_member_function() {
const RefCountedBaseHolder holder;
holder.GetRefCountedBase()->method_test(); // expected-warning {{performance issue: temporary 'RefPtr<RefCountedBase>' is only dereferenced here once which involves short-lived AddRef/Release calls}} expected-note {{consider changing function RefCountedBaseHolder::GetRefCountedBase to return a raw reference instead}}
}
void test_ref(RefCountedBase &aRefCountedBase);
void test_star_temporary_new_refptr_function_style_cast() {
// TODO: Should we warn about operator* as well?
test_ref(*RefPtr<RefCountedBase>(new RefCountedBase()));
}

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

@ -45,6 +45,7 @@ SOURCES += [
'TestStackClass.cpp',
'TestStaticLocalClass.cpp',
'TestTemporaryClass.cpp',
'TestTempRefPtr.cpp',
'TestTrivialCtorDtor.cpp',
'TestTrivialDtor.cpp',
]

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

@ -6,11 +6,12 @@
#ifndef nsChromeRegistryChrome_h
#define nsChromeRegistryChrome_h
#include <utility>
#include "nsCOMArray.h"
#include "nsChromeRegistry.h"
#include "nsTArray.h"
#include "mozilla/Move.h"
#include "nsClassHashtable.h"
#include "nsTArray.h"
namespace mozilla {
namespace dom {

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

@ -2,7 +2,7 @@
## Tests overview
Tests are located in `devtools/client/aboutdebugging/test`. There are two subfolders, `browser` and `unit`. `browser` contains our [browser mochitests](https://developer.mozilla.org/en-US/docs/Mozilla/Projects/Mochitest). Most of our tests are browser mochitests. `unit` contains our [xpc-shell unit tests](https://developer.mozilla.org/en-US/docs/Mozilla/QA/Writing_xpcshell-based_unit_tests). At the moment of writing we only have one.
Tests are located in `devtools/client/aboutdebugging/test`. There are two subfolders, `browser` and `xpcshell`. `browser` contains our [browser mochitests](https://developer.mozilla.org/en-US/docs/Mozilla/Projects/Mochitest). Most of our tests are browser mochitests. `xpcshell` contains our [xpc-shell unit tests](https://developer.mozilla.org/en-US/docs/Mozilla/QA/Writing_xpcshell-based_unit_tests). At the moment of writing we only have one.
## Test coverage
@ -121,4 +121,4 @@ Below is an example of pushing to try using the try syntax selector. As the docu
Refer to the [try syntax documentation](https://firefox-source-docs.mozilla.org/tools/try/selectors/syntax.html) to learn what the various parameters mean.
Note that you need committer access level 1 in order to push to try.
Note that you need committer access level 1 in order to push to try.

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

@ -12,7 +12,7 @@ DIRS += [
]
XPCSHELL_TESTS_MANIFESTS += [
'test/unit/xpcshell.ini'
'test/xpcshell/xpcshell.ini'
]
BROWSER_CHROME_MANIFESTS += [

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

@ -28,7 +28,7 @@ The application panel lives in the `devtools/client/application` directory. Insi
└── test
├── browser -> mochitests (e2e/integration)
├── node -> Jest unit tests
└── unit -> xpcshell unit tests
└── xpcshell -> xpcshell unit tests
```
### Panel registration
@ -159,7 +159,7 @@ Besides the usual DevTools test helpers, the Application panel adds some other h
### Unit tests with xpcshell
We are using xpcshell unit tests for the **Redux reducers** in `devtools/client/application/test/unit`.
We are using xpcshell unit tests for the **Redux reducers** in `devtools/client/application/test/xpcshell`.
Other unit tests that don't need Enzyme or other npm modules should be added here too.
@ -335,4 +335,4 @@ If you have questions about the code, features, planning, etc. the current activ
- Product management: Harald Kischner (`:digitarald`)
- Engineering management: Patrick Brosset (`:pbro`)
- Engineering: Belén Albeza (`:ladybenko`)
- Engineering: Ola Gasidlo (`:ola`)
- Engineering: Ola Gasidlo (`:ola`)

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

@ -17,5 +17,5 @@ BROWSER_CHROME_MANIFESTS += [
]
XPCSHELL_TESTS_MANIFESTS += [
'test/unit/xpcshell.ini'
'test/xpcshell/xpcshell.ini'
]

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

@ -13,7 +13,7 @@ BROWSER_CHROME_MANIFESTS += [
'test/metrics/browser_metrics_netmonitor.ini',
'test/metrics/browser_metrics_webconsole.ini',
]
XPCSHELL_TESTS_MANIFESTS += ['test/unit/xpcshell.ini']
XPCSHELL_TESTS_MANIFESTS += ['test/xpcshell/xpcshell.ini']
DIRS += [
'actions',

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

@ -11,6 +11,7 @@ const L10N = new LocalizationHelper(
);
const DevToolsUtils = require("devtools/shared/DevToolsUtils");
const Telemetry = require("devtools/client/shared/telemetry");
const { DOMHelpers } = require("devtools/shared/dom-helpers");
// The min-width of toolbox and browser toolbox.
const WIDTH_CHEVRON_AND_MEATBALL = 50;
@ -235,6 +236,14 @@ ToolboxHostManager.prototype = {
const iframe = this.host.frame;
const newHost = this.createHost(hostType);
const newIframe = await newHost.create();
// Load a blank document in the host frame. The new iframe must have a valid
// document before using swapFrameLoaders().
await new Promise(resolve => {
newIframe.setAttribute("src", "about:blank");
DOMHelpers.onceDOMReady(newIframe.contentWindow, resolve);
});
// change toolbox document's parent to the new host
newIframe.swapFrameLoaders(iframe);

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

@ -7,7 +7,6 @@
const EventEmitter = require("devtools/shared/event-emitter");
const promise = require("promise");
const Services = require("Services");
const { DOMHelpers } = require("devtools/shared/dom-helpers");
loader.lazyRequireGetter(
this,
@ -82,7 +81,6 @@ BottomHost.prototype = {
this._browserContainer.appendChild(this.frame);
focusTab(this.hostTab);
await createBlankDocument(this.frame);
this.emit("ready", this.frame);
return this.frame;
@ -170,7 +168,6 @@ class SidebarHost {
}
focusTab(this.hostTab);
await createBlankDocument(this.frame);
this.emit("ready", this.frame);
return this.frame;
@ -279,8 +276,6 @@ WindowHost.prototype = {
// CSS transitions when switching from docked to window hosts.
// Added in Bug 832920, should be reviewed in Bug 1542468.
this.frame.setAttribute("forceOwnRefreshDriver", "");
this.frame.setAttribute("src", "about:blank");
resolve(this.frame);
};
@ -351,7 +346,6 @@ BrowserToolboxHost.prototype = {
this.doc.body.appendChild(this.frame);
await createBlankDocument(this.frame);
this.emit("ready", this.frame);
return this.frame;
@ -427,19 +421,6 @@ function createDevToolsFrame(doc, className) {
return frame;
}
/**
* Load a blank document in the host frame.
* This is mandatory if the host is created for switching hosts. In that case,
* the new host's frame needs to have a valid document before we can swap the
* content of the previous host.
*/
function createBlankDocument(frame) {
return new Promise(resolve => {
frame.setAttribute("src", "about:blank");
DOMHelpers.onceDOMReady(frame.contentWindow, resolve);
});
}
exports.Hosts = {
bottom: BottomHost,
left: LeftHost,

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

@ -127,6 +127,7 @@ class App extends Component {
endPanelControl: true,
initialHeight: "50%",
splitterSize: 1,
minSize: "30px",
startPanel: AnimationListContainer({
addAnimationsCurrentTimeListener,
animations,

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

@ -18,7 +18,7 @@ DevToolsModules(
)
BROWSER_CHROME_MANIFESTS += ['test/browser.ini']
XPCSHELL_TESTS_MANIFESTS += ['test/unit/xpcshell.ini']
XPCSHELL_TESTS_MANIFESTS += ['test/xpcshell/xpcshell.ini']
with Files('**'):
BUG_COMPONENT = ('DevTools', 'Inspector: Changes')

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

@ -13,7 +13,7 @@ DIRS += [
]
BROWSER_CHROME_MANIFESTS += ['test/browser/browser.ini']
XPCSHELL_TESTS_MANIFESTS += ['test/unit/xpcshell.ini']
XPCSHELL_TESTS_MANIFESTS += ['test/xpcshell/xpcshell.ini']
DevToolsModules(
'CompatibilityView.js',

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

@ -17,4 +17,4 @@ DevToolsModules(
)
BROWSER_CHROME_MANIFESTS += ['test/browser.ini']
XPCSHELL_TESTS_MANIFESTS += ['test/unit/xpcshell.ini']
XPCSHELL_TESTS_MANIFESTS += ['test/xpcshell/xpcshell.ini']

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

@ -25,5 +25,5 @@ DevToolsModules(
)
BROWSER_CHROME_MANIFESTS += ['test/browser/browser.ini']
XPCSHELL_TESTS_MANIFESTS += ['test/unit/xpcshell.ini']
XPCSHELL_TESTS_MANIFESTS += ['test/xpcshell/xpcshell.ini']
MOCHITEST_CHROME_MANIFESTS += ['test/chrome/chrome.ini']

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