mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-19 00:05:36 +00:00
Merge mozilla-central to autoland. a=merge CLOSED TREE
--HG-- rename : layout/reftests/mathml/dir-6-ref.html => testing/web-platform/tests/mathml/presentation-markup/direction/direction-006-ref.html
This commit is contained in:
commit
d674f265db
@ -12,6 +12,6 @@ ac_add_options --disable-profiling
|
||||
ac_add_options --disable-warnings-as-errors
|
||||
ac_add_options --enable-coverage
|
||||
|
||||
export LDFLAGS="--coverage -L$topsrcdir/clang/lib/clang/8.0.0/lib/linux/"
|
||||
export LDFLAGS="--coverage -L$MOZ_FETCHES_DIR/clang/lib/clang/8.0.0/lib/linux/"
|
||||
export LIBS="-lclang_rt.profile-x86_64"
|
||||
export RUSTFLAGS="-Ccodegen-units=1 -Zprofile -Zno-landing-pads -Clink-dead-code -Coverflow-checks=off"
|
||||
|
@ -9,8 +9,8 @@ ac_add_options --enable-debug
|
||||
. $topsrcdir/build/mozconfig.stylo
|
||||
|
||||
# Use Clang as specified in manifest
|
||||
export CC="$topsrcdir/clang/bin/clang"
|
||||
export CXX="$topsrcdir/clang/bin/clang++"
|
||||
export CC="$MOZ_FETCHES_DIR/clang/bin/clang"
|
||||
export CXX="$MOZ_FETCHES_DIR/clang/bin/clang++"
|
||||
|
||||
# Save rust analysis (this requires unlocking the unstable features,
|
||||
# which is done in the taskcluster task definition via RUSTC_BOOTSTRAP)
|
||||
|
@ -9,8 +9,8 @@ ac_add_options --enable-debug
|
||||
. $topsrcdir/build/mozconfig.stylo
|
||||
|
||||
# Use Clang as specified in manifest
|
||||
export CC="$topsrcdir/clang/bin/clang"
|
||||
export CXX="$topsrcdir/clang/bin/clang++"
|
||||
export CC="$MOZ_FETCHES_DIR/clang/bin/clang"
|
||||
export CXX="$MOZ_FETCHES_DIR/clang/bin/clang++"
|
||||
|
||||
# Add the static checker
|
||||
ac_add_options --enable-clang-plugin
|
||||
|
@ -1,14 +1,14 @@
|
||||
export TOOLTOOL_DIR="$topsrcdir"
|
||||
export LLVM_CONFIG="${TOOLTOOL_DIR}/clang/bin/llvm-config"
|
||||
export LLVM_CONFIG="${MOZ_FETCHES_DIR}/clang/bin/llvm-config"
|
||||
|
||||
CARGO="${TOOLTOOL_DIR}/rustc/bin/cargo"
|
||||
RUSTC="${TOOLTOOL_DIR}/rustc/bin/rustc"
|
||||
RUSTDOC="${TOOLTOOL_DIR}/rustc/bin/rustdoc"
|
||||
RUSTFMT="${TOOLTOOL_DIR}/rustc/bin/rustfmt"
|
||||
CBINDGEN="${TOOLTOOL_DIR}/cbindgen/cbindgen"
|
||||
CARGO="${MOZ_FETCHES_DIR}/rustc/bin/cargo"
|
||||
RUSTC="${MOZ_FETCHES_DIR}/rustc/bin/rustc"
|
||||
RUSTDOC="${MOZ_FETCHES_DIR}/rustc/bin/rustdoc"
|
||||
RUSTFMT="${MOZ_FETCHES_DIR}/rustc/bin/rustfmt"
|
||||
CBINDGEN="${MOZ_FETCHES_DIR}/cbindgen/cbindgen"
|
||||
|
||||
export NODEJS="${TOOLTOOL_DIR}/node/bin/node"
|
||||
NASM="${TOOLTOOL_DIR}/nasm/nasm"
|
||||
export NODEJS="${MOZ_FETCHES_DIR}/node/bin/node"
|
||||
NASM="${MOZ_FETCHES_DIR}/nasm/nasm"
|
||||
|
||||
CC="${TOOLTOOL_DIR}/clang/bin/clang"
|
||||
CXX="${TOOLTOOL_DIR}/clang/bin/clang++"
|
||||
CC="${MOZ_FETCHES_DIR}/clang/bin/clang"
|
||||
CXX="${MOZ_FETCHES_DIR}/clang/bin/clang++"
|
||||
|
@ -6,7 +6,7 @@ MOZ_AUTOMATION_UPLOAD=0
|
||||
MOZ_AUTOMATION_UPLOAD_SYMBOLS=0
|
||||
|
||||
TOOLTOOL_DIR=${TOOLTOOL_DIR:-$topsrcdir}
|
||||
export TUP=${TOOLTOOL_DIR}/tup/tup
|
||||
export TUP=${MOZ_FETCHES_DIR}/tup/tup
|
||||
|
||||
. "$topsrcdir/browser/config/mozconfigs/linux64/common-opt"
|
||||
. "$topsrcdir/build/mozconfig.common.override"
|
||||
|
@ -8,6 +8,6 @@ ac_add_options --disable-sandbox
|
||||
ac_add_options --disable-warnings-as-errors
|
||||
ac_add_options --enable-coverage
|
||||
|
||||
export LDFLAGS="-coverage -L$topsrcdir/clang/lib/clang/8.0.0/lib/darwin/"
|
||||
export LDFLAGS="-coverage -L$MOZ_FETCHES_DIR/clang/lib/clang/8.0.0/lib/darwin/"
|
||||
export LIBS="-lclang_rt.profile_osx"
|
||||
export RUSTFLAGS="-Ccodegen-units=1 -Zprofile -Zno-landing-pads -Clink-dead-code -Coverflow-checks=off"
|
||||
|
@ -4,9 +4,9 @@
|
||||
if test `uname -s` = "Linux"; then
|
||||
# We need to indicate the target for cross builds
|
||||
ac_add_options --target=x86_64-apple-darwin
|
||||
export MKFSHFS=$topsrcdir/hfsplus-tools/newfs_hfs
|
||||
export DMG_TOOL=$topsrcdir/dmg/dmg
|
||||
export HFS_TOOL=$topsrcdir/dmg/hfsplus
|
||||
export MKFSHFS=$MOZ_FETCHES_DIR/hfsplus-tools/newfs_hfs
|
||||
export DMG_TOOL=$MOZ_FETCHES_DIR/dmg/dmg
|
||||
export HFS_TOOL=$MOZ_FETCHES_DIR/dmg/hfsplus
|
||||
fi
|
||||
|
||||
ac_add_options --with-l10n-base=../../l10n
|
||||
|
@ -4,9 +4,9 @@
|
||||
if test `uname -s` = "Linux"; then
|
||||
# We need to indicate the target for cross builds
|
||||
ac_add_options --target=x86_64-apple-darwin
|
||||
export MKFSHFS=$topsrcdir/hfsplus-tools/newfs_hfs
|
||||
export DMG_TOOL=$topsrcdir/dmg/dmg
|
||||
export HFS_TOOL=$topsrcdir/dmg/hfsplus
|
||||
export MKFSHFS=$MOZ_FETCHES_DIR/hfsplus-tools/newfs_hfs
|
||||
export DMG_TOOL=$MOZ_FETCHES_DIR/dmg/dmg
|
||||
export HFS_TOOL=$MOZ_FETCHES_DIR/dmg/hfsplus
|
||||
fi
|
||||
|
||||
ac_add_options --with-l10n-base=../../l10n
|
||||
|
@ -1,8 +1,8 @@
|
||||
# This mozconfig is responsible merely for getting the cross tools setup
|
||||
# for repacking a .tar into a .dmg as returned from signing.
|
||||
|
||||
export MKFSHFS=$topsrcdir/hfsplus-tools/newfs_hfs
|
||||
export DMG_TOOL=$topsrcdir/dmg/dmg
|
||||
export HFS_TOOL=$topsrcdir/dmg/hfsplus
|
||||
export NODEJS=$topsrcdir/node/bin/node
|
||||
export MKFSHFS=$MOZ_FETCHES_DIR/hfsplus-tools/newfs_hfs
|
||||
export DMG_TOOL=$MOZ_FETCHES_DIR/dmg/dmg
|
||||
export HFS_TOOL=$MOZ_FETCHES_DIR/dmg/hfsplus
|
||||
export NODEJS=$MOZ_FETCHES_DIR/node/bin/node
|
||||
ac_add_options --disable-compile-environment
|
||||
|
@ -46,24 +46,24 @@ ac_add_options --disable-webrtc # Bug 1393901
|
||||
ac_add_options --disable-geckodriver # Bug 1489320
|
||||
|
||||
# Find our toolchain
|
||||
HOST_CC="$TOOLTOOL_DIR/clang/bin/clang"
|
||||
HOST_CXX="$TOOLTOOL_DIR/clang/bin/clang++"
|
||||
CC="$TOOLTOOL_DIR/clang/bin/i686-w64-mingw32-clang"
|
||||
CXX="$TOOLTOOL_DIR/clang/bin/i686-w64-mingw32-clang++"
|
||||
HOST_CC="$MOZ_FETCHES_DIR/clang/bin/clang"
|
||||
HOST_CXX="$MOZ_FETCHES_DIR/clang/bin/clang++"
|
||||
CC="$MOZ_FETCHES_DIR/clang/bin/i686-w64-mingw32-clang"
|
||||
CXX="$MOZ_FETCHES_DIR/clang/bin/i686-w64-mingw32-clang++"
|
||||
ac_add_options --with-clang-path="$CC"
|
||||
ac_add_options --with-libclang-path="$TOOLTOOL_DIR/clang/lib"
|
||||
ac_add_options --with-libclang-path="$MOZ_FETCHES_DIR/clang/lib"
|
||||
CXXFLAGS="-fms-extensions"
|
||||
AR=llvm-ar
|
||||
RANLIB=llvm-ranlib
|
||||
|
||||
# For Stylo
|
||||
BINDGEN_CFLAGS="-I$TOOLTOOL_DIR/clang/i686-w64-mingw32/include/c++/v1 -I$TOOLTOOL_DIR/clang/i686-w64-mingw32/include"
|
||||
BINDGEN_CFLAGS="-I$MOZ_FETCHES_DIR/clang/i686-w64-mingw32/include/c++/v1 -I$MOZ_FETCHES_DIR/clang/i686-w64-mingw32/include"
|
||||
|
||||
# We want to make sure we use binutils and other binaries in the tooltool
|
||||
# package.
|
||||
mk_add_options "export PATH=$TOOLTOOL_DIR/clang/bin:$TOOLTOOL_DIR/mingw32/bin:$TOOLTOOL_DIR/wine/bin:$TOOLTOOL_DIR/upx/bin:$TOOLTOOL_DIR/fxc2/bin:$PATH"
|
||||
mk_add_options "export PATH=$MOZ_FETCHES_DIR/clang/bin:$MOZ_FETCHES_DIR/mingw32/bin:$MOZ_FETCHES_DIR/wine/bin:$MOZ_FETCHES_DIR/upx/bin:$MOZ_FETCHES_DIR/fxc2/bin:$PATH"
|
||||
|
||||
LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$TOOLTOOL_DIR/mingw32/lib64:$TOOLTOOL_DIR/clang/lib
|
||||
LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$MOZ_FETCHES_DIR/mingw32/lib64:$MOZ_FETCHES_DIR/clang/lib
|
||||
mk_add_options "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH"
|
||||
|
||||
# Do not include the visual studio related mozconfigs of course
|
||||
|
@ -18,8 +18,8 @@ export MOZILLA_OFFICIAL=1
|
||||
# Package js shell.
|
||||
export MOZ_PACKAGE_JSSHELL=1
|
||||
|
||||
if [ -d "$topsrcdir/clang" ]; then
|
||||
CLANG_LIB_DIR="$(cd $topsrcdir/clang/lib/clang/* && cd lib/windows && pwd)"
|
||||
if [ -d "$MOZ_FETCHES_DIR/clang" ]; then
|
||||
CLANG_LIB_DIR="$(cd $MOZ_FETCHES_DIR/clang/lib/clang/* && cd lib/windows && pwd)"
|
||||
|
||||
export LIB=$LIB:$CLANG_LIB_DIR
|
||||
export LDFLAGS="clang_rt.profile-x86_64.lib"
|
||||
|
@ -46,24 +46,24 @@ ac_add_options --disable-webrtc # Bug 1393901
|
||||
ac_add_options --disable-geckodriver # Bug 1489320
|
||||
|
||||
# Find our toolchain
|
||||
HOST_CC="$TOOLTOOL_DIR/clang/bin/clang"
|
||||
HOST_CXX="$TOOLTOOL_DIR/clang/bin/clang++"
|
||||
CC="$TOOLTOOL_DIR/clang/bin/x86_64-w64-mingw32-clang"
|
||||
CXX="$TOOLTOOL_DIR/clang/bin/x86_64-w64-mingw32-clang++"
|
||||
HOST_CC="$MOZ_FETCHES_DIR/clang/bin/clang"
|
||||
HOST_CXX="$MOZ_FETCHES_DIR/clang/bin/clang++"
|
||||
CC="$MOZ_FETCHES_DIR/clang/bin/x86_64-w64-mingw32-clang"
|
||||
CXX="$MOZ_FETCHES_DIR/clang/bin/x86_64-w64-mingw32-clang++"
|
||||
ac_add_options --with-clang-path="$CC"
|
||||
ac_add_options --with-libclang-path="$TOOLTOOL_DIR/clang/lib"
|
||||
ac_add_options --with-libclang-path="$MOZ_FETCHES_DIR/clang/lib"
|
||||
CXXFLAGS="-fms-extensions"
|
||||
AR=llvm-ar
|
||||
RANLIB=llvm-ranlib
|
||||
|
||||
# For Stylo
|
||||
BINDGEN_CFLAGS="-I$TOOLTOOL_DIR/clang/x86_64-w64-mingw32/include/c++/v1 -I$TOOLTOOL_DIR/clang/x86_64-w64-mingw32/include"
|
||||
BINDGEN_CFLAGS="-I$MOZ_FETCHES_DIR/clang/x86_64-w64-mingw32/include/c++/v1 -I$MOZ_FETCHES_DIR/clang/x86_64-w64-mingw32/include"
|
||||
|
||||
# We want to make sure we use binutils and other binaries in the tooltool
|
||||
# package.
|
||||
mk_add_options "export PATH=$TOOLTOOL_DIR/clang/bin:$TOOLTOOL_DIR/mingw32/bin:$TOOLTOOL_DIR/wine/bin:$TOOLTOOL_DIR/upx/bin:$TOOLTOOL_DIR/fxc2/bin:$PATH"
|
||||
mk_add_options "export PATH=$MOZ_FETCHES_DIR/clang/bin:$MOZ_FETCHES_DIR/mingw32/bin:$MOZ_FETCHES_DIR/wine/bin:$MOZ_FETCHES_DIR/upx/bin:$MOZ_FETCHES_DIR/fxc2/bin:$PATH"
|
||||
|
||||
LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$TOOLTOOL_DIR/mingw32/lib64:$TOOLTOOL_DIR/clang/lib
|
||||
LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$MOZ_FETCHES_DIR/mingw32/lib64:$MOZ_FETCHES_DIR/clang/lib
|
||||
mk_add_options "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH"
|
||||
|
||||
# Do not include the visual studio related mozconfigs of course
|
||||
|
@ -1,15 +1,15 @@
|
||||
TOOLTOOL_DIR=${topsrcdir}
|
||||
export MAKECAB=$TOOLTOOL_DIR/makecab.exe
|
||||
export LLVM_CONFIG="${TOOLTOOL_DIR}/clang/bin/llvm-config"
|
||||
export LLVM_CONFIG="${MOZ_FETCHES_DIR}/clang/bin/llvm-config"
|
||||
|
||||
RUSTC="${TOOLTOOL_DIR}/rustc/bin/rustc"
|
||||
CARGO="${TOOLTOOL_DIR}/rustc/bin/cargo"
|
||||
RUSTDOC="${TOOLTOOL_DIR}/rustc/bin/rustdoc"
|
||||
RUSTFMT="${TOOLTOOL_DIR}/rustc/bin/rustfmt"
|
||||
CBINDGEN="${TOOLTOOL_DIR}/cbindgen/cbindgen"
|
||||
RUSTC="${MOZ_FETCHES_DIR}/rustc/bin/rustc"
|
||||
CARGO="${MOZ_FETCHES_DIR}/rustc/bin/cargo"
|
||||
RUSTDOC="${MOZ_FETCHES_DIR}/rustc/bin/rustdoc"
|
||||
RUSTFMT="${MOZ_FETCHES_DIR}/rustc/bin/rustfmt"
|
||||
CBINDGEN="${MOZ_FETCHES_DIR}/cbindgen/cbindgen"
|
||||
|
||||
NASM="${TOOLTOOL_DIR}/nasm/nasm.exe"
|
||||
NODEJS="${TOOLTOOL_DIR}/node/node.exe"
|
||||
NASM="${MOZ_FETCHES_DIR}/nasm/nasm.exe"
|
||||
NODEJS="${MOZ_FETCHES_DIR}/node/node.exe"
|
||||
|
||||
ac_add_options --target=x86_64-pc-mingw32
|
||||
|
||||
|
@ -220,23 +220,6 @@
|
||||
],
|
||||
"revision": "default"
|
||||
},
|
||||
"crh": {
|
||||
"platforms": [
|
||||
"linux",
|
||||
"linux-devedition",
|
||||
"linux64",
|
||||
"linux64-devedition",
|
||||
"macosx64",
|
||||
"macosx64-devedition",
|
||||
"win32",
|
||||
"win32-devedition",
|
||||
"win64",
|
||||
"win64-aarch64",
|
||||
"win64-aarch64-devedition",
|
||||
"win64-devedition"
|
||||
],
|
||||
"revision": "default"
|
||||
},
|
||||
"cs": {
|
||||
"platforms": [
|
||||
"linux",
|
||||
|
@ -346,12 +346,13 @@ def build_one_stage(cc, cxx, asm, ld, ar, ranlib, libtool,
|
||||
android_link_flags = "-fuse-ld=lld"
|
||||
|
||||
for target, cfg in android_targets.items():
|
||||
sysroot_dir = cfg["ndk_sysroot"]
|
||||
android_gcc_dir = cfg["ndk_toolchain"]
|
||||
sysroot_dir = cfg["ndk_sysroot"].format(**os.environ)
|
||||
android_gcc_dir = cfg["ndk_toolchain"].format(**os.environ)
|
||||
android_include_dirs = cfg["ndk_includes"]
|
||||
api_level = cfg["api_level"]
|
||||
|
||||
android_flags = ["-isystem %s" % d for d in android_include_dirs]
|
||||
android_flags = ["-isystem %s" % d.format(**os.environ)
|
||||
for d in android_include_dirs]
|
||||
android_flags += ["--gcc-toolchain=%s" % android_gcc_dir]
|
||||
android_flags += ["-D__ANDROID_API__=%s" % api_level]
|
||||
|
||||
@ -439,7 +440,7 @@ def build_one_stage(cc, cxx, asm, ld, ar, ranlib, libtool,
|
||||
def get_tool(config, key):
|
||||
f = None
|
||||
if key in config:
|
||||
f = config[key]
|
||||
f = config[key].format(**os.environ)
|
||||
if os.path.isabs(f):
|
||||
if not os.path.exists(f):
|
||||
raise ValueError("%s must point to an existing path" % key)
|
||||
@ -626,7 +627,7 @@ if __name__ == "__main__":
|
||||
python_path = config["python_path"]
|
||||
gcc_dir = None
|
||||
if "gcc_dir" in config:
|
||||
gcc_dir = config["gcc_dir"]
|
||||
gcc_dir = config["gcc_dir"].format(**os.environ)
|
||||
if not os.path.exists(gcc_dir):
|
||||
raise ValueError("gcc_dir must point to an existing path")
|
||||
ndk_dir = None
|
||||
|
@ -4,9 +4,9 @@
|
||||
"build_type": "Release",
|
||||
"assertions": false,
|
||||
"python_path": "/usr/bin/python2.7",
|
||||
"gcc_dir": "/builds/worker/workspace/build/gcc",
|
||||
"cc": "/builds/worker/workspace/build/gcc/bin/gcc",
|
||||
"cxx": "/builds/worker/workspace/build/gcc/bin/g++",
|
||||
"as": "/builds/worker/workspace/build/gcc/bin/gcc",
|
||||
"gcc_dir": "{MOZ_FETCHES_DIR}/gcc",
|
||||
"cc": "{MOZ_FETCHES_DIR}/gcc/bin/gcc",
|
||||
"cxx": "{MOZ_FETCHES_DIR}/gcc/bin/g++",
|
||||
"as": "{MOZ_FETCHES_DIR}/gcc/bin/gcc",
|
||||
"patches": []
|
||||
}
|
||||
|
@ -4,10 +4,10 @@
|
||||
"build_type": "Release",
|
||||
"assertions": false,
|
||||
"python_path": "/usr/bin/python2.7",
|
||||
"gcc_dir": "/builds/worker/workspace/build/gcc",
|
||||
"cc": "/builds/worker/workspace/build/gcc/bin/gcc",
|
||||
"cxx": "/builds/worker/workspace/build/gcc/bin/g++",
|
||||
"as": "/builds/worker/workspace/build/gcc/bin/gcc",
|
||||
"gcc_dir": "{MOZ_FETCHES_DIR}/gcc",
|
||||
"cc": "{MOZ_FETCHES_DIR}/gcc/bin/gcc",
|
||||
"cxx": "{MOZ_FETCHES_DIR}/gcc/bin/g++",
|
||||
"as": "{MOZ_FETCHES_DIR}/gcc/bin/gcc",
|
||||
"patches": [
|
||||
"static-llvm-symbolizer.patch",
|
||||
"find_symbolizer_linux.patch",
|
||||
|
@ -4,44 +4,44 @@
|
||||
"build_type": "Release",
|
||||
"assertions": false,
|
||||
"python_path": "/usr/bin/python2.7",
|
||||
"gcc_dir": "/builds/worker/workspace/build/gcc",
|
||||
"cc": "/builds/worker/workspace/build/gcc/bin/gcc",
|
||||
"cxx": "/builds/worker/workspace/build/gcc/bin/g++",
|
||||
"as": "/builds/worker/workspace/build/gcc/bin/gcc",
|
||||
"gcc_dir": "{MOZ_FETCHES_DIR}/gcc",
|
||||
"cc": "{MOZ_FETCHES_DIR}/gcc/bin/gcc",
|
||||
"cxx": "{MOZ_FETCHES_DIR}/gcc/bin/g++",
|
||||
"as": "{MOZ_FETCHES_DIR}/gcc/bin/gcc",
|
||||
"android_targets": {
|
||||
"armv7-linux-android": {
|
||||
"ndk_toolchain": "/builds/worker/workspace/build/android-ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64",
|
||||
"ndk_sysroot": "/builds/worker/workspace/build/android-ndk/platforms/android-16/arch-arm",
|
||||
"ndk_toolchain": "{MOZ_FETCHES_DIR}/android-ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64",
|
||||
"ndk_sysroot": "{MOZ_FETCHES_DIR}/android-ndk/platforms/android-16/arch-arm",
|
||||
"ndk_includes": [
|
||||
"/builds/worker/workspace/build/android-ndk/sysroot/usr/include/arm-linux-androideabi",
|
||||
"/builds/worker/workspace/build/android-ndk/sysroot/usr/include"
|
||||
"{MOZ_FETCHES_DIR}/android-ndk/sysroot/usr/include/arm-linux-androideabi",
|
||||
"{MOZ_FETCHES_DIR}/android-ndk/sysroot/usr/include"
|
||||
],
|
||||
"api_level": 16
|
||||
},
|
||||
"i686-linux-android": {
|
||||
"ndk_toolchain": "/builds/worker/workspace/build/android-ndk/toolchains/x86-4.9/prebuilt/linux-x86_64",
|
||||
"ndk_sysroot": "/builds/worker/workspace/build/android-ndk/platforms/android-16/arch-x86",
|
||||
"ndk_toolchain": "{MOZ_FETCHES_DIR}/android-ndk/toolchains/x86-4.9/prebuilt/linux-x86_64",
|
||||
"ndk_sysroot": "{MOZ_FETCHES_DIR}/android-ndk/platforms/android-16/arch-x86",
|
||||
"ndk_includes": [
|
||||
"/builds/worker/workspace/build/android-ndk/sysroot/usr/include/i686-linux-android",
|
||||
"/builds/worker/workspace/build/android-ndk/sysroot/usr/include"
|
||||
"{MOZ_FETCHES_DIR}/android-ndk/sysroot/usr/include/i686-linux-android",
|
||||
"{MOZ_FETCHES_DIR}/android-ndk/sysroot/usr/include"
|
||||
],
|
||||
"api_level": 16
|
||||
},
|
||||
"aarch64-linux-android": {
|
||||
"ndk_toolchain": "/builds/worker/workspace/build/android-ndk/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64",
|
||||
"ndk_sysroot": "/builds/worker/workspace/build/android-ndk/platforms/android-21/arch-arm64",
|
||||
"ndk_toolchain": "{MOZ_FETCHES_DIR}/android-ndk/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64",
|
||||
"ndk_sysroot": "{MOZ_FETCHES_DIR}/android-ndk/platforms/android-21/arch-arm64",
|
||||
"ndk_includes": [
|
||||
"/builds/worker/workspace/build/android-ndk/sysroot/usr/include/aarch64-linux-android",
|
||||
"/builds/worker/workspace/build/android-ndk/sysroot/usr/include"
|
||||
"{MOZ_FETCHES_DIR}/android-ndk/sysroot/usr/include/aarch64-linux-android",
|
||||
"{MOZ_FETCHES_DIR}/android-ndk/sysroot/usr/include"
|
||||
],
|
||||
"api_level": 21
|
||||
},
|
||||
"x86_64-linux-android": {
|
||||
"ndk_toolchain": "/builds/worker/workspace/build/android-ndk/toolchains/x86_64-4.9/prebuilt/linux-x86_64",
|
||||
"ndk_sysroot": "/builds/worker/workspace/build/android-ndk/platforms/android-21/arch-x86_64",
|
||||
"ndk_toolchain": "{MOZ_FETCHES_DIR}/android-ndk/toolchains/x86_64-4.9/prebuilt/linux-x86_64",
|
||||
"ndk_sysroot": "{MOZ_FETCHES_DIR}/android-ndk/platforms/android-21/arch-x86_64",
|
||||
"ndk_includes": [
|
||||
"/builds/worker/workspace/build/android-ndk/sysroot/usr/include/x86_64-linux-android",
|
||||
"/builds/worker/workspace/build/android-ndk/sysroot/usr/include"
|
||||
"{MOZ_FETCHES_DIR}/android-ndk/sysroot/usr/include/x86_64-linux-android",
|
||||
"{MOZ_FETCHES_DIR}/android-ndk/sysroot/usr/include"
|
||||
],
|
||||
"api_level": 21
|
||||
}
|
||||
|
@ -4,10 +4,10 @@
|
||||
"build_type": "Release",
|
||||
"assertions": false,
|
||||
"python_path": "/usr/bin/python2.7",
|
||||
"gcc_dir": "/builds/worker/workspace/build/gcc",
|
||||
"cc": "/builds/worker/workspace/build/gcc/bin/gcc",
|
||||
"cxx": "/builds/worker/workspace/build/gcc/bin/g++",
|
||||
"as": "/builds/worker/workspace/build/gcc/bin/gcc",
|
||||
"gcc_dir": "{MOZ_FETCHES_DIR}/gcc",
|
||||
"cc": "{MOZ_FETCHES_DIR}/gcc/bin/gcc",
|
||||
"cxx": "{MOZ_FETCHES_DIR}/gcc/bin/g++",
|
||||
"as": "{MOZ_FETCHES_DIR}/gcc/bin/gcc",
|
||||
"extra_targets": [
|
||||
"aarch64-unknown-linux-gnu"
|
||||
],
|
||||
|
@ -4,10 +4,10 @@
|
||||
"build_type": "Release",
|
||||
"assertions": false,
|
||||
"python_path": "/usr/bin/python2.7",
|
||||
"gcc_dir": "/builds/worker/workspace/build/gcc",
|
||||
"cc": "/builds/worker/workspace/build/gcc/bin/gcc",
|
||||
"cxx": "/builds/worker/workspace/build/gcc/bin/g++",
|
||||
"as": "/builds/worker/workspace/build/gcc/bin/gcc",
|
||||
"gcc_dir": "{MOZ_FETCHES_DIR}/gcc",
|
||||
"cc": "{MOZ_FETCHES_DIR}/gcc/bin/gcc",
|
||||
"cxx": "{MOZ_FETCHES_DIR}/gcc/bin/g++",
|
||||
"as": "{MOZ_FETCHES_DIR}/gcc/bin/gcc",
|
||||
"patches": [
|
||||
"static-llvm-symbolizer.patch",
|
||||
"find_symbolizer_linux.patch",
|
||||
|
@ -5,14 +5,14 @@
|
||||
"assertions": false,
|
||||
"osx_cross_compile": true,
|
||||
"python_path": "/usr/bin/python2.7",
|
||||
"gcc_dir": "/builds/worker/workspace/build/gcc",
|
||||
"cc": "/builds/worker/workspace/build/clang/bin/clang",
|
||||
"cxx": "/builds/worker/workspace/build/clang/bin/clang++",
|
||||
"as": "/builds/worker/workspace/build/clang/bin/clang",
|
||||
"ar": "/builds/worker/workspace/build/cctools/bin/x86_64-apple-darwin-ar",
|
||||
"ranlib": "/builds/worker/workspace/build/cctools/bin/x86_64-apple-darwin-ranlib",
|
||||
"libtool": "/builds/worker/workspace/build/cctools/bin/x86_64-apple-darwin-libtool",
|
||||
"ld": "/builds/worker/workspace/build/clang/bin/clang",
|
||||
"gcc_dir": "{MOZ_FETCHES_DIR}/gcc",
|
||||
"cc": "{MOZ_FETCHES_DIR}/clang/bin/clang",
|
||||
"cxx": "{MOZ_FETCHES_DIR}/clang/bin/clang++",
|
||||
"as": "{MOZ_FETCHES_DIR}/clang/bin/clang",
|
||||
"ar": "{MOZ_FETCHES_DIR}/cctools/bin/x86_64-apple-darwin-ar",
|
||||
"ranlib": "{MOZ_FETCHES_DIR}/cctools/bin/x86_64-apple-darwin-ranlib",
|
||||
"libtool": "{MOZ_FETCHES_DIR}/cctools/bin/x86_64-apple-darwin-libtool",
|
||||
"ld": "{MOZ_FETCHES_DIR}/clang/bin/clang",
|
||||
"patches": [
|
||||
"static-llvm-symbolizer.patch",
|
||||
"rename_gcov_flush.patch",
|
||||
|
@ -4,10 +4,10 @@
|
||||
"build_type": "Release",
|
||||
"assertions": false,
|
||||
"python_path": "/usr/bin/python2.7",
|
||||
"gcc_dir": "/builds/worker/workspace/build/gcc",
|
||||
"cc": "/builds/worker/workspace/build/gcc/bin/gcc",
|
||||
"cxx": "/builds/worker/workspace/build/gcc/bin/g++",
|
||||
"as": "/builds/worker/workspace/build/gcc/bin/gcc",
|
||||
"gcc_dir": "{MOZ_FETCHES_DIR}/gcc",
|
||||
"cc": "{MOZ_FETCHES_DIR}/gcc/bin/gcc",
|
||||
"cxx": "{MOZ_FETCHES_DIR}/gcc/bin/g++",
|
||||
"as": "{MOZ_FETCHES_DIR}/gcc/bin/gcc",
|
||||
"patches": [
|
||||
"mingwclang-llvm-objcopy-COFF-Remove-a-superfluous-namespace-qua.patch",
|
||||
"mingwclang-llvm-objcopy-COFF-Add-support-for-removing-sections.patch",
|
||||
|
@ -5,10 +5,10 @@
|
||||
"assertions": false,
|
||||
"build_clang_tidy": true,
|
||||
"python_path": "/usr/bin/python2.7",
|
||||
"gcc_dir": "/builds/worker/workspace/build/gcc",
|
||||
"cc": "/builds/worker/workspace/build/gcc/bin/gcc",
|
||||
"cxx": "/builds/worker/workspace/build/gcc/bin/g++",
|
||||
"as": "/builds/worker/workspace/build/gcc/bin/gcc",
|
||||
"gcc_dir": "{MOZ_FETCHES_DIR}/gcc",
|
||||
"cc": "{MOZ_FETCHES_DIR}/gcc/bin/gcc",
|
||||
"cxx": "{MOZ_FETCHES_DIR}/gcc/bin/g++",
|
||||
"as": "{MOZ_FETCHES_DIR}/gcc/bin/gcc",
|
||||
"patches": [
|
||||
"clang-tidy-8.patch"
|
||||
]
|
||||
|
@ -6,14 +6,14 @@
|
||||
"build_clang_tidy": true,
|
||||
"osx_cross_compile": true,
|
||||
"python_path": "/usr/bin/python2.7",
|
||||
"gcc_dir": "/builds/worker/workspace/build/gcc",
|
||||
"cc": "/builds/worker/workspace/build/clang/bin/clang",
|
||||
"cxx": "/builds/worker/workspace/build/clang/bin/clang++",
|
||||
"as": "/builds/worker/workspace/build/clang/bin/clang",
|
||||
"ar": "/builds/worker/workspace/build/cctools/bin/x86_64-apple-darwin-ar",
|
||||
"ranlib": "/builds/worker/workspace/build/cctools/bin/x86_64-apple-darwin-ranlib",
|
||||
"libtool": "/builds/worker/workspace/build/cctools/bin/x86_64-apple-darwin-libtool",
|
||||
"ld": "/builds/worker/workspace/build/clang/bin/clang",
|
||||
"gcc_dir": "{MOZ_FETCHES_DIR}/gcc",
|
||||
"cc": "{MOZ_FETCHES_DIR}/clang/bin/clang",
|
||||
"cxx": "{MOZ_FETCHES_DIR}/clang/bin/clang++",
|
||||
"as": "{MOZ_FETCHES_DIR}/clang/bin/clang",
|
||||
"ar": "{MOZ_FETCHES_DIR}/cctools/bin/x86_64-apple-darwin-ar",
|
||||
"ranlib": "{MOZ_FETCHES_DIR}/cctools/bin/x86_64-apple-darwin-ranlib",
|
||||
"libtool": "{MOZ_FETCHES_DIR}/cctools/bin/x86_64-apple-darwin-libtool",
|
||||
"ld": "{MOZ_FETCHES_DIR}/clang/bin/clang",
|
||||
"patches": [
|
||||
"clang-tidy-8.patch",
|
||||
"compiler-rt-no-codesign.patch"
|
||||
|
@ -7,10 +7,10 @@ MOZ_AUTOMATION_L10N_CHECK=0
|
||||
. "$topsrcdir/build/mozconfig.common"
|
||||
|
||||
# cctools for ld, ar, and other related tools ; dsymutil for rust.
|
||||
mk_add_options "export PATH=$topsrcdir/cctools/bin:$topsrcdir/binutils/bin:$topsrcdir/llvm-dsymutil/bin:$PATH"
|
||||
mk_add_options "export PATH=$MOZ_FETCHES_DIR/cctools/bin:$MOZ_FETCHES_DIR/binutils/bin:$MOZ_FETCHES_DIR/llvm-dsymutil/bin:$PATH"
|
||||
|
||||
# dsymutil needs a libstdc++ more recent than what's on the system.
|
||||
mk_add_options "export LD_LIBRARY_PATH=$topsrcdir/clang/lib"
|
||||
mk_add_options "export LD_LIBRARY_PATH=$MOZ_FETCHES_DIR/clang/lib"
|
||||
|
||||
# This SDK was copied from a local XCode install and uploaded to tooltool.
|
||||
# Generate the tarball by running this command with the proper SDK version:
|
||||
@ -21,17 +21,17 @@ mk_add_options "export LD_LIBRARY_PATH=$topsrcdir/clang/lib"
|
||||
CROSS_SYSROOT=$topsrcdir/MacOSX10.11.sdk
|
||||
CROSS_PRIVATE_FRAMEWORKS=$CROSS_SYSROOT/System/Library/PrivateFrameworks
|
||||
|
||||
export CC="$topsrcdir/clang/bin/clang"
|
||||
export CXX="$topsrcdir/clang/bin/clang++"
|
||||
export CC="$MOZ_FETCHES_DIR/clang/bin/clang"
|
||||
export CXX="$MOZ_FETCHES_DIR/clang/bin/clang++"
|
||||
export CFLAGS="$CFLAGS -fcrash-diagnostics-dir=${UPLOAD_PATH}"
|
||||
export CXXFLAGS="$CXXFLAGS -fcrash-diagnostics-dir=${UPLOAD_PATH}"
|
||||
export LLVMCONFIG=$topsrcdir/clang/bin/llvm-config
|
||||
export LLVMCONFIG=$MOZ_FETCHES_DIR/clang/bin/llvm-config
|
||||
export BINDGEN_CFLAGS="-isysroot $CROSS_SYSROOT"
|
||||
export DSYMUTIL=$topsrcdir/build/macosx/llvm-dsymutil
|
||||
mk_add_options "export REAL_DSYMUTIL=$topsrcdir/llvm-dsymutil/bin/dsymutil"
|
||||
export MKFSHFS=$topsrcdir/hfsplus-tools/newfs_hfs
|
||||
export DMG_TOOL=$topsrcdir/dmg/dmg
|
||||
export HFS_TOOL=$topsrcdir/dmg/hfsplus
|
||||
mk_add_options "export REAL_DSYMUTIL=$MOZ_FETCHES_DIR/llvm-dsymutil/bin/dsymutil"
|
||||
export MKFSHFS=$MOZ_FETCHES_DIR/hfsplus-tools/newfs_hfs
|
||||
export DMG_TOOL=$MOZ_FETCHES_DIR/dmg/dmg
|
||||
export HFS_TOOL=$MOZ_FETCHES_DIR/dmg/hfsplus
|
||||
|
||||
export HOST_CFLAGS="-g"
|
||||
export HOST_CXXFLAGS="-g"
|
||||
|
@ -4,26 +4,16 @@
|
||||
|
||||
. "$topsrcdir/build/mozconfig.common"
|
||||
|
||||
if [ -d "$topsrcdir/clang" ]; then
|
||||
if [ -d "$MOZ_FETCHES_DIR/clang" ]; then
|
||||
# mozilla-central based build
|
||||
export CC=$topsrcdir/clang/bin/clang
|
||||
export CXX=$topsrcdir/clang/bin/clang++
|
||||
export LLVMCONFIG=$topsrcdir/clang/bin/llvm-config
|
||||
export DSYMUTIL=$topsrcdir/clang/bin/llvm-dsymutil
|
||||
export CC=$MOZ_FETCHES_DIR/clang/bin/clang
|
||||
export CXX=$MOZ_FETCHES_DIR/clang/bin/clang++
|
||||
export LLVMCONFIG=$MOZ_FETCHES_DIR/clang/bin/llvm-config
|
||||
export DSYMUTIL=$MOZ_FETCHES_DIR/clang/bin/llvm-dsymutil
|
||||
# Use an updated linker.
|
||||
ldflags="-B$topsrcdir/cctools/bin"
|
||||
export AR=$topsrcdir/cctools/bin/ar
|
||||
export RANLIB=$topsrcdir/cctools/bin/ranlib
|
||||
elif [ -d "$topsrcdir/../clang" ]; then
|
||||
# comm-central based build
|
||||
export CC=$topsrcdir/../clang/bin/clang
|
||||
export CXX=$topsrcdir/../clang/bin/clang++
|
||||
export LLVMCONFIG=$topsrcdir/../clang/bin/llvm-config
|
||||
export DSYMUTIL=$topsrcdir/../clang/bin/llvm-dsymutil
|
||||
# Use an updated linker.
|
||||
ldflags="-B$topsrcdir/../cctools/bin"
|
||||
export AR=$topsrcdir/../cctools/bin/ar
|
||||
export RANLIB=$topsrcdir/../cctools/bin/ranlib
|
||||
ldflags="-B$MOZ_FETCHES_DIR/cctools/bin"
|
||||
export AR=$MOZ_FETCHES_DIR/cctools/bin/ar
|
||||
export RANLIB=$MOZ_FETCHES_DIR/cctools/bin/ranlib
|
||||
fi
|
||||
|
||||
# Ensure the updated linker doesn't generate things our older build tools
|
||||
|
@ -58,7 +58,7 @@ if test -n "$bucket"; then
|
||||
else
|
||||
mk_add_options "export SCCACHE_BUCKET=$bucket"
|
||||
fi
|
||||
export CCACHE="$topsrcdir/sccache/sccache"
|
||||
export CCACHE="$MOZ_FETCHES_DIR/sccache/sccache"
|
||||
export SCCACHE_VERBOSE_STATS=1
|
||||
mk_add_options MOZBUILD_MANAGE_SCCACHE_DAEMON=${topsrcdir}/sccache/sccache
|
||||
mk_add_options MOZBUILD_MANAGE_SCCACHE_DAEMON=${MOZ_FETCHES_DIR}/sccache/sccache
|
||||
fi
|
||||
|
@ -1,9 +1,9 @@
|
||||
if test -d "$topsrcdir/clang/bin"; then
|
||||
CLANG_DIR=`cd "$topsrcdir/clang/bin" ; pwd`
|
||||
if test -d "$MOZ_FETCHES_DIR/clang/bin"; then
|
||||
CLANG_DIR=`cd "$MOZ_FETCHES_DIR/clang/bin" ; pwd`
|
||||
export PATH="${CLANG_DIR}:${PATH}"
|
||||
|
||||
if $(cd $topsrcdir/clang/lib/clang/* && test -d lib/windows); then
|
||||
CLANG_LIB_DIR="$(cd $topsrcdir/clang/lib/clang/* && cd lib/windows && pwd)"
|
||||
if $(cd $MOZ_FETCHES_DIR/clang/lib/clang/* && test -d lib/windows); then
|
||||
CLANG_LIB_DIR="$(cd $MOZ_FETCHES_DIR/clang/lib/clang/* && cd lib/windows && pwd)"
|
||||
export LIB=$LIB:$CLANG_LIB_DIR
|
||||
fi
|
||||
fi
|
||||
|
@ -1,5 +1,5 @@
|
||||
if test -d "$topsrcdir/clang/bin"; then
|
||||
CLANG_DIR=`cd "$topsrcdir/clang/bin" ; pwd`
|
||||
if test -d "$MOZ_FETCHES_DIR/clang/bin"; then
|
||||
CLANG_DIR=`cd "$MOZ_FETCHES_DIR/clang/bin" ; pwd`
|
||||
export PATH="${CLANG_DIR}:${PATH}"
|
||||
fi
|
||||
|
||||
|
@ -4,9 +4,9 @@
|
||||
|
||||
case "$(uname -s)" in
|
||||
MINGW*)
|
||||
export NASM=$topsrcdir/nasm/nasm.exe
|
||||
export NASM=$MOZ_FETCHES_DIR/nasm/nasm.exe
|
||||
;;
|
||||
*)
|
||||
export NASM=$topsrcdir/nasm/nasm
|
||||
export NASM=$MOZ_FETCHES_DIR/nasm/nasm
|
||||
;;
|
||||
esac
|
||||
|
@ -4,9 +4,9 @@
|
||||
|
||||
case "$(uname -s)" in
|
||||
MINGW*)
|
||||
export NODEJS=$topsrcdir/node/node.exe
|
||||
export NODEJS=$MOZ_FETCHES_DIR/node/node.exe
|
||||
;;
|
||||
*)
|
||||
export NODEJS=$topsrcdir/node/bin/node
|
||||
export NODEJS=$MOZ_FETCHES_DIR/node/bin/node
|
||||
;;
|
||||
esac
|
||||
|
@ -3,10 +3,10 @@
|
||||
TOOLTOOL_DIR=${TOOLTOOL_DIR:-$topsrcdir}
|
||||
|
||||
# Tell configure to use the tooltool rustc.
|
||||
RUSTC="$TOOLTOOL_DIR/rustc/bin/rustc"
|
||||
CARGO="$TOOLTOOL_DIR/rustc/bin/cargo"
|
||||
RUSTDOC="$TOOLTOOL_DIR/rustc/bin/rustdoc"
|
||||
RUSTFMT="$TOOLTOOL_DIR/rustc/bin/rustfmt"
|
||||
CBINDGEN="$TOOLTOOL_DIR/cbindgen/cbindgen"
|
||||
RUSTC="$MOZ_FETCHES_DIR/rustc/bin/rustc"
|
||||
CARGO="$MOZ_FETCHES_DIR/rustc/bin/cargo"
|
||||
RUSTDOC="$MOZ_FETCHES_DIR/rustc/bin/rustdoc"
|
||||
RUSTFMT="$MOZ_FETCHES_DIR/rustc/bin/rustfmt"
|
||||
CBINDGEN="$MOZ_FETCHES_DIR/cbindgen/cbindgen"
|
||||
|
||||
ac_add_options --enable-rust-simd
|
||||
|
@ -1,2 +1,2 @@
|
||||
# Tell the build system where to find llvm-config for builds on automation.
|
||||
export LLVM_CONFIG="${TOOLTOOL_DIR:-$topsrcdir}/clang/bin/llvm-config"
|
||||
export LLVM_CONFIG="${MOZ_FETCHES_DIR}/clang/bin/llvm-config"
|
||||
|
@ -2,7 +2,7 @@ MOZ_AUTOMATION_L10N_CHECK=0
|
||||
|
||||
. "$topsrcdir/build/unix/mozconfig.unix"
|
||||
|
||||
export LLVM_SYMBOLIZER="$topsrcdir/clang/bin/llvm-symbolizer"
|
||||
export LLVM_SYMBOLIZER="$MOZ_FETCHES_DIR/clang/bin/llvm-symbolizer"
|
||||
#
|
||||
# Enable ASan specific code and build workarounds
|
||||
ac_add_options --enable-address-sanitizer
|
||||
|
@ -6,14 +6,14 @@ TOOLTOOL_DIR=${TOOLTOOL_DIR:-$topsrcdir}
|
||||
# Depending whether GCC was built on a RedHat-based or a Debian-based system,
|
||||
# the directory containing 32-bits libraries can be either (respectively)
|
||||
# lib or lib32. The directory for 64-bits libraries is always lib64.
|
||||
if [ -f "$TOOLTOOL_DIR/gcc/lib64/libstdc++.so" ]; then
|
||||
if [ -f "$MOZ_FETCHES_DIR/gcc/lib64/libstdc++.so" ]; then
|
||||
# We put both 32-bits and 64-bits library path in LD_LIBRARY_PATH: ld.so
|
||||
# will prefer the files in the 32-bits path when loading 32-bits executables,
|
||||
# and the files in the 64-bits path when loading 64-bits executables.
|
||||
# We also put both possible 32-bits library paths.
|
||||
LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$TOOLTOOL_DIR/gcc/lib64:$TOOLTOOL_DIR/gcc/lib32:$TOOLTOOL_DIR/gcc/lib
|
||||
elif [ -f "$TOOLTOOL_DIR/clang/lib/libstdc++.so" ]; then
|
||||
LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$TOOLTOOL_DIR/clang/lib:$TOOLTOOL_DIR/clang/lib32
|
||||
LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$MOZ_FETCHES_DIR/gcc/lib64:$MOZ_FETCHES_DIR/gcc/lib32:$MOZ_FETCHES_DIR/gcc/lib
|
||||
elif [ -f "$MOZ_FETCHES_DIR/clang/lib/libstdc++.so" ]; then
|
||||
LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$MOZ_FETCHES_DIR/clang/lib:$MOZ_FETCHES_DIR/clang/lib32
|
||||
fi
|
||||
|
||||
mk_add_options "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH"
|
||||
|
@ -2,7 +2,7 @@ MOZ_AUTOMATION_L10N_CHECK=0
|
||||
|
||||
. "$topsrcdir/build/unix/mozconfig.unix"
|
||||
|
||||
export LLVM_SYMBOLIZER="$topsrcdir/clang/bin/llvm-symbolizer"
|
||||
export LLVM_SYMBOLIZER="$MOZ_FETCHES_DIR/clang/bin/llvm-symbolizer"
|
||||
|
||||
# Enable TSan specific code and build workarounds
|
||||
ac_add_options --enable-thread-sanitizer
|
||||
|
@ -3,16 +3,16 @@
|
||||
TOOLTOOL_DIR=${TOOLTOOL_DIR:-$topsrcdir}
|
||||
|
||||
if [ -n "$FORCE_GCC" ]; then
|
||||
CC="$TOOLTOOL_DIR/gcc/bin/gcc"
|
||||
CXX="$TOOLTOOL_DIR/gcc/bin/g++"
|
||||
CC="$MOZ_FETCHES_DIR/gcc/bin/gcc"
|
||||
CXX="$MOZ_FETCHES_DIR/gcc/bin/g++"
|
||||
|
||||
# We want to make sure we use binutils and other binaries in the tooltool
|
||||
# package.
|
||||
mk_add_options "export PATH=$TOOLTOOL_DIR/gcc/bin:$PATH"
|
||||
ac_add_options --with-clang-path=$TOOLTOOL_DIR/clang/bin/clang
|
||||
mk_add_options "export PATH=$MOZ_FETCHES_DIR/gcc/bin:$PATH"
|
||||
ac_add_options --with-clang-path=$MOZ_FETCHES_DIR/clang/bin/clang
|
||||
else
|
||||
CC="$TOOLTOOL_DIR/clang/bin/clang"
|
||||
CXX="$TOOLTOOL_DIR/clang/bin/clang++"
|
||||
CC="$MOZ_FETCHES_DIR/clang/bin/clang"
|
||||
CXX="$MOZ_FETCHES_DIR/clang/bin/clang++"
|
||||
export ENABLE_CLANG_PLUGIN=1
|
||||
case "$PERFHERDER_EXTRA_OPTIONS" in
|
||||
base-toolchains*)
|
||||
@ -33,13 +33,13 @@ else
|
||||
ac_add_options --with-pgo-profile-path=/builds/worker/fetches
|
||||
fi
|
||||
fi
|
||||
export LLVM_PROFDATA="$TOOLTOOL_DIR/clang/bin/llvm-profdata"
|
||||
export AR="$topsrcdir/clang/bin/llvm-ar"
|
||||
export NM="$topsrcdir/clang/bin/llvm-nm"
|
||||
export RANLIB="$topsrcdir/clang/bin/llvm-ranlib"
|
||||
export LLVM_PROFDATA="$MOZ_FETCHES_DIR/clang/bin/llvm-profdata"
|
||||
export AR="$MOZ_FETCHES_DIR/clang/bin/llvm-ar"
|
||||
export NM="$MOZ_FETCHES_DIR/clang/bin/llvm-nm"
|
||||
export RANLIB="$MOZ_FETCHES_DIR/clang/bin/llvm-ranlib"
|
||||
fi
|
||||
|
||||
mk_add_options "export PATH=$TOOLTOOL_DIR/binutils/bin:$PATH"
|
||||
mk_add_options "export PATH=$MOZ_FETCHES_DIR/binutils/bin:$PATH"
|
||||
fi
|
||||
|
||||
. "$topsrcdir/build/unix/mozconfig.stdcxx"
|
||||
|
@ -1,13 +1,13 @@
|
||||
. "$topsrcdir/browser/config/mozconfigs/win64/common-win64"
|
||||
|
||||
if [ -d "$topsrcdir/clang" ]; then
|
||||
CLANG_LIB_DIR="$(cd $topsrcdir/clang/lib/clang/* && cd lib/windows && pwd)"
|
||||
if [ -d "$MOZ_FETCHES_DIR/clang" ]; then
|
||||
CLANG_LIB_DIR="$(cd $MOZ_FETCHES_DIR/clang/lib/clang/* && cd lib/windows && pwd)"
|
||||
|
||||
export LIB=$LIB:$CLANG_LIB_DIR
|
||||
export LDFLAGS="clang_rt.asan_dynamic-x86_64.lib clang_rt.asan_dynamic_runtime_thunk-x86_64.lib"
|
||||
|
||||
export MOZ_COPY_PDBS=1
|
||||
export LLVM_SYMBOLIZER="$topsrcdir/clang/bin/llvm-symbolizer.exe"
|
||||
export LLVM_SYMBOLIZER="$MOZ_FETCHES_DIR/clang/bin/llvm-symbolizer.exe"
|
||||
export MOZ_CLANG_RT_ASAN_LIB_PATH="${CLANG_LIB_DIR}/clang_rt.asan_dynamic-x86_64.dll"
|
||||
fi
|
||||
|
||||
|
@ -462,18 +462,20 @@ void BrowsingContext::GetChildren(Children& aChildren) {
|
||||
//
|
||||
// See
|
||||
// https://html.spec.whatwg.org/multipage/browsers.html#the-rules-for-choosing-a-browsing-context-given-a-browsing-context-name
|
||||
BrowsingContext* BrowsingContext::FindWithName(const nsAString& aName) {
|
||||
BrowsingContext* BrowsingContext::FindWithName(
|
||||
const nsAString& aName, BrowsingContext& aRequestingContext) {
|
||||
BrowsingContext* found = nullptr;
|
||||
if (aName.IsEmpty()) {
|
||||
// You can't find a browsing context with an empty name.
|
||||
found = nullptr;
|
||||
} else if (BrowsingContext* special = FindWithSpecialName(aName)) {
|
||||
found = special;
|
||||
} else if (aName.LowerCaseEqualsLiteral("_blank")) {
|
||||
// Just return null. Caller must handle creating a new window with
|
||||
// a blank name.
|
||||
found = nullptr;
|
||||
} else if (BrowsingContext* child = FindWithNameInSubtree(aName, this)) {
|
||||
} else if (IsSpecialName(aName)) {
|
||||
found = FindWithSpecialName(aName, aRequestingContext);
|
||||
} else if (BrowsingContext* child =
|
||||
FindWithNameInSubtree(aName, aRequestingContext)) {
|
||||
found = child;
|
||||
} else {
|
||||
BrowsingContext* current = this;
|
||||
@ -486,7 +488,8 @@ BrowsingContext* BrowsingContext::FindWithName(const nsAString& aName) {
|
||||
// We've reached the root of the tree, consider browsing
|
||||
// contexts in the same browsing context group.
|
||||
siblings = &mGroup->Toplevels();
|
||||
} else if (parent->NameEquals(aName) && CanAccess(parent) &&
|
||||
} else if (parent->NameEquals(aName) &&
|
||||
aRequestingContext.CanAccess(parent) &&
|
||||
parent->IsTargetable()) {
|
||||
found = parent;
|
||||
break;
|
||||
@ -500,7 +503,7 @@ BrowsingContext* BrowsingContext::FindWithName(const nsAString& aName) {
|
||||
}
|
||||
|
||||
if (BrowsingContext* relative =
|
||||
sibling->FindWithNameInSubtree(aName, this)) {
|
||||
sibling->FindWithNameInSubtree(aName, aRequestingContext)) {
|
||||
found = relative;
|
||||
// Breaks the outer loop
|
||||
parent = nullptr;
|
||||
@ -514,19 +517,21 @@ BrowsingContext* BrowsingContext::FindWithName(const nsAString& aName) {
|
||||
|
||||
// Helpers should perform access control checks, which means that we
|
||||
// only need to assert that we can access found.
|
||||
MOZ_DIAGNOSTIC_ASSERT(!found || CanAccess(found));
|
||||
MOZ_DIAGNOSTIC_ASSERT(!found || aRequestingContext.CanAccess(found));
|
||||
|
||||
return found;
|
||||
}
|
||||
|
||||
BrowsingContext* BrowsingContext::FindChildWithName(const nsAString& aName) {
|
||||
BrowsingContext* BrowsingContext::FindChildWithName(
|
||||
const nsAString& aName, BrowsingContext& aRequestingContext) {
|
||||
if (aName.IsEmpty()) {
|
||||
// You can't find a browsing context with the empty name.
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
for (BrowsingContext* child : mChildren) {
|
||||
if (child->NameEquals(aName) && CanAccess(child) && child->IsTargetable()) {
|
||||
if (child->NameEquals(aName) && aRequestingContext.CanAccess(child) &&
|
||||
child->IsTargetable()) {
|
||||
return child;
|
||||
}
|
||||
}
|
||||
@ -534,7 +539,16 @@ BrowsingContext* BrowsingContext::FindChildWithName(const nsAString& aName) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
BrowsingContext* BrowsingContext::FindWithSpecialName(const nsAString& aName) {
|
||||
/* static */
|
||||
bool BrowsingContext::IsSpecialName(const nsAString& aName) {
|
||||
return (aName.LowerCaseEqualsLiteral("_self") ||
|
||||
aName.LowerCaseEqualsLiteral("_parent") ||
|
||||
aName.LowerCaseEqualsLiteral("_top") ||
|
||||
aName.LowerCaseEqualsLiteral("_blank"));
|
||||
}
|
||||
|
||||
BrowsingContext* BrowsingContext::FindWithSpecialName(
|
||||
const nsAString& aName, BrowsingContext& aRequestingContext) {
|
||||
// TODO(farre): Neither BrowsingContext nor nsDocShell checks if the
|
||||
// browsing context pointed to by a special name is active. Should
|
||||
// it be? See Bug 1527913.
|
||||
@ -543,23 +557,26 @@ BrowsingContext* BrowsingContext::FindWithSpecialName(const nsAString& aName) {
|
||||
}
|
||||
|
||||
if (aName.LowerCaseEqualsLiteral("_parent")) {
|
||||
return mParent && CanAccess(mParent.get()) ? mParent.get() : this;
|
||||
if (mParent) {
|
||||
return aRequestingContext.CanAccess(mParent) ? mParent.get() : nullptr;
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
if (aName.LowerCaseEqualsLiteral("_top")) {
|
||||
BrowsingContext* top = Top();
|
||||
|
||||
return CanAccess(top) ? top : nullptr;
|
||||
return aRequestingContext.CanAccess(top) ? top : nullptr;
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
BrowsingContext* BrowsingContext::FindWithNameInSubtree(
|
||||
const nsAString& aName, BrowsingContext* aRequestingContext) {
|
||||
const nsAString& aName, BrowsingContext& aRequestingContext) {
|
||||
MOZ_DIAGNOSTIC_ASSERT(!aName.IsEmpty());
|
||||
|
||||
if (NameEquals(aName) && aRequestingContext->CanAccess(this) &&
|
||||
if (NameEquals(aName) && aRequestingContext.CanAccess(this) &&
|
||||
IsTargetable()) {
|
||||
return this;
|
||||
}
|
||||
@ -766,6 +783,29 @@ void BrowsingContext::Location(JSContext* aCx,
|
||||
}
|
||||
}
|
||||
|
||||
void BrowsingContext::LoadURI(BrowsingContext* aAccessor,
|
||||
nsDocShellLoadState* aLoadState) {
|
||||
MOZ_DIAGNOSTIC_ASSERT(!IsDiscarded());
|
||||
MOZ_DIAGNOSTIC_ASSERT(!aAccessor || !aAccessor->IsDiscarded());
|
||||
|
||||
if (mDocShell) {
|
||||
mDocShell->LoadURI(aLoadState);
|
||||
} else if (!aAccessor && XRE_IsParentProcess()) {
|
||||
Unused << Canonical()->GetCurrentWindowGlobal()->SendLoadURIInChild(
|
||||
aLoadState);
|
||||
} else {
|
||||
MOZ_DIAGNOSTIC_ASSERT(aAccessor);
|
||||
MOZ_DIAGNOSTIC_ASSERT(aAccessor->Group() == Group());
|
||||
|
||||
nsCOMPtr<nsPIDOMWindowOuter> win(aAccessor->GetDOMWindow());
|
||||
MOZ_DIAGNOSTIC_ASSERT(win);
|
||||
if (WindowGlobalChild* wgc =
|
||||
win->GetCurrentInnerWindow()->GetWindowGlobalChild()) {
|
||||
wgc->SendLoadURI(this, aLoadState);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void BrowsingContext::Close(CallerType aCallerType, ErrorResult& aError) {
|
||||
// FIXME We need to set mClosed, but only once we're sending the
|
||||
// DOMWindowClose event (which happens in the process where the
|
||||
|
@ -20,6 +20,7 @@
|
||||
#include "nsWrapperCache.h"
|
||||
#include "nsILoadInfo.h"
|
||||
|
||||
class nsDocShellLoadState;
|
||||
class nsGlobalWindowOuter;
|
||||
class nsIPrincipal;
|
||||
class nsOuterWindowProxy;
|
||||
@ -179,6 +180,11 @@ class BrowsingContext : public nsWrapperCache, public BrowsingContextBase {
|
||||
// Restore cached browsing contexts.
|
||||
void RestoreChildren(Children&& aChildren, bool aFromIPC = false);
|
||||
|
||||
// Triggers a load in the process which currently owns this BrowsingContext.
|
||||
// aAccessor is the context which initiated the load, and may be null only for
|
||||
// in-process BrowsingContexts.
|
||||
void LoadURI(BrowsingContext* aAccessor, nsDocShellLoadState* aLoadState);
|
||||
|
||||
// Determine if the current BrowsingContext was 'cached' by the logic in
|
||||
// CacheChildren.
|
||||
bool IsCached();
|
||||
@ -209,6 +215,23 @@ class BrowsingContext : public nsWrapperCache, public BrowsingContextBase {
|
||||
|
||||
bool HasOpener() const;
|
||||
|
||||
/**
|
||||
* When a new browsing context is opened by a sandboxed document, it needs to
|
||||
* keep track of the browsing context that opened it, so that it can be
|
||||
* navigated by it. This is the "one permitted sandboxed navigator".
|
||||
*/
|
||||
already_AddRefed<BrowsingContext> GetOnePermittedSandboxedNavigator() const {
|
||||
return Get(mOnePermittedSandboxedNavigatorId);
|
||||
}
|
||||
void SetOnePermittedSandboxedNavigator(BrowsingContext* aNavigator) {
|
||||
if (mOnePermittedSandboxedNavigatorId) {
|
||||
MOZ_ASSERT(false,
|
||||
"One Permitted Sandboxed Navigator should only be set once.");
|
||||
} else {
|
||||
SetOnePermittedSandboxedNavigatorId(aNavigator ? aNavigator->Id() : 0);
|
||||
}
|
||||
}
|
||||
|
||||
void GetChildren(Children& aChildren);
|
||||
|
||||
BrowsingContextGroup* Group() { return mGroup; }
|
||||
@ -223,13 +246,17 @@ class BrowsingContext : public nsWrapperCache, public BrowsingContextBase {
|
||||
// BrowsingContext::FindWithName(const nsAString&) is equivalent to
|
||||
// calling nsIDocShellTreeItem::FindItemWithName(aName, nullptr,
|
||||
// nullptr, false, <return value>).
|
||||
BrowsingContext* FindWithName(const nsAString& aName);
|
||||
BrowsingContext* FindWithName(const nsAString& aName,
|
||||
BrowsingContext& aRequestingContext);
|
||||
|
||||
|
||||
// Find a browsing context in this context's list of
|
||||
// children. Doesn't consider the special names, '_self', '_parent',
|
||||
// '_top', or '_blank'. Performs access control with regard to
|
||||
// 'this'.
|
||||
BrowsingContext* FindChildWithName(const nsAString& aName);
|
||||
BrowsingContext* FindChildWithName(const nsAString& aName,
|
||||
BrowsingContext& aRequestingContext);
|
||||
|
||||
|
||||
nsISupports* GetParentObject() const;
|
||||
JSObject* WrapObject(JSContext* aCx,
|
||||
@ -390,16 +417,21 @@ class BrowsingContext : public nsWrapperCache, public BrowsingContextBase {
|
||||
uint64_t aBrowsingContextId, Type aType);
|
||||
|
||||
private:
|
||||
// Returns true if the given name is one of the "special" names, currently:
|
||||
// "_self", "_parent", "_top", or "_blank".
|
||||
static bool IsSpecialName(const nsAString& aName);
|
||||
|
||||
// Find the special browsing context if aName is '_self', '_parent',
|
||||
// '_top', but not '_blank'. The latter is handled in FindWithName
|
||||
BrowsingContext* FindWithSpecialName(const nsAString& aName);
|
||||
BrowsingContext* FindWithSpecialName(const nsAString& aName,
|
||||
BrowsingContext& aRequestingContext);
|
||||
|
||||
// Find a browsing context in the subtree rooted at 'this' Doesn't
|
||||
// consider the special names, '_self', '_parent', '_top', or
|
||||
// '_blank'. Performs access control with regard to
|
||||
// 'aRequestingContext'.
|
||||
BrowsingContext* FindWithNameInSubtree(const nsAString& aName,
|
||||
BrowsingContext* aRequestingContext);
|
||||
BrowsingContext& aRequestingContext);
|
||||
|
||||
// Removes the context from its group and sets mIsDetached to true.
|
||||
void Unregister();
|
||||
|
@ -19,6 +19,8 @@ MOZ_BC_FIELD(OpenerPolicy, nsILoadInfo::CrossOriginOpenerPolicy)
|
||||
// stored as the opener ID.
|
||||
MOZ_BC_FIELD(OpenerId, uint64_t)
|
||||
|
||||
MOZ_BC_FIELD(OnePermittedSandboxedNavigatorId, uint64_t)
|
||||
|
||||
// Toplevel browsing contexts only. This field controls whether the browsing
|
||||
// context is currently considered to be activated by a gesture.
|
||||
MOZ_BC_FIELD(IsActivatedByUserGesture, bool)
|
||||
|
@ -3007,14 +3007,14 @@ nsresult nsDocShell::DoFindItemWithName(const nsAString& aName,
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
bool nsDocShell::IsSandboxedFrom(nsIDocShell* aTargetDocShell) {
|
||||
bool nsDocShell::IsSandboxedFrom(BrowsingContext* aTargetBC) {
|
||||
// If no target then not sandboxed.
|
||||
if (!aTargetDocShell) {
|
||||
if (!aTargetBC) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// We cannot be sandboxed from ourselves.
|
||||
if (aTargetDocShell == this) {
|
||||
if (aTargetBC == mBrowsingContext) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -3033,45 +3033,37 @@ bool nsDocShell::IsSandboxedFrom(nsIDocShell* aTargetDocShell) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// If aTargetDocShell has an ancestor, it is not top level.
|
||||
nsCOMPtr<nsIDocShellTreeItem> ancestorOfTarget;
|
||||
aTargetDocShell->GetInProcessSameTypeParent(getter_AddRefs(ancestorOfTarget));
|
||||
// If aTargetBC has an ancestor, it is not top level.
|
||||
RefPtr<BrowsingContext> ancestorOfTarget(aTargetBC->GetParent());
|
||||
if (ancestorOfTarget) {
|
||||
do {
|
||||
// We are not sandboxed if we are an ancestor of target.
|
||||
if (ancestorOfTarget == this) {
|
||||
if (ancestorOfTarget == mBrowsingContext) {
|
||||
return false;
|
||||
}
|
||||
nsCOMPtr<nsIDocShellTreeItem> tempTreeItem;
|
||||
ancestorOfTarget->GetInProcessSameTypeParent(
|
||||
getter_AddRefs(tempTreeItem));
|
||||
tempTreeItem.swap(ancestorOfTarget);
|
||||
ancestorOfTarget = ancestorOfTarget->GetParent();
|
||||
} while (ancestorOfTarget);
|
||||
|
||||
// Otherwise, we are sandboxed from aTargetDocShell.
|
||||
// Otherwise, we are sandboxed from aTargetBC.
|
||||
return true;
|
||||
}
|
||||
|
||||
// aTargetDocShell is top level, are we the "one permitted sandboxed
|
||||
// navigator", i.e. did we open aTargetDocShell?
|
||||
nsCOMPtr<nsIDocShell> permittedNavigator;
|
||||
aTargetDocShell->GetOnePermittedSandboxedNavigator(
|
||||
getter_AddRefs(permittedNavigator));
|
||||
if (permittedNavigator == this) {
|
||||
// aTargetBC is top level, are we the "one permitted sandboxed
|
||||
// navigator", i.e. did we open aTargetBC?
|
||||
RefPtr<BrowsingContext> permittedNavigator(
|
||||
aTargetBC->GetOnePermittedSandboxedNavigator());
|
||||
if (permittedNavigator == mBrowsingContext) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// If SANDBOXED_TOPLEVEL_NAVIGATION flag is not on, we are not sandboxed
|
||||
// from our top.
|
||||
if (!(sandboxFlags & SANDBOXED_TOPLEVEL_NAVIGATION)) {
|
||||
nsCOMPtr<nsIDocShellTreeItem> rootTreeItem;
|
||||
GetInProcessSameTypeRootTreeItem(getter_AddRefs(rootTreeItem));
|
||||
if (SameCOMIdentity(aTargetDocShell, rootTreeItem)) {
|
||||
return false;
|
||||
}
|
||||
if (!(sandboxFlags & SANDBOXED_TOPLEVEL_NAVIGATION) &&
|
||||
aTargetBC == mBrowsingContext->Top()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Otherwise, we are sandboxed from aTargetDocShell.
|
||||
// Otherwise, we are sandboxed from aTargetBC.
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -4967,8 +4959,6 @@ nsDocShell::Destroy() {
|
||||
|
||||
mChromeEventHandler = nullptr;
|
||||
|
||||
mOnePermittedSandboxedNavigator = nullptr;
|
||||
|
||||
// required to break ref cycle
|
||||
mSecurityUI = nullptr;
|
||||
|
||||
@ -5265,11 +5255,6 @@ nsDocShell::GetIsOffScreenBrowser(bool* aIsOffScreen) {
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDocShell::SetIsActive(bool aIsActive) {
|
||||
// We disallow setting active on chrome docshells.
|
||||
if (mItemType == nsIDocShellTreeItem::typeChrome) {
|
||||
return NS_ERROR_INVALID_ARG;
|
||||
}
|
||||
|
||||
// Keep track ourselves.
|
||||
mIsActive = aIsActive;
|
||||
|
||||
@ -5367,34 +5352,6 @@ nsDocShell::GetSandboxFlags(uint32_t* aSandboxFlags) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDocShell::SetOnePermittedSandboxedNavigator(
|
||||
nsIDocShell* aSandboxedNavigator) {
|
||||
if (mOnePermittedSandboxedNavigator) {
|
||||
NS_ERROR("One Permitted Sandboxed Navigator should only be set once.");
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
MOZ_ASSERT(!mIsBeingDestroyed);
|
||||
|
||||
mOnePermittedSandboxedNavigator = do_GetWeakReference(aSandboxedNavigator);
|
||||
NS_ASSERTION(
|
||||
mOnePermittedSandboxedNavigator,
|
||||
"One Permitted Sandboxed Navigator must support weak references.");
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDocShell::GetOnePermittedSandboxedNavigator(
|
||||
nsIDocShell** aSandboxedNavigator) {
|
||||
NS_ENSURE_ARG_POINTER(aSandboxedNavigator);
|
||||
nsCOMPtr<nsIDocShell> permittedNavigator =
|
||||
do_QueryReferent(mOnePermittedSandboxedNavigator);
|
||||
permittedNavigator.forget(aSandboxedNavigator);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDocShell::SetDefaultLoadFlags(uint32_t aDefaultLoadFlags) {
|
||||
mDefaultLoadFlags = aDefaultLoadFlags;
|
||||
@ -9300,7 +9257,7 @@ nsresult nsDocShell::InternalLoad(nsDocShellLoadState* aLoadState,
|
||||
// If a source docshell has been passed, check to see if we are sandboxed
|
||||
// from it as the result of an iframe or CSP sandbox.
|
||||
if (aLoadState->SourceDocShell() &&
|
||||
aLoadState->SourceDocShell()->IsSandboxedFrom(this)) {
|
||||
aLoadState->SourceDocShell()->IsSandboxedFrom(mBrowsingContext)) {
|
||||
return NS_ERROR_DOM_INVALID_ACCESS_ERR;
|
||||
}
|
||||
|
||||
|
@ -1066,7 +1066,6 @@ class nsDocShell final : public nsDocLoader,
|
||||
nsString mTitle;
|
||||
nsString mCustomUserAgent;
|
||||
nsCString mOriginalUriString;
|
||||
nsWeakPtr mOnePermittedSandboxedNavigator;
|
||||
nsWeakPtr mOpener;
|
||||
nsTObserverArray<nsWeakPtr> mPrivacyObservers;
|
||||
nsTObserverArray<nsWeakPtr> mReflowObservers;
|
||||
|
@ -784,18 +784,11 @@ interface nsIDocShell : nsIDocShellTreeItem
|
||||
*/
|
||||
attribute unsigned long sandboxFlags;
|
||||
|
||||
/**
|
||||
* When a new browsing context is opened by a sandboxed document, it needs to
|
||||
* keep track of the browsing context that opened it, so that it can be
|
||||
* navigated by it. This is the "one permitted sandboxed navigator".
|
||||
*/
|
||||
attribute nsIDocShell onePermittedSandboxedNavigator;
|
||||
|
||||
/**
|
||||
* Returns true if we are sandboxed from aTargetDocShell.
|
||||
* aTargetDocShell - the browsing context we are attempting to navigate.
|
||||
*/
|
||||
[noscript,notxpcom,nostdcall] bool isSandboxedFrom(in nsIDocShell aTargetDocShell);
|
||||
[noscript,notxpcom,nostdcall] bool isSandboxedFrom(in BrowsingContext aTargetBC);
|
||||
|
||||
/**
|
||||
* This member variable determines whether a document has Mixed Active Content that
|
||||
|
@ -134,9 +134,9 @@ skip-if = true # Bug 1220415
|
||||
[browser_click_link_within_view_source.js]
|
||||
[browser_browsingContext-01.js]
|
||||
[browser_browsingContext-02.js]
|
||||
fail-if = fission
|
||||
skip-if = fission # Cross-process postMessage
|
||||
[browser_browsingContext-03.js]
|
||||
fail-if = fission
|
||||
skip-if = fission # Cross-process postMessage
|
||||
[browser_browsingContext-embedder.js]
|
||||
[browser_csp_uir.js]
|
||||
support-files =
|
||||
|
@ -32,7 +32,7 @@ add_task(async function() {
|
||||
browser,
|
||||
{ base1: BASE1, base2: BASE2 },
|
||||
async function({ base1, base2 }) {
|
||||
let top = content.window;
|
||||
let top = content;
|
||||
top.name = "top";
|
||||
top.location.href += "#top";
|
||||
|
||||
@ -48,28 +48,40 @@ add_task(async function() {
|
||||
};
|
||||
|
||||
function addFrame(target, name) {
|
||||
let doc = (target.contentWindow || target).document;
|
||||
let frame = doc.createElement("iframe");
|
||||
let p = new Promise(
|
||||
resolve => (frame.onload = () => resolve(frame))
|
||||
return content.SpecialPowers.spawn(
|
||||
target,
|
||||
[name, contexts[name]],
|
||||
async (name, context) => {
|
||||
let doc = this.content.document;
|
||||
|
||||
let frame = doc.createElement("iframe");
|
||||
doc.body.appendChild(frame);
|
||||
frame.name = name;
|
||||
frame.src = context;
|
||||
await new Promise(resolve => {
|
||||
frame.addEventListener("load", resolve, { once: true });
|
||||
});
|
||||
return frame.browsingContext;
|
||||
}
|
||||
);
|
||||
doc.body.appendChild(frame);
|
||||
frame.name = name;
|
||||
frame.src = contexts[name];
|
||||
return p;
|
||||
}
|
||||
|
||||
function addWindow(target, name, { options, resolve }) {
|
||||
var win = target.contentWindow.open(contexts[name], name, options);
|
||||
return content.SpecialPowers.spawn(
|
||||
target,
|
||||
[name, contexts[name], options, resolve],
|
||||
(name, context, options, resolve) => {
|
||||
let win = this.content.open(context, name, options);
|
||||
let bc = win && win.docShell.browsingContext;
|
||||
|
||||
if (resolve) {
|
||||
return new Promise(resolve =>
|
||||
target.contentWindow.addEventListener("message", () =>
|
||||
resolve(win)
|
||||
)
|
||||
);
|
||||
}
|
||||
return Promise.resolve({ name });
|
||||
if (resolve) {
|
||||
return new Promise(resolve =>
|
||||
this.content.addEventListener("message", () => resolve(bc))
|
||||
);
|
||||
}
|
||||
return Promise.resolve({ name });
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
// We're going to create a tree that looks like the
|
||||
@ -93,25 +105,21 @@ add_task(async function() {
|
||||
// wish to confirm that targeting is able to find
|
||||
// appropriate browsing contexts.
|
||||
|
||||
function bc(frame) {
|
||||
return (frame.contentWindow || frame).docShell.browsingContext;
|
||||
}
|
||||
|
||||
function reachable(start, targets) {
|
||||
for (let target of targets) {
|
||||
is(
|
||||
bc(start).findWithName(target.name),
|
||||
bc(target),
|
||||
[bc(start).name, "can reach", target.name].join(" ")
|
||||
start.findWithName(target.name, start),
|
||||
target,
|
||||
[start.name, "can reach", target.name].join(" ")
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
function unreachable(start, target) {
|
||||
is(
|
||||
bc(start).findWithName(target.name),
|
||||
start.findWithName(target.name, start),
|
||||
null,
|
||||
[bc(start).name, "can't reach", target.name].join(" ")
|
||||
[start.name, "can't reach", target.name].join(" ")
|
||||
);
|
||||
}
|
||||
|
||||
@ -132,7 +140,15 @@ add_task(async function() {
|
||||
});
|
||||
info("seventh");
|
||||
|
||||
let frames = [top, first, second, third, fourth, fifth, sixth];
|
||||
let frames = [
|
||||
BrowsingContext.getFromWindow(top),
|
||||
first,
|
||||
second,
|
||||
third,
|
||||
fourth,
|
||||
fifth,
|
||||
sixth,
|
||||
];
|
||||
for (let start of frames) {
|
||||
reachable(start, frames);
|
||||
unreachable(start, seventh);
|
||||
|
@ -26,7 +26,7 @@ add_task(async function() {
|
||||
browser,
|
||||
{ base1: BASE1, base2: BASE2 },
|
||||
async function({ base1, base2 }) {
|
||||
let top = content.window;
|
||||
let top = content;
|
||||
top.name = "top";
|
||||
top.location.href += "#top";
|
||||
|
||||
@ -41,24 +41,36 @@ add_task(async function() {
|
||||
};
|
||||
|
||||
function addFrame(target, name) {
|
||||
let doc = (target.contentWindow || target).document;
|
||||
let frame = doc.createElement("iframe");
|
||||
let p = new Promise(
|
||||
resolve => (frame.onload = () => resolve(frame))
|
||||
return content.SpecialPowers.spawn(
|
||||
target,
|
||||
[name, contexts[name]],
|
||||
async (name, context) => {
|
||||
let doc = this.content.document;
|
||||
|
||||
let frame = doc.createElement("iframe");
|
||||
doc.body.appendChild(frame);
|
||||
frame.name = name;
|
||||
frame.src = context;
|
||||
await new Promise(resolve => {
|
||||
frame.addEventListener("load", resolve, { once: true });
|
||||
});
|
||||
return frame.browsingContext;
|
||||
}
|
||||
);
|
||||
doc.body.appendChild(frame);
|
||||
frame.name = name;
|
||||
frame.src = contexts[name];
|
||||
return p;
|
||||
}
|
||||
|
||||
function addWindow(target, name) {
|
||||
var win = target.contentWindow.open(contexts[name], name);
|
||||
return content.SpecialPowers.spawn(
|
||||
target,
|
||||
[name, contexts[name]],
|
||||
(name, context) => {
|
||||
let win = this.content.open(context, name);
|
||||
let bc = win && win.docShell.browsingContext;
|
||||
|
||||
return new Promise(resolve =>
|
||||
target.contentWindow.addEventListener("message", () =>
|
||||
resolve(win)
|
||||
)
|
||||
return new Promise(resolve =>
|
||||
this.content.addEventListener("message", () => resolve(bc))
|
||||
);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
@ -103,10 +115,6 @@ add_task(async function() {
|
||||
// and ensure that the find algorithms return the same nodes
|
||||
// in the same order.
|
||||
|
||||
function bc(frame) {
|
||||
return (frame.contentWindow || frame).docShell.browsingContext;
|
||||
}
|
||||
|
||||
let first = await addFrame(top, "first");
|
||||
let second = await addFrame(top, "second");
|
||||
let third = await addFrame(first, "third");
|
||||
@ -114,8 +122,15 @@ add_task(async function() {
|
||||
let fifth = await addFrame(fourth, "fifth");
|
||||
let sixth = await addWindow(fourth, "sixth");
|
||||
|
||||
let frames = [top, first, second, third, fourth, fifth, sixth];
|
||||
let browsingContexts = frames.map(bc);
|
||||
let browsingContexts = [
|
||||
BrowsingContext.getFromWindow(top),
|
||||
first,
|
||||
second,
|
||||
third,
|
||||
fourth,
|
||||
fifth,
|
||||
sixth,
|
||||
];
|
||||
let docShells = browsingContexts.map(context => context.docShell);
|
||||
|
||||
ok(
|
||||
@ -138,7 +153,10 @@ add_task(async function() {
|
||||
null,
|
||||
false
|
||||
);
|
||||
let browsingContext = browsingContexts[i].findWithName("target");
|
||||
let browsingContext = browsingContexts[i].findWithName(
|
||||
"target",
|
||||
browsingContexts[i]
|
||||
);
|
||||
is(
|
||||
docShell ? docShell.browsingContext : null,
|
||||
browsingContext,
|
||||
@ -155,7 +173,10 @@ add_task(async function() {
|
||||
null,
|
||||
false
|
||||
);
|
||||
let browsingContext = browsingContexts[i].findWithName(target);
|
||||
let browsingContext = browsingContexts[i].findWithName(
|
||||
target,
|
||||
browsingContexts[i]
|
||||
);
|
||||
is(
|
||||
docShell ? docShell.browsingContext : null,
|
||||
browsingContext,
|
||||
|
@ -48,10 +48,10 @@
|
||||
$("f2").setAttribute("src", doc2);
|
||||
$("f3").setAttribute("src", doc2);
|
||||
|
||||
function doTheTest() {
|
||||
var s1 = snapshotWindow($("f1").contentWindow);
|
||||
var s2 = snapshotWindow($("f2").contentWindow);
|
||||
var s3 = snapshotWindow($("f3").contentWindow);
|
||||
async function doTheTest() {
|
||||
var s1 = await snapshotWindow($("f1").contentWindow);
|
||||
var s2 = await snapshotWindow($("f2").contentWindow);
|
||||
var s3 = await snapshotWindow($("f3").contentWindow);
|
||||
|
||||
// This test is broken - see bug 1090274
|
||||
//ok(!compareSnapshots(s2, s3, true)[0],
|
||||
@ -86,7 +86,7 @@
|
||||
_afterFirst: false,
|
||||
_removedDispatched: false,
|
||||
_addedDispatched: false,
|
||||
handleEvent: function(aEvent) {
|
||||
handleEvent: async function(aEvent) {
|
||||
if (!this._afterFirst) {
|
||||
is(aEvent.type, "DOMLinkAdded");
|
||||
|
||||
@ -120,7 +120,7 @@
|
||||
// swapDocShells reflows asynchronously, ensure layout is
|
||||
// clean so that the viewport of f1 is the right size.
|
||||
$("f1").getBoundingClientRect();
|
||||
var s1_new = snapshotWindow($("f1").contentWindow);
|
||||
var s1_new = await snapshotWindow($("f1").contentWindow);
|
||||
var [same, first, second] = compareSnapshots(s1_new, s2, true);
|
||||
ok(same, "Should reflow on swap. Expected " + second + " but got " + first);
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
width="600"
|
||||
height="600"
|
||||
onload="setTimeout(nextTest, 0);"
|
||||
onload="setTimeout(runTests, 0);"
|
||||
title="bug 293235 test">
|
||||
|
||||
<script src="chrome://mochikit/content/tests/SimpleTest/ChromePowers.js"/>
|
||||
@ -16,16 +16,6 @@
|
||||
<script type="application/javascript"><![CDATA[
|
||||
var {NetUtil} = ChromeUtils.import("resource://gre/modules/NetUtil.jsm");
|
||||
|
||||
// Define the generator-iterator for the tests.
|
||||
var tests = testIterator();
|
||||
|
||||
////
|
||||
// Execute the next test in the generator function.
|
||||
//
|
||||
function nextTest() {
|
||||
tests.next();
|
||||
}
|
||||
|
||||
// Return the Element object for the specified element id
|
||||
function $(id) { return TestWindow.getDocument().getElementById(id); }
|
||||
|
||||
@ -35,8 +25,7 @@
|
||||
// to it when displayed on a page which was fetched from
|
||||
// the bfcache.
|
||||
//
|
||||
function* testIterator()
|
||||
{
|
||||
async function runTests() {
|
||||
// Register our observer to know when the link lookup is complete.
|
||||
let testURI = NetUtil.newURI(getHttpUrl("bug293235_p2.html"));
|
||||
let os = Cc["@mozilla.org/observer-service;1"].
|
||||
@ -63,15 +52,17 @@
|
||||
|
||||
// Load a test page containing a link that should be initially
|
||||
// blue, per the :link style.
|
||||
doPageNavigation({
|
||||
uri: getHttpUrl("bug293235.html"),
|
||||
onNavComplete: nextTest
|
||||
await new Promise(resolve => {
|
||||
doPageNavigation({
|
||||
uri: getHttpUrl("bug293235.html"),
|
||||
onNavComplete: resolve,
|
||||
});
|
||||
});
|
||||
yield undefined;
|
||||
|
||||
// Before we go any further, make sure our link has been notified.
|
||||
waitForTrue(notified, nextTest);
|
||||
yield undefined;
|
||||
await new Promise(resolve => {
|
||||
waitForTrue(notified, resolve);
|
||||
});
|
||||
|
||||
// Now that we've been notified, we can check our link color.
|
||||
// Since we can't use getComputedStyle() for this because
|
||||
@ -80,67 +71,68 @@
|
||||
// First, take two reference snapshots.
|
||||
var link1 = $("link1");
|
||||
link1.className = "forcelink";
|
||||
var refLink = snapshotWindow(TestWindow.getWindow());
|
||||
var refLink = await snapshotWindow(TestWindow.getWindow());
|
||||
link1.className = "forcevisited";
|
||||
var refVisited = snapshotWindow(TestWindow.getWindow());
|
||||
var refVisited = await snapshotWindow(TestWindow.getWindow());
|
||||
link1.className = "";
|
||||
function snapshotsEqual(snap1, snap2) {
|
||||
return compareSnapshots(snap1, snap2, true)[0];
|
||||
}
|
||||
ok(!snapshotsEqual(refLink, refVisited), "references should not match");
|
||||
ok(snapshotsEqual(refLink, snapshotWindow(TestWindow.getWindow())),
|
||||
ok(snapshotsEqual(refLink, await snapshotWindow(TestWindow.getWindow())),
|
||||
"link should initially be blue");
|
||||
|
||||
let observedVisit = false, observedPageShow = false;
|
||||
function maybeRunNextTest() {
|
||||
ok(true, "maybe run next test? visited: " + observedVisit + " pageShow: " + observedPageShow);
|
||||
if (observedVisit && observedPageShow)
|
||||
nextTest();
|
||||
}
|
||||
|
||||
// Because adding visits is async, we will not be notified imemdiately.
|
||||
let visitObserver = {
|
||||
observe: function(aSubject, aTopic, aData)
|
||||
{
|
||||
if (!testURI.equals(aSubject.QueryInterface(Ci.nsIURI))) {
|
||||
return;
|
||||
}
|
||||
os.removeObserver(this, aTopic);
|
||||
observedVisit = true;
|
||||
maybeRunNextTest();
|
||||
},
|
||||
};
|
||||
os.addObserver(visitObserver, "uri-visit-saved");
|
||||
// Load the page that the link on the previous page points to.
|
||||
doPageNavigation({
|
||||
uri: getHttpUrl("bug293235_p2.html"),
|
||||
onNavComplete: function() {
|
||||
observedPageShow = true;
|
||||
maybeRunNextTest();
|
||||
await new Promise(resolve => {
|
||||
function maybeResolve() {
|
||||
ok(true, "maybe run next test? visited: " + observedVisit + " pageShow: " + observedPageShow);
|
||||
if (observedVisit && observedPageShow)
|
||||
resolve();
|
||||
}
|
||||
});
|
||||
yield undefined;
|
||||
|
||||
// Because adding visits is async, we will not be notified imemdiately.
|
||||
let visitObserver = {
|
||||
observe: function(aSubject, aTopic, aData)
|
||||
{
|
||||
if (!testURI.equals(aSubject.QueryInterface(Ci.nsIURI))) {
|
||||
return;
|
||||
}
|
||||
os.removeObserver(this, aTopic);
|
||||
observedVisit = true;
|
||||
maybeResolve();
|
||||
},
|
||||
};
|
||||
os.addObserver(visitObserver, "uri-visit-saved");
|
||||
// Load the page that the link on the previous page points to.
|
||||
doPageNavigation({
|
||||
uri: getHttpUrl("bug293235_p2.html"),
|
||||
onNavComplete: function() {
|
||||
observedPageShow = true;
|
||||
maybeResolve();
|
||||
}
|
||||
});
|
||||
})
|
||||
|
||||
// And the nodes get notified after the "uri-visit-saved" topic, so
|
||||
// we need to execute soon...
|
||||
SimpleTest.executeSoon(nextTest);
|
||||
yield undefined;
|
||||
await new Promise(SimpleTest.executeSoon);
|
||||
|
||||
// Go back, verify the original page was loaded from the bfcache,
|
||||
// and verify that the link is now purple, per the
|
||||
// :visited style.
|
||||
doPageNavigation({
|
||||
back: true,
|
||||
eventsToListenFor: ["pageshow"],
|
||||
expectedEvents: [ { type: "pageshow",
|
||||
persisted: true,
|
||||
title: "Bug 293235 page1" } ],
|
||||
onNavComplete: nextTest
|
||||
});
|
||||
yield undefined;
|
||||
await new Promise(resolve => {
|
||||
doPageNavigation({
|
||||
back: true,
|
||||
eventsToListenFor: ["pageshow"],
|
||||
expectedEvents: [ { type: "pageshow",
|
||||
persisted: true,
|
||||
title: "Bug 293235 page1" } ],
|
||||
onNavComplete: resolve,
|
||||
});
|
||||
})
|
||||
|
||||
// Now we can test the link color.
|
||||
ok(snapshotsEqual(refVisited, snapshotWindow(TestWindow.getWindow())),
|
||||
ok(snapshotsEqual(refVisited, await snapshotWindow(TestWindow.getWindow())),
|
||||
"visited link should be purple");
|
||||
|
||||
// Tell the framework the test is finished.
|
||||
|
@ -5,7 +5,7 @@
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
width="600"
|
||||
height="600"
|
||||
onload="setTimeout(nextTest, 0);"
|
||||
onload="setTimeout(runTests, 0);"
|
||||
title="bug 89419 test">
|
||||
|
||||
<script type="application/javascript" src= "chrome://mochikit/content/chrome-harness.js" />
|
||||
@ -14,59 +14,49 @@
|
||||
<script src="chrome://mochikit/content/tests/SimpleTest/WindowSnapshot.js"></script>
|
||||
|
||||
<script type="application/javascript"><![CDATA[
|
||||
// Define the generator-iterator for the tests.
|
||||
var tests = testIterator();
|
||||
|
||||
////
|
||||
// Execute the next test in the generator function.
|
||||
//
|
||||
function nextTest() {
|
||||
tests.next();
|
||||
}
|
||||
|
||||
////
|
||||
// Generator function for test steps for bug 89419:
|
||||
// A visited link should have the :visited style applied
|
||||
// to it when displayed on a page which was fetched from
|
||||
// the bfcache.
|
||||
//
|
||||
function* testIterator()
|
||||
{
|
||||
async function runTests() {
|
||||
// Disable rcwn to make cache behavior deterministic.
|
||||
var SpecialPowers = window.opener.wrappedJSObject.SpecialPowers;
|
||||
SpecialPowers.pushPrefEnv({"set":[["network.http.rcwn.enabled", false]]}, nextTest);
|
||||
yield undefined;
|
||||
var {SpecialPowers} = opener;
|
||||
await SpecialPowers.pushPrefEnv({"set":[["network.http.rcwn.enabled", false]]});
|
||||
|
||||
// Load a test page containing an image referring to the sjs that returns
|
||||
// a different redirect every time it's loaded.
|
||||
doPageNavigation({
|
||||
uri: getHttpUrl("89419.html"),
|
||||
onNavComplete: nextTest,
|
||||
preventBFCache: true
|
||||
await new Promise(resolve => {
|
||||
doPageNavigation({
|
||||
uri: getHttpUrl("89419.html"),
|
||||
onNavComplete: resolve,
|
||||
preventBFCache: true,
|
||||
});
|
||||
})
|
||||
|
||||
var first = await snapshotWindow(TestWindow.getWindow());
|
||||
|
||||
await new Promise(resolve => {
|
||||
doPageNavigation({
|
||||
uri: "about:blank",
|
||||
onNavComplete: resolve,
|
||||
});
|
||||
});
|
||||
yield undefined;
|
||||
|
||||
var first = snapshotWindow(TestWindow.getWindow());
|
||||
|
||||
doPageNavigation({
|
||||
uri: "about:blank",
|
||||
onNavComplete: nextTest
|
||||
});
|
||||
yield undefined;
|
||||
|
||||
var second = snapshotWindow(TestWindow.getWindow());
|
||||
var second = await snapshotWindow(TestWindow.getWindow());
|
||||
function snapshotsEqual(snap1, snap2) {
|
||||
return compareSnapshots(snap1, snap2, true)[0];
|
||||
}
|
||||
ok(!snapshotsEqual(first, second), "about:blank should not be the same as the image web page");
|
||||
|
||||
doPageNavigation({
|
||||
back: true,
|
||||
onNavComplete: nextTest
|
||||
await new Promise(resolve => {
|
||||
doPageNavigation({
|
||||
back: true,
|
||||
onNavComplete: resolve,
|
||||
});
|
||||
});
|
||||
yield undefined;
|
||||
|
||||
var third = snapshotWindow(TestWindow.getWindow());
|
||||
var third = await snapshotWindow(TestWindow.getWindow());
|
||||
ok(!snapshotsEqual(third, second), "going back should not be the same as about:blank");
|
||||
ok(snapshotsEqual(first, third), "going back should be the same as the initial load");
|
||||
|
||||
|
@ -74,9 +74,9 @@ skip-if = true
|
||||
skip-if = toolkit != "cocoa" || headless # Headless: bug 1410525
|
||||
support-files = file_bug511449.html
|
||||
[test_bug529119-1.html]
|
||||
fail-if = fission
|
||||
skip-if = fission # Times out in weird ways.
|
||||
[test_bug529119-2.html]
|
||||
fail-if = fission
|
||||
skip-if = fission # Times out in weird ways.
|
||||
[test_bug530396.html]
|
||||
support-files = bug530396-noref.sjs bug530396-subframe.html
|
||||
[test_bug540462.html]
|
||||
|
@ -27,12 +27,12 @@ win1.document.body.textContent = "Should show";
|
||||
|
||||
var windowsLoaded = 0;
|
||||
|
||||
window.onmessage = function(ev) {
|
||||
window.onmessage = async function(ev) {
|
||||
is(ev.data, "loaded", "Message should be 'loaded'");
|
||||
if (++windowsLoaded == 2) {
|
||||
var one = snapshotWindow(win1);
|
||||
var two = snapshotWindow(win2);
|
||||
var three = snapshotWindow(win3);
|
||||
var one = await snapshotWindow(win1);
|
||||
var two = await snapshotWindow(win2);
|
||||
var three = await snapshotWindow(win3);
|
||||
win1.close();
|
||||
win2.close();
|
||||
win3.close();
|
||||
|
@ -27,12 +27,12 @@ win1.document.body.textContent = "Should show";
|
||||
|
||||
var windowsLoaded = 0;
|
||||
|
||||
window.onmessage = function(ev) {
|
||||
window.onmessage = async function(ev) {
|
||||
is(ev.data, "loaded", "Message should be 'loaded'");
|
||||
if (++windowsLoaded == 2) {
|
||||
var one = snapshotWindow(win1);
|
||||
var two = snapshotWindow(win2);
|
||||
var three = snapshotWindow(win3);
|
||||
var one = await snapshotWindow(win1);
|
||||
var two = await snapshotWindow(win2);
|
||||
var three = await snapshotWindow(win3);
|
||||
win1.close();
|
||||
win2.close();
|
||||
win3.close();
|
||||
|
@ -57,10 +57,11 @@ support-files =
|
||||
test_bug145971.html
|
||||
|
||||
[test_bug13871.html]
|
||||
fail-if = fission
|
||||
skip-if = fission && debug # Times out.
|
||||
skip-if = fission # Times out.
|
||||
[test_bug270414.html]
|
||||
fail-if = fission
|
||||
skip-if =
|
||||
fission || # Times out.
|
||||
fission && debug # Crashes in automation: @ mozilla::dom::ContentProcessManager::GetContentProcessById(mozilla::dom::IdType<mozilla::dom::ContentParent> const&)
|
||||
[test_bug278916.html]
|
||||
[test_bug279495.html]
|
||||
[test_bug344861.html]
|
||||
@ -72,21 +73,20 @@ skip-if = (toolkit == 'android') || (!debug && (os == 'mac' || os == 'win')) # B
|
||||
[test_bug1364364.html]
|
||||
[test_bug1375833.html]
|
||||
[test_child.html]
|
||||
fail-if = fission
|
||||
skip-if = fission # Times out.
|
||||
[test_grandchild.html]
|
||||
fail-if = fission
|
||||
skip-if = fission && (debug || asan) # Causes shutdown leaks under Fission.
|
||||
fail-if = fission
|
||||
[test_not-opener.html]
|
||||
fail-if = fission
|
||||
skip-if = fission && debug # Times out
|
||||
skip-if = fission # Times out.
|
||||
[test_opener.html]
|
||||
skip-if = fission && debug # Times out
|
||||
skip-if = fission # Times out.
|
||||
[test_popup-navigates-children.html]
|
||||
fail-if = fission
|
||||
skip-if = fission # Times out.
|
||||
[test_reserved.html]
|
||||
skip-if =
|
||||
skip-if =
|
||||
(toolkit == 'android') || (debug && e10s) || (os == 'mac' && os_version == '10.14') || #too slow on Android 4.3 aws only; bug 1030403; bug 1263213 for debug e10s, macosx1014 due to 1548821
|
||||
(fission && !debug) #Bug 1570953
|
||||
fission # Times out.
|
||||
[test_performance_navigation.html]
|
||||
[test_sessionhistory.html]
|
||||
skip-if =
|
||||
@ -94,7 +94,7 @@ skip-if =
|
||||
(fission && debug) # Intermittent timeouts
|
||||
support-files = file_bug1379762-1.html
|
||||
[test_sibling-matching-parent.html]
|
||||
fail-if = fission
|
||||
skip-if = fission # Times out.
|
||||
[test_sibling-off-domain.html]
|
||||
skip-if =
|
||||
fission || # Times out.
|
||||
|
@ -4039,7 +4039,7 @@ already_AddRefed<BrowsingContext> nsGlobalWindowOuter::GetChildWindow(
|
||||
const nsAString& aName) {
|
||||
NS_ENSURE_TRUE(mBrowsingContext, nullptr);
|
||||
|
||||
return do_AddRef(mBrowsingContext->FindChildWithName(aName));
|
||||
return do_AddRef(mBrowsingContext->FindChildWithName(aName, *mBrowsingContext));
|
||||
}
|
||||
|
||||
bool nsGlobalWindowOuter::DispatchCustomEvent(const nsAString& aEventName) {
|
||||
@ -6332,6 +6332,8 @@ void nsGlobalWindowOuter::FinalClose() {
|
||||
// Flag that we were closed.
|
||||
mIsClosed = true;
|
||||
|
||||
GetBrowsingContext()->SetClosed(true);
|
||||
|
||||
// If we get here from CloseOuter then it means that the parent process is
|
||||
// going to close our window for us. It's just important to set mIsClosed.
|
||||
if (XRE_GetProcessType() == GeckoProcessType_Content) {
|
||||
|
@ -21,7 +21,9 @@ function runTest() {
|
||||
xhr.onreadystatechange = function() {
|
||||
if (xhr.readyState == 4) {
|
||||
check(xhr.responseXML.documentElement.getAttribute("root"));
|
||||
SpecialPowers.wrap(parent).location.hash = "#done";
|
||||
SpecialPowers.spawn(parent, [], () => {
|
||||
content.location.hash = "#done";
|
||||
});
|
||||
}
|
||||
}
|
||||
xhr.send(null);
|
||||
@ -29,7 +31,9 @@ function runTest() {
|
||||
|
||||
function check(attr) {
|
||||
if (attr != "yes") {
|
||||
SpeciaPowers.wrap(parent).location.hash = "#fail";
|
||||
SpecialPowers.spawn(parent, [], () => {
|
||||
content.location.hash = "#fail";
|
||||
});
|
||||
throw 1;
|
||||
}
|
||||
}
|
||||
|
@ -310,13 +310,11 @@ skip-if = toolkit == 'android' || headless # headless != clipboard
|
||||
[test_bug320799.html]
|
||||
[test_bug322317.html]
|
||||
[test_bug326337.html]
|
||||
fail-if = fission
|
||||
skip-if = fission && debug # Crashes: @ std::_Function_handler<void (mozilla::Tuple<nsresult, mozilla::dom::PBrowserBridgeParent*>&&), mozilla::dom::WindowGlobalParent::ChangeFrameRemoteness(mozilla::dom::BrowsingContext*, nsTSubstring<char16_t> const&, unsigned long, mozilla::ErrorResult&)::$_2>::_M_invoke(std::_Any_data const&, mozilla::Tuple<nsresult, mozilla::dom::PBrowserBridgeParent*>&&)
|
||||
[test_bug330925.xhtml]
|
||||
[test_bug331959.html]
|
||||
skip-if = fission
|
||||
[test_bug333064.html]
|
||||
skip-if = fission || toolkit == 'android' || headless # Headless: Bug 1405868
|
||||
skip-if = toolkit == 'android' || headless # Headless: Bug 1405868
|
||||
[test_bug333198.html]
|
||||
[test_bug333673.html]
|
||||
[test_bug337631.html]
|
||||
@ -491,7 +489,6 @@ skip-if = (verify && (os == 'win'))
|
||||
[test_bug587931.html]
|
||||
[test_bug588990.html]
|
||||
[test_bug590812.html]
|
||||
fail-if = fission
|
||||
skip-if = toolkit == 'android' || (verify && !debug && (os == 'linux')) #bug 687032
|
||||
[test_bug590870.html]
|
||||
skip-if = fission # Crashes: @ mozilla::dom::ContentParent::RecvDetachBrowsingContext(unsigned long, std::function<void (bool const&)>&&)
|
||||
@ -593,7 +590,7 @@ fail-if = fission
|
||||
[test_bug927196.html]
|
||||
[test_bug962251.html]
|
||||
[test_bug976673.html]
|
||||
fail-if = fission
|
||||
skip-if = fission # Times out in weird ways.
|
||||
[test_bug982153.html]
|
||||
[test_bug999456.html]
|
||||
[test_bug1022229.html]
|
||||
@ -836,7 +833,6 @@ skip-if = debug == false
|
||||
[test_setTimeoutWith0.html]
|
||||
[test_setting_opener.html]
|
||||
[test_shared_compartment1.html]
|
||||
fail-if = fission
|
||||
[test_shared_compartment2.html]
|
||||
fail-if = fission
|
||||
[test_structuredclone_backref.html]
|
||||
@ -882,7 +878,7 @@ fail-if = fission
|
||||
[test_window_proto.html]
|
||||
[test_writable-replaceable.html]
|
||||
[test_x-frame-options.html]
|
||||
fail-if = fission
|
||||
fail-if = fission # Cross-origin X-Frame-Options
|
||||
skip-if = toolkit == 'android' && debug && !is_fennec
|
||||
[test_youtube_flash_embed.html]
|
||||
# Please keep alphabetical order.
|
||||
|
@ -26,7 +26,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1101364
|
||||
<pre id="test">
|
||||
<script class="testbody" type="text/javascript">
|
||||
|
||||
function test()
|
||||
async function test()
|
||||
{
|
||||
var iframe1 = document.getElementById('test1');
|
||||
iframe1.focus();
|
||||
@ -34,11 +34,11 @@ function test()
|
||||
|
||||
// test1
|
||||
docShell.doCommand("cmd_selectAll");
|
||||
var withoutContenteditable = snapshotWindow(iframe1.contentWindow);
|
||||
var withoutContenteditable = await snapshotWindow(iframe1.contentWindow);
|
||||
|
||||
iframe1.contentDocument.getElementById('testDiv').setAttribute('contentEditable', true);
|
||||
docShell.doCommand("cmd_selectAll");
|
||||
var withContenteditable = snapshotWindow(iframe1.contentWindow);
|
||||
var withContenteditable = await snapshotWindow(iframe1.contentWindow);
|
||||
dump(withoutContenteditable.toDataURL());
|
||||
dump(withContenteditable.toDataURL());
|
||||
|
||||
@ -51,11 +51,11 @@ function test()
|
||||
var test2Inner = iframe2.contentDocument.getElementById('test2Inner');
|
||||
test2Inner.style.MozUserSelect = 'text';
|
||||
docShell.doCommand("cmd_selectAll");
|
||||
var withoutUserSelect = snapshotWindow(iframe2.contentWindow);
|
||||
var withoutUserSelect = await snapshotWindow(iframe2.contentWindow);
|
||||
|
||||
test2Inner.style.MozUserSelect = 'none';
|
||||
docShell.doCommand("cmd_selectAll");
|
||||
var withUserSelect = snapshotWindow(iframe2.contentWindow);
|
||||
var withUserSelect = await snapshotWindow(iframe2.contentWindow);
|
||||
ok(compareSnapshots(withoutUserSelect, withUserSelect, true)[0], 'Editable fields should ignore user select style');
|
||||
|
||||
SimpleTest.finish();
|
||||
|
@ -17,10 +17,18 @@
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
||||
function runTest() {
|
||||
sNoXUL = snapshotWindow(window.frames[0], false);
|
||||
sWithXUL = snapshotWindow(window.frames[1], false);
|
||||
sRef = snapshotWindow(window.frames[2], false);
|
||||
async function runTest() {
|
||||
// FIXME(Fission): The load event fires before cross-origin iframes have
|
||||
// loaded (bug 1559841).
|
||||
if (SpecialPowers.useRemoteSubframes) {
|
||||
for (let i = 0; i < 100; i++) {
|
||||
await new Promise(resolve => setTimeout(resolve, 0));
|
||||
}
|
||||
}
|
||||
|
||||
let sNoXUL = await snapshotWindow(window.frames[0], false);
|
||||
let sWithXUL = await snapshotWindow(window.frames[1], false);
|
||||
let sRef = await snapshotWindow(window.frames[2], false);
|
||||
let res;
|
||||
ok(compareSnapshots(sNoXUL, sRef, true)[0],
|
||||
"noxul domain same as ref");
|
||||
|
@ -50,11 +50,11 @@ var refFrame = document.getElementById("iframe-ref")
|
||||
var testFrame = document.getElementById("iframe-test");
|
||||
|
||||
refFrame.addEventListener("load", function() {
|
||||
testFrame.addEventListener("load", function() {
|
||||
testFrame.addEventListener("load", async function() {
|
||||
let {done} = tests.next();
|
||||
if (!done) {
|
||||
ok(compareSnapshots(snapshotWindow(testFrame.contentWindow),
|
||||
snapshotWindow(refFrame.contentWindow), true)[0],
|
||||
ok(compareSnapshots(await snapshotWindow(testFrame.contentWindow),
|
||||
await snapshotWindow(refFrame.contentWindow), true)[0],
|
||||
"bidi is not detected correctly");
|
||||
|
||||
testFrame.contentWindow.location.reload();
|
||||
|
@ -17,83 +17,119 @@
|
||||
var path = "/tests/dom/base/test/";
|
||||
var isUnique = SpecialPowers.getBoolPref("security.data_uri.unique_opaque_origin");
|
||||
|
||||
var testFramesLoaded = function() {
|
||||
var harness = SpecialPowers.wrap(document).getElementById("harness");
|
||||
var testFramesLoaded = async function() {
|
||||
var harness = document.getElementById("harness").contentDocument;
|
||||
|
||||
// FIXME(Fission): The load event fires before cross-origin iframes have
|
||||
// loaded (bug 1559841).
|
||||
if (SpecialPowers.useRemoteSubframes) {
|
||||
for (let i = 0; i < 100; i++) {
|
||||
await new Promise(resolve => setTimeout(resolve, 0));
|
||||
}
|
||||
}
|
||||
|
||||
// iframe from same origin, no X-F-O header - should load
|
||||
var frame = harness.contentDocument.getElementById("control1");
|
||||
var test1 = frame.contentDocument.getElementById("test").textContent;
|
||||
is(test1, "control1", "test control1");
|
||||
var frame = harness.getElementById("control1");
|
||||
await SpecialPowers.spawn(frame, [], () => {
|
||||
var test1 = this.content.document.getElementById("test").textContent;
|
||||
Assert.equal(test1, "control1", "test control1");
|
||||
});
|
||||
|
||||
// iframe from different origin, no X-F-O header - should load
|
||||
frame = harness.contentDocument.getElementById("control2");
|
||||
var test2 = frame.contentDocument.getElementById("test").textContent;
|
||||
is(test2, "control2", "test control2");
|
||||
frame = harness.getElementById("control2");
|
||||
await SpecialPowers.spawn(frame, [], () => {
|
||||
var test2 = this.content.document.getElementById("test").textContent;
|
||||
Assert.equal(test2, "control2", "test control2");
|
||||
});
|
||||
|
||||
// iframe from same origin, X-F-O: DENY - should not load
|
||||
frame = harness.contentDocument.getElementById("deny");
|
||||
var test3 = frame.contentDocument.getElementById("test");
|
||||
is(test3, null, "test deny");
|
||||
frame = harness.getElementById("deny");
|
||||
await SpecialPowers.spawn(frame, [], () => {
|
||||
var test3 = this.content.document.getElementById("test");
|
||||
Assert.equal(test3, null, "test deny");
|
||||
});
|
||||
|
||||
// iframe from same origin, X-F-O: SAMEORIGIN - should load
|
||||
frame = harness.contentDocument.getElementById("sameorigin1");
|
||||
var test4 = frame.contentDocument.getElementById("test").textContent;
|
||||
is(test4, "sameorigin1", "test sameorigin1");
|
||||
frame = harness.getElementById("sameorigin1");
|
||||
await SpecialPowers.spawn(frame, [], () => {
|
||||
var test4 = this.content.document.getElementById("test").textContent;
|
||||
Assert.equal(test4, "sameorigin1", "test sameorigin1");
|
||||
});
|
||||
|
||||
// iframe from different origin, X-F-O: SAMEORIGIN - should not load
|
||||
frame = harness.contentDocument.getElementById("sameorigin2");
|
||||
var test5 = frame.contentDocument.getElementById("test");
|
||||
is(test5, null, "test sameorigin2");
|
||||
frame = harness.getElementById("sameorigin2");
|
||||
await SpecialPowers.spawn(frame, [], () => {
|
||||
var test5 = this.content.document.getElementById("test");
|
||||
Assert.equal(test5, null, "test sameorigin2");
|
||||
});
|
||||
|
||||
// iframe from different origin, X-F-O: SAMEORIGIN, SAMEORIGIN - should not load
|
||||
frame = harness.contentDocument.getElementById("sameorigin5");
|
||||
var test6 = frame.contentDocument.getElementById("test");
|
||||
is(test6, null, "test sameorigin5");
|
||||
frame = harness.getElementById("sameorigin5");
|
||||
await SpecialPowers.spawn(frame, [], () => {
|
||||
var test6 = this.content.document.getElementById("test");
|
||||
Assert.equal(test6, null, "test sameorigin5");
|
||||
});
|
||||
|
||||
// iframe from same origin, X-F-O: SAMEORIGIN, SAMEORIGIN - should load
|
||||
frame = harness.contentDocument.getElementById("sameorigin6");
|
||||
var test7 = frame.contentDocument.getElementById("test").textContent;
|
||||
is(test7, "sameorigin6", "test sameorigin6");
|
||||
frame = harness.getElementById("sameorigin6");
|
||||
await SpecialPowers.spawn(frame, [], () => {
|
||||
var test7 = this.content.document.getElementById("test").textContent;
|
||||
Assert.equal(test7, "sameorigin6", "test sameorigin6");
|
||||
});
|
||||
|
||||
// iframe from same origin, X-F-O: SAMEORIGIN,SAMEORIGIN, SAMEORIGIN - should load
|
||||
frame = harness.contentDocument.getElementById("sameorigin7");
|
||||
var test8 = frame.contentDocument.getElementById("test").textContent;
|
||||
is(test8, "sameorigin7", "test sameorigin7");
|
||||
frame = harness.getElementById("sameorigin7");
|
||||
await SpecialPowers.spawn(frame, [], () => {
|
||||
var test8 = this.content.document.getElementById("test").textContent;
|
||||
Assert.equal(test8, "sameorigin7", "test sameorigin7");
|
||||
});
|
||||
|
||||
// iframe from same origin, X-F-O: SAMEORIGIN,SAMEORIGIN, SAMEORIGIN - should not load
|
||||
frame = harness.contentDocument.getElementById("sameorigin8");
|
||||
var test9 = frame.contentDocument.getElementById("test");
|
||||
is(test9, null, "test sameorigin8");
|
||||
frame = harness.getElementById("sameorigin8");
|
||||
await SpecialPowers.spawn(frame, [], () => {
|
||||
var test9 = this.content.document.getElementById("test");
|
||||
Assert.equal(test9, null, "test sameorigin8");
|
||||
});
|
||||
|
||||
// iframe from same origin, X-F-O: DENY,SAMEORIGIN - should not load
|
||||
frame = harness.contentDocument.getElementById("mixedpolicy");
|
||||
var test10 = frame.contentDocument.getElementById("test");
|
||||
is(test10, null, "test mixedpolicy");
|
||||
frame = harness.getElementById("mixedpolicy");
|
||||
await SpecialPowers.spawn(frame, [], () => {
|
||||
var test10 = this.content.document.getElementById("test");
|
||||
Assert.equal(test10, null, "test mixedpolicy");
|
||||
});
|
||||
|
||||
// iframe from different origin, allow-from: this origin - should load
|
||||
frame = harness.contentDocument.getElementById("allow-from-allow");
|
||||
var test11 = frame.contentDocument.getElementById("test").textContent;
|
||||
is(test11, "allow-from-allow", "test allow-from-allow");
|
||||
frame = harness.getElementById("allow-from-allow");
|
||||
await SpecialPowers.spawn(frame, [], () => {
|
||||
var test11 = this.content.document.getElementById("test").textContent;
|
||||
Assert.equal(test11, "allow-from-allow", "test allow-from-allow");
|
||||
});
|
||||
|
||||
// iframe from different origin, with allow-from: other - should load as we no longer support allow-from (Bug 1301529)
|
||||
frame = harness.contentDocument.getElementById("allow-from-deny");
|
||||
var test12 = frame.contentDocument.getElementById("test");
|
||||
isnot(test12, null, "test allow-from-deny");
|
||||
frame = harness.getElementById("allow-from-deny");
|
||||
await SpecialPowers.spawn(frame, [], () => {
|
||||
var test12 = this.content.document.getElementById("test");
|
||||
Assert.notEqual(test12, null, "test allow-from-deny");
|
||||
});
|
||||
|
||||
// iframe from different origin, X-F-O: SAMEORIGIN, multipart - should not load
|
||||
frame = harness.contentDocument.getElementById("sameorigin-multipart");
|
||||
var test13 = frame.contentDocument.getElementById("test");
|
||||
is(test13, null, "test sameorigin-multipart");
|
||||
frame = harness.getElementById("sameorigin-multipart");
|
||||
await SpecialPowers.spawn(frame, [], () => {
|
||||
var test13 = this.content.document.getElementById("test");
|
||||
Assert.equal(test13, null, "test sameorigin-multipart");
|
||||
});
|
||||
|
||||
// iframe from same origin, X-F-O: SAMEORIGIN, multipart - should load
|
||||
frame = harness.contentDocument.getElementById("sameorigin-multipart2");
|
||||
var test14 = frame.contentDocument.getElementById("test").textContent;
|
||||
is(test14, "sameorigin-multipart2", "test sameorigin-multipart2");
|
||||
frame = harness.getElementById("sameorigin-multipart2");
|
||||
await SpecialPowers.spawn(frame, [], () => {
|
||||
var test14 = this.content.document.getElementById("test").textContent;
|
||||
Assert.equal(test14, "sameorigin-multipart2", "test sameorigin-multipart2");
|
||||
});
|
||||
|
||||
|
||||
// frames from bug 836132 tests, no longer supported allow-from
|
||||
{
|
||||
frame = harness.contentDocument.getElementById("allow-from-allow-1");
|
||||
frame = harness.getElementById("allow-from-allow-1");
|
||||
var theTestResult = frame.contentDocument.getElementById("test");
|
||||
isnot(theTestResult, null, "test afa1 should have been allowed");
|
||||
if(theTestResult) {
|
||||
@ -102,7 +138,7 @@ var testFramesLoaded = function() {
|
||||
}
|
||||
// Verify allow-from no longer works
|
||||
for (var i = 1; i<=14; i++) {
|
||||
frame = harness.contentDocument.getElementById("allow-from-deny-" + i);
|
||||
frame = harness.getElementById("allow-from-deny-" + i);
|
||||
var theTestResult = frame.contentDocument.getElementById("test");
|
||||
isnot(theTestResult, null, "test allow-from-deny-" + i);
|
||||
}
|
||||
|
@ -39,15 +39,15 @@ function runTest() {
|
||||
iframe.height = "1000px";
|
||||
|
||||
var step1, stepfinish;
|
||||
iframe.addEventListener("mozbrowsershowmodalprompt", function(e) {
|
||||
iframe.addEventListener("mozbrowsershowmodalprompt", async function(e) {
|
||||
switch (e.detail.message) {
|
||||
case "step 1":
|
||||
step1 = SpecialPowers.snapshotWindow(iframe.contentWindow);
|
||||
step1 = await SpecialPowers.snapshotWindow(iframe.contentWindow);
|
||||
break;
|
||||
case "step 2":
|
||||
// The page has now attempted to load the X-Frame-Options page; take
|
||||
// another screenshot.
|
||||
stepfinish = SpecialPowers.snapshotWindow(iframe.contentWindow);
|
||||
stepfinish = await SpecialPowers.snapshotWindow(iframe.contentWindow);
|
||||
ok(
|
||||
step1.toDataURL() == stepfinish.toDataURL(),
|
||||
"Screenshots should be identical"
|
||||
|
@ -52,7 +52,7 @@ function runTest(canvasWidth, canvasHeight, nextTest) {
|
||||
ctx.fillStyle = "#00FF00";
|
||||
ctx.fillRect(0, 0, canvasWidth, canvasHeight);
|
||||
|
||||
createImageBitmap(canvas1).then(function(bmp) {
|
||||
createImageBitmap(canvas1).then(async function(bmp) {
|
||||
document.body.removeChild(canvas1);
|
||||
|
||||
var canvas2 = createCanvas(90, 90);
|
||||
@ -64,11 +64,11 @@ function runTest(canvasWidth, canvasHeight, nextTest) {
|
||||
// Exam render result
|
||||
canvasRef.style.display = "none";
|
||||
canvas2.style.display = "block";
|
||||
var snapshot = snapshotWindow(window);
|
||||
var snapshot = await snapshotWindow(window);
|
||||
|
||||
canvasRef.style.display = "block";
|
||||
canvas2.style.display = "none";
|
||||
var snapshotRef = snapshotWindow(window);
|
||||
var snapshotRef = await snapshotWindow(window);
|
||||
|
||||
// bitmaprenderers use an ImageLayer whereas a normal 2d canvas uses a canvas layer. This
|
||||
// can result in some anti-aliasing differences on the edge. We consider slight AA differences
|
||||
@ -102,7 +102,7 @@ function scaleTest() {
|
||||
|
||||
var p1 = createImageBitmap(canvas1);
|
||||
var p2 = createImageBitmap(canvas2);
|
||||
Promise.all([p1, p2]).then(function(bitmaps) {
|
||||
Promise.all([p1, p2]).then(async function(bitmaps) {
|
||||
document.body.removeChild(canvas1);
|
||||
document.body.removeChild(canvas2);
|
||||
|
||||
@ -110,22 +110,22 @@ function scaleTest() {
|
||||
var canvas3 = createCanvas(128, 128);
|
||||
var ctx3 = canvas3.getContext("bitmaprenderer");
|
||||
ctx3.transferFromImageBitmap(bitmaps[0]);
|
||||
var snapshotLargeRef = snapshotWindow(window);
|
||||
var snapshotLargeRef = await snapshotWindow(window);
|
||||
|
||||
canvas3.width = 32;
|
||||
canvas3.height = 32;
|
||||
var snapshotSmall = snapshotWindow(window);
|
||||
var snapshotSmall = await snapshotWindow(window);
|
||||
document.body.removeChild(canvas3);
|
||||
|
||||
// Create a small canvas then grow.
|
||||
var canvas4 = createCanvas(32, 32);
|
||||
var ctx4 = canvas4.getContext("bitmaprenderer");
|
||||
ctx4.transferFromImageBitmap(bitmaps[1]);
|
||||
var snapshotSmallRef = snapshotWindow(window);
|
||||
var snapshotSmallRef = await snapshotWindow(window);
|
||||
|
||||
canvas4.width = 128;
|
||||
canvas4.height = 128;
|
||||
var snapshotLarge = snapshotWindow(window);
|
||||
var snapshotLarge = await snapshotWindow(window);
|
||||
document.body.removeChild(canvas4);
|
||||
|
||||
var resultsLarge = compareSnapshots(snapshotLarge, snapshotLargeRef, true);
|
||||
|
@ -23,13 +23,13 @@ function createCanvas(initWithMask) {
|
||||
return canvas;
|
||||
}
|
||||
|
||||
function getRefSnapshot(initWithMask) {
|
||||
async function getRefSnapshot(initWithMask) {
|
||||
var refCanvas = createCanvas(!initWithMask);
|
||||
var ctx = refCanvas.getContext("2d");
|
||||
ctx.rect(0, 0, 64, 64);
|
||||
ctx.fillStyle = "#00FF00";
|
||||
ctx.fill();
|
||||
var result = snapshotWindow(window);
|
||||
var result = await snapshotWindow(window);
|
||||
document.body.removeChild(refCanvas);
|
||||
return result;
|
||||
}
|
||||
@ -38,7 +38,7 @@ function runTest(initWithMask) {
|
||||
var htmlCanvas = createCanvas(initWithMask);
|
||||
var worker = new Worker("offscreencanvas.js");
|
||||
|
||||
worker.onmessage = function(evt) {
|
||||
worker.onmessage = async function(evt) {
|
||||
var msg = evt.data || {};
|
||||
if (msg.type == "draw") {
|
||||
if (msg.count === 10) {
|
||||
@ -49,11 +49,11 @@ function runTest(initWithMask) {
|
||||
htmlCanvas.style.mask = "url('offscreencanvas_mask.svg#fade_mask_both')";
|
||||
}
|
||||
} else if (msg.count === 20) {
|
||||
var snapshotFallback = snapshotWindow(window);
|
||||
worker.terminate();
|
||||
var snapshotFallback = await snapshotWindow(window);
|
||||
document.body.removeChild(htmlCanvas);
|
||||
|
||||
var results = compareSnapshots(snapshotFallback, getRefSnapshot(initWithMask), true);
|
||||
var results = compareSnapshots(snapshotFallback, await getRefSnapshot(initWithMask), true);
|
||||
ok(results[0], "after dynamic fallback, screenshots should be the same");
|
||||
|
||||
if (initWithMask) {
|
||||
|
@ -11,8 +11,8 @@ interface BrowsingContext {
|
||||
|
||||
static BrowsingContext? getFromWindow(WindowProxy window);
|
||||
|
||||
BrowsingContext? findChildWithName(DOMString name);
|
||||
BrowsingContext? findWithName(DOMString name);
|
||||
BrowsingContext? findChildWithName(DOMString name, BrowsingContext accessor);
|
||||
BrowsingContext? findWithName(DOMString name, BrowsingContext accessor);
|
||||
|
||||
readonly attribute DOMString name;
|
||||
|
||||
|
@ -29,7 +29,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=864040
|
||||
* actually drawn on the newline.
|
||||
*/
|
||||
|
||||
function testSelectEndOfText(elem) {
|
||||
async function testSelectEndOfText(elem) {
|
||||
var tn = elem.tagName;
|
||||
elem.focus();
|
||||
|
||||
@ -43,7 +43,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=864040
|
||||
var refoffset = result.offset;
|
||||
|
||||
// Take a snapshot of where the caret is (on the new line)
|
||||
referenceSnapshot = snapshotWindow(window, true /* withCaret */);
|
||||
referenceSnapshot = await snapshotWindow(window, true /* withCaret */);
|
||||
ok(referenceSnapshot, tn + ': failed to take snapshot (1)');
|
||||
|
||||
// Set selection to the same spot through a selection event
|
||||
@ -55,7 +55,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=864040
|
||||
is(result.offset, refoffset, tn + ': caret is not at the right position');
|
||||
|
||||
// Take a snapshot of where the new caret is (shoud still be on the new line)
|
||||
testSnapshot = snapshotWindow(window, true /* withCaret */);
|
||||
testSnapshot = await snapshotWindow(window, true /* withCaret */);
|
||||
ok(testSnapshot, tn + ': failed to take snapshot (2)');
|
||||
|
||||
// Compare snapshot (should be the same)
|
||||
@ -69,12 +69,12 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=864040
|
||||
}
|
||||
}
|
||||
|
||||
function runTests() {
|
||||
async function runTests() {
|
||||
// we don't test regular <input> because this test is about multiline support
|
||||
// test textarea
|
||||
testSelectEndOfText(document.getElementById('ta'));
|
||||
await testSelectEndOfText(document.getElementById('ta'));
|
||||
// test contentEditable
|
||||
testSelectEndOfText(document.getElementById('ce'));
|
||||
await testSelectEndOfText(document.getElementById('ce'));
|
||||
SimpleTest.finish();
|
||||
}
|
||||
|
||||
|
@ -22,16 +22,16 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=829606
|
||||
|
||||
var gTestRunner = null;
|
||||
|
||||
function test(aElementName)
|
||||
async function test(aElementName)
|
||||
{
|
||||
var element = document.getElementsByTagName(aElementName)[0];
|
||||
element.focus();
|
||||
|
||||
var baseSnapshot = snapshotWindow(window);
|
||||
var baseSnapshot = await snapshotWindow(window);
|
||||
|
||||
// This is a sanity check.
|
||||
var s2 = snapshotWindow(window);
|
||||
var results = compareSnapshots(baseSnapshot, snapshotWindow(window), true);
|
||||
var s2 = await snapshotWindow(window);
|
||||
var results = compareSnapshots(baseSnapshot, await snapshotWindow(window), true);
|
||||
ok(results[0], "sanity check: screenshots should be the same");
|
||||
|
||||
element.selectionStart = element.selectionEnd = element.value.length;
|
||||
@ -39,13 +39,13 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=829606
|
||||
setTimeout(function() {
|
||||
sendString('f');
|
||||
|
||||
requestAnimationFrame(function() {
|
||||
var selectionAtTheEndSnapshot = snapshotWindow(window);
|
||||
requestAnimationFrame(async function() {
|
||||
var selectionAtTheEndSnapshot = await snapshotWindow(window);
|
||||
results = compareSnapshots(baseSnapshot, selectionAtTheEndSnapshot, false);
|
||||
ok(results[0], "after appending a character, string should have changed");
|
||||
|
||||
element.value = element.value;
|
||||
var tmpSnapshot = snapshotWindow(window);
|
||||
var tmpSnapshot = await snapshotWindow(window);
|
||||
|
||||
results = compareSnapshots(baseSnapshot, tmpSnapshot, false);
|
||||
ok(results[0], "re-settig the value should change nothing");
|
||||
@ -63,7 +63,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=829606
|
||||
|
||||
// This test checks that when a textarea has a long list of values and the
|
||||
// textarea's value is then changed, the values are shown correctly.
|
||||
function testCorrectUpdateOnScroll()
|
||||
async function testCorrectUpdateOnScroll()
|
||||
{
|
||||
var textarea = document.createElement('textarea');
|
||||
textarea.rows = 5;
|
||||
@ -71,18 +71,18 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=829606
|
||||
textarea.value = 'a\nb\nc\nd';
|
||||
document.getElementById('content').appendChild(textarea);
|
||||
|
||||
var baseSnapshot = snapshotWindow(window);
|
||||
var baseSnapshot = await snapshotWindow(window);
|
||||
|
||||
textarea.value = '1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n';
|
||||
textarea.selectionStart = textarea.selectionEnd = textarea.value.length;
|
||||
|
||||
var fullSnapshot = snapshotWindow(window);
|
||||
var fullSnapshot = await snapshotWindow(window);
|
||||
var results = compareSnapshots(baseSnapshot, fullSnapshot, false);
|
||||
ok(results[0], "sanity check: screenshots should not be the same");
|
||||
|
||||
textarea.value = 'a\nb\nc\nd';
|
||||
|
||||
var tmpSnapshot = snapshotWindow(window);
|
||||
var tmpSnapshot = await snapshotWindow(window);
|
||||
results = compareSnapshots(baseSnapshot, tmpSnapshot, true);
|
||||
ok(results[0], "textarea view should look like the beginning");
|
||||
|
||||
|
@ -20,13 +20,13 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=611189
|
||||
|
||||
/** Test for Bug 611189 **/
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
addLoadEvent(function() {
|
||||
addLoadEvent(async function() {
|
||||
var i = document.createElement("input");
|
||||
var b = document.getElementById("content");
|
||||
b.appendChild(i);
|
||||
b.clientWidth; // bind to frame
|
||||
i.focus(); // initialize editor
|
||||
var before = snapshotWindow(window, true);
|
||||
var before = await snapshotWindow(window, true);
|
||||
i.value = "L"; // set the value
|
||||
i.style.display = "none";
|
||||
b.clientWidth; // unbind from frame
|
||||
@ -34,7 +34,7 @@ addLoadEvent(function() {
|
||||
i.style.display = "";
|
||||
b.clientWidth; // rebind to frame
|
||||
is(i.value, "", "Input's value should be correctly updated");
|
||||
var after = snapshotWindow(window, true);
|
||||
var after = await snapshotWindow(window, true);
|
||||
ok(compareSnapshots(before, after, true), "The correct value should be rendered inside the control");
|
||||
SimpleTest.finish();
|
||||
});
|
||||
|
@ -5,6 +5,7 @@
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
include "mozilla/GfxMessageUtils.h";
|
||||
include "mozilla/dom/DocShellMessageUtils.h";
|
||||
include "mozilla/layers/LayersMessageUtils.h";
|
||||
|
||||
include IPCBlob;
|
||||
|
@ -4,6 +4,8 @@
|
||||
* 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 "mozilla/dom/DocShellMessageUtils.h";
|
||||
|
||||
include protocol PBrowser;
|
||||
include protocol PInProcess;
|
||||
include protocol PBrowserBridge;
|
||||
@ -14,6 +16,7 @@ using JSWindowActorMessageKind from "mozilla/dom/JSWindowActor.h";
|
||||
using mozilla::gfx::IntRect from "mozilla/gfx/Rect.h";
|
||||
using moveonly mozilla::gfx::PaintFragment from "mozilla/gfx/CrossProcessPaint.h";
|
||||
using nscolor from "nsColor.h";
|
||||
using refcounted class nsDocShellLoadState from "nsDocShellLoadState.h";
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
@ -50,10 +53,17 @@ child:
|
||||
*/
|
||||
async GetSecurityInfo() returns(nsCString? serializedSecInfo);
|
||||
|
||||
async LoadURIInChild(nsDocShellLoadState aLoadState);
|
||||
|
||||
both:
|
||||
async RawMessage(JSWindowActorMessageMeta aMetadata, ClonedMessageData aData);
|
||||
|
||||
parent:
|
||||
// Load the given URI load state into the current owner process of the given
|
||||
// BrowsingContext. aTargetBC must be in the same BrowsingContextGroup as this
|
||||
// window global.
|
||||
async LoadURI(BrowsingContext aTargetBC, nsDocShellLoadState aLoadState);
|
||||
|
||||
/// Update the URI of the document in this WindowGlobal.
|
||||
async UpdateDocumentURI(nsIURI aUri);
|
||||
|
||||
|
@ -228,6 +228,12 @@ void WindowGlobalChild::Destroy() {
|
||||
}
|
||||
}
|
||||
|
||||
mozilla::ipc::IPCResult WindowGlobalChild::RecvLoadURIInChild(
|
||||
nsDocShellLoadState* aLoadState) {
|
||||
mWindowGlobal->GetDocShell()->LoadURI(aLoadState);
|
||||
return IPC_OK();
|
||||
}
|
||||
|
||||
static nsresult ChangeFrameRemoteness(WindowGlobalChild* aWgc,
|
||||
BrowsingContext* aBc,
|
||||
const nsString& aRemoteType,
|
||||
|
@ -114,6 +114,8 @@ class WindowGlobalChild final : public WindowGlobalActor,
|
||||
mozilla::ipc::IPCResult RecvRawMessage(const JSWindowActorMessageMeta& aMeta,
|
||||
const ClonedMessageData& aData);
|
||||
|
||||
mozilla::ipc::IPCResult RecvLoadURIInChild(nsDocShellLoadState* aLoadState);
|
||||
|
||||
mozilla::ipc::IPCResult RecvChangeFrameRemoteness(
|
||||
dom::BrowsingContext* aBc, const nsString& aRemoteType,
|
||||
uint64_t aPendingSwitchId, ChangeFrameRemotenessResolver&& aResolver);
|
||||
|
@ -173,6 +173,38 @@ bool WindowGlobalParent::IsProcessRoot() {
|
||||
return ContentParentId() != embedder->ContentParentId();
|
||||
}
|
||||
|
||||
mozilla::ipc::IPCResult WindowGlobalParent::RecvLoadURI(
|
||||
dom::BrowsingContext* aTargetBC,
|
||||
nsDocShellLoadState* aLoadState) {
|
||||
if (!aTargetBC || aTargetBC->IsDiscarded()) {
|
||||
MOZ_LOG(
|
||||
BrowsingContext::GetLog(), LogLevel::Debug,
|
||||
("ParentIPC: Trying to send a message with dead or detached context"));
|
||||
return IPC_OK();
|
||||
}
|
||||
|
||||
// FIXME: For cross-process loads, we should double check CanAccess() for the
|
||||
// source browsing context in the parent process.
|
||||
|
||||
if (aTargetBC->Group() != BrowsingContext()->Group()) {
|
||||
return IPC_FAIL(this, "Illegal cross-group BrowsingContext load");
|
||||
}
|
||||
|
||||
// FIXME: We should really initiate the load in the parent before bouncing
|
||||
// back down to the child.
|
||||
|
||||
WindowGlobalParent* wgp = aTargetBC->Canonical()->GetCurrentWindowGlobal();
|
||||
if (!wgp) {
|
||||
MOZ_LOG(
|
||||
BrowsingContext::GetLog(), LogLevel::Debug,
|
||||
("ParentIPC: Target BrowsingContext has no WindowGlobalParent"));
|
||||
return IPC_OK();
|
||||
}
|
||||
|
||||
Unused << wgp->SendLoadURIInChild(aLoadState);
|
||||
return IPC_OK();
|
||||
}
|
||||
|
||||
IPCResult WindowGlobalParent::RecvUpdateDocumentURI(nsIURI* aURI) {
|
||||
// XXX(nika): Assert that the URI change was one which makes sense (either
|
||||
// about:blank -> a real URI, or a legal push/popstate URI change?)
|
||||
|
@ -139,6 +139,8 @@ class WindowGlobalParent final : public WindowGlobalActor,
|
||||
JSWindowActor::Type GetSide() override { return JSWindowActor::Type::Parent; }
|
||||
|
||||
// IPC messages
|
||||
mozilla::ipc::IPCResult RecvLoadURI(dom::BrowsingContext* aTargetBC,
|
||||
nsDocShellLoadState* aLoadState);
|
||||
mozilla::ipc::IPCResult RecvUpdateDocumentURI(nsIURI* aURI);
|
||||
mozilla::ipc::IPCResult RecvSetIsInitialDocument(bool aIsInitialDocument) {
|
||||
mIsInitialDocument = aIsInitialDocument;
|
||||
|
@ -309,7 +309,6 @@ skip-if = toolkit == 'android'
|
||||
[test_docwrite_meta.html]
|
||||
[test_multipartchannel.html]
|
||||
[test_fontloader.html]
|
||||
fail-if = fission
|
||||
[test_block_all_mixed_content.html]
|
||||
tags = mcb
|
||||
[test_block_all_mixed_content_frame_navigation.html]
|
||||
|
@ -57,11 +57,11 @@ var counter = -1;
|
||||
var baselineframe = document.getElementById("baselineframe");
|
||||
var testframe = document.getElementById("testframe");
|
||||
|
||||
function checkResult() {
|
||||
async function checkResult() {
|
||||
testframe.removeEventListener('load', checkResult);
|
||||
try {
|
||||
ok(compareSnapshots(snapshotWindow(baselineframe.contentWindow),
|
||||
snapshotWindow(testframe.contentWindow),
|
||||
ok(compareSnapshots(await snapshotWindow(baselineframe.contentWindow),
|
||||
await snapshotWindow(testframe.contentWindow),
|
||||
curTest.expected)[0],
|
||||
curTest.description);
|
||||
} catch(err) {
|
||||
|
@ -101,7 +101,6 @@ support-files = tearoff_with_cc_helper.html
|
||||
[test_transform.xhtml]
|
||||
[test_transformParsing.html]
|
||||
[test_use_with_hsts.html]
|
||||
skip-if = fission
|
||||
support-files = use-with-hsts-helper.html use-with-hsts-helper.html^headers^
|
||||
[test_valueAsString.xhtml]
|
||||
[test_valueLeaks.xhtml]
|
||||
|
@ -23,7 +23,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=886230
|
||||
</div>
|
||||
<pre id="test">
|
||||
<script class="testbody" type="text/javascript">
|
||||
function runTest() {
|
||||
async function runTest() {
|
||||
var svgText = document.getElementById("t");
|
||||
|
||||
// Dirty the frames.
|
||||
@ -32,7 +32,7 @@ function runTest() {
|
||||
|
||||
// Paint without flushing layout. If the test fails, we'll trigger
|
||||
// an assertion.
|
||||
SpecialPowers.snapshotWindowWithOptions(window, undefined, undefined, { DRAWWINDOW_DO_NOT_FLUSH: true });
|
||||
await SpecialPowers.snapshotWindowWithOptions(window, undefined, undefined, { DRAWWINDOW_DO_NOT_FLUSH: true });
|
||||
|
||||
ok(true);
|
||||
SimpleTest.finish();
|
||||
|
@ -73,11 +73,11 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1247733
|
||||
// Capture a snapshot with nothing in the iframe, so we can do a
|
||||
// sanity-check not-equal comparison against our reference case, to be
|
||||
// sure we're rendering anything at all:
|
||||
let blankSnapshot = snapshotWindow(iframeWin);
|
||||
let blankSnapshot = await snapshotWindow(iframeWin);
|
||||
|
||||
// Load & snapshot a reference case (fully lime):
|
||||
await LoadIframeAsync("data:text/html,<body style='background:lime'>");
|
||||
let refSnapshot = snapshotWindow(iframeWin);
|
||||
let refSnapshot = await snapshotWindow(iframeWin);
|
||||
|
||||
// Ensure reference snapshot looks different from blank snapshot:
|
||||
assertSnapshots(refSnapshot, blankSnapshot,
|
||||
@ -92,7 +92,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1247733
|
||||
|
||||
// Load & snapshot secure (HTTPS) version of testcase, & check against ref:
|
||||
await LoadIframeAsync(secureURI);
|
||||
let secureSnapshot = snapshotWindow(iframeWin);
|
||||
let secureSnapshot = await snapshotWindow(iframeWin);
|
||||
assertSnapshots(secureSnapshot, refSnapshot,
|
||||
true /* equal*/, null /* no fuzz*/,
|
||||
"secureSnapshot", "refSnapshot");
|
||||
@ -108,7 +108,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1247733
|
||||
"test should've attempted to load insecure HTTP URI, to exercise HSTS");
|
||||
|
||||
// Capture snapshot of iframe showing upgraded-to-HTTPS version of testcase:
|
||||
let upgradedSnapshot = snapshotWindow(iframeWin);
|
||||
let upgradedSnapshot = await snapshotWindow(iframeWin);
|
||||
assertSnapshots(upgradedSnapshot, refSnapshot,
|
||||
true /* equal*/, null /* no fuzz*/,
|
||||
"upgradedSnapshot", "refSnapshot");
|
||||
|
@ -15,18 +15,18 @@
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
||||
function onBodyLoad() {
|
||||
async function onBodyLoad() {
|
||||
window.frames[0].document.getElementById("test").selectedIndex = 0;
|
||||
window.frames[0].document.getElementById("test").selectedIndex = 1;
|
||||
|
||||
snap1 = snapshotWindow(window);
|
||||
snap1 = await snapshotWindow(window);
|
||||
|
||||
document.getElementById("test").onload = onFrameLoad;
|
||||
window.frames[0].location.reload();
|
||||
}
|
||||
|
||||
function onFrameLoad() {
|
||||
snap2 = snapshotWindow(window);
|
||||
async function onFrameLoad() {
|
||||
snap2 = await snapshotWindow(window);
|
||||
|
||||
var equal, str1, str2;
|
||||
[equal, str1, str2] = compareSnapshots(snap1, snap2, true);
|
||||
|
@ -123,7 +123,6 @@ skip-if = verify
|
||||
[test_bug614392.html]
|
||||
[test_bug657191.html]
|
||||
[test_bug671906.html]
|
||||
fail-if = fission
|
||||
[test_bug733553.html]
|
||||
skip-if = verify
|
||||
[test_bug767779.html]
|
||||
|
@ -21,19 +21,19 @@ var correct, val1, val2;
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
||||
function snapshotFirst()
|
||||
async function snapshotFirst()
|
||||
{
|
||||
var iframeelem = document.getElementById('test-iframe');
|
||||
first = snapshotWindow(iframeelem.contentWindow, false);
|
||||
first = await snapshotWindow(iframeelem, false);
|
||||
|
||||
iframeelem.onload = snapshotSecond;
|
||||
iframeelem.src = "http://example.com/tests/image/test/mochitest/bug671906-iframe.html";
|
||||
}
|
||||
|
||||
function snapshotSecond()
|
||||
async function snapshotSecond()
|
||||
{
|
||||
var iframeelem = document.getElementById('test-iframe');
|
||||
second = snapshotWindow(iframeelem.contentWindow, false);
|
||||
second = await snapshotWindow(iframeelem, false);
|
||||
|
||||
// We must have loaded the image again, because the principals for the
|
||||
// loading document are different.
|
||||
@ -44,10 +44,10 @@ function snapshotSecond()
|
||||
iframeelem.src = "http://mochi.test:8888/tests/image/test/mochitest/bug671906-iframe.html";
|
||||
}
|
||||
|
||||
function snapshotThird()
|
||||
async function snapshotThird()
|
||||
{
|
||||
var iframeelem = document.getElementById('test-iframe');
|
||||
third = snapshotWindow(iframeelem.contentWindow, false);
|
||||
third = await snapshotWindow(iframeelem, false);
|
||||
|
||||
// We must have loaded the image again, because the principals for the
|
||||
// loading document are different.
|
||||
|
@ -21,7 +21,7 @@ from os import environ as env
|
||||
from subprocess import Popen
|
||||
from threading import Timer
|
||||
|
||||
Dirs = namedtuple('Dirs', ['scripts', 'js_src', 'source', 'tooltool'])
|
||||
Dirs = namedtuple('Dirs', ['scripts', 'js_src', 'source', 'tooltool', 'fetches'])
|
||||
|
||||
|
||||
def directories(pathmodule, cwd, fixup=lambda s: s):
|
||||
@ -30,7 +30,9 @@ def directories(pathmodule, cwd, fixup=lambda s: s):
|
||||
source = pathmodule.abspath(pathmodule.join(js_src, "..", ".."))
|
||||
tooltool = pathmodule.abspath(env.get('TOOLTOOL_CHECKOUT',
|
||||
pathmodule.join(source, "..", "..")))
|
||||
return Dirs(scripts, js_src, source, tooltool)
|
||||
fetches = pathmodule.abspath(env.get('MOZ_FETCHES_DIR',
|
||||
pathmodule.join(source, "..", "..")))
|
||||
return Dirs(scripts, js_src, source, tooltool, fetches)
|
||||
|
||||
|
||||
# Some scripts will be called with sh, which cannot use backslashed
|
||||
@ -109,7 +111,7 @@ POBJDIR = posixpath.join(PDIR.source, args.objdir)
|
||||
MAKE = env.get('MAKE', 'make')
|
||||
MAKEFLAGS = env.get('MAKEFLAGS', '-j6' + ('' if AUTOMATION else ' -s'))
|
||||
|
||||
for d in ('scripts', 'js_src', 'source', 'tooltool'):
|
||||
for d in ('scripts', 'js_src', 'source', 'tooltool', 'fetches'):
|
||||
info("DIR.{name} = {dir}".format(name=d, dir=getattr(DIR, d)))
|
||||
|
||||
|
||||
@ -228,7 +230,7 @@ info("using compiler '{}'".format(compiler))
|
||||
|
||||
cxx = {'clang': 'clang++', 'gcc': 'g++', 'cl': 'cl'}.get(compiler)
|
||||
|
||||
compiler_dir = env.get('GCCDIR', os.path.join(DIR.tooltool, compiler))
|
||||
compiler_dir = env.get('GCCDIR', os.path.join(DIR.fetches, compiler))
|
||||
info("looking for compiler under {}/".format(compiler_dir))
|
||||
if os.path.exists(os.path.join(compiler_dir, 'bin', compiler)):
|
||||
env.setdefault('CC', os.path.join(compiler_dir, 'bin', compiler))
|
||||
@ -249,7 +251,7 @@ env['LD_LIBRARY_PATH'] = ':'.join(
|
||||
for v in ('CC', 'CXX', 'LD_LIBRARY_PATH'):
|
||||
info("default {name} = {value}".format(name=v, value=env[v]))
|
||||
|
||||
rust_dir = os.path.join(DIR.tooltool, 'rustc')
|
||||
rust_dir = os.path.join(DIR.fetches, 'rustc')
|
||||
if os.path.exists(os.path.join(rust_dir, 'bin', 'rustc')):
|
||||
env.setdefault('RUSTC', os.path.join(rust_dir, 'bin', 'rustc'))
|
||||
env.setdefault('CARGO', os.path.join(rust_dir, 'bin', 'cargo'))
|
||||
@ -337,6 +339,7 @@ def run_command(command, check=False, **kwargs):
|
||||
REPLACEMENTS = {
|
||||
'DIR': DIR.scripts,
|
||||
'TOOLTOOL_CHECKOUT': DIR.tooltool,
|
||||
'MOZ_FETCHES_DIR': DIR.fetches,
|
||||
'MOZ_UPLOAD_DIR': env['MOZ_UPLOAD_DIR'],
|
||||
'OUTDIR': OUTDIR,
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
"debug": false,
|
||||
"compiler": "clang",
|
||||
"env": {
|
||||
"LLVM_SYMBOLIZER": "{TOOLTOOL_CHECKOUT}/clang/bin/llvm-symbolizer"
|
||||
"LLVM_SYMBOLIZER": "{MOZ_FETCHES_DIR}/clang/bin/llvm-symbolizer"
|
||||
},
|
||||
"use_minidump": false
|
||||
}
|
||||
|
@ -6,8 +6,8 @@
|
||||
"env": {
|
||||
"JITTEST_EXTRA_ARGS": "--jitflags=none",
|
||||
"JSTESTS_EXTRA_ARGS": "--jitflags=none",
|
||||
"LLVM_SYMBOLIZER": "{TOOLTOOL_CHECKOUT}/clang/bin/llvm-symbolizer",
|
||||
"ASAN_SYMBOLIZER_PATH": "{TOOLTOOL_CHECKOUT}/clang/bin/llvm-symbolizer"
|
||||
"LLVM_SYMBOLIZER": "{MOZ_FETCHES_DIR}/clang/bin/llvm-symbolizer",
|
||||
"ASAN_SYMBOLIZER_PATH": "{MOZ_FETCHES_DIR}/clang/bin/llvm-symbolizer"
|
||||
},
|
||||
"use_minidump": false
|
||||
}
|
||||
|
@ -6,7 +6,7 @@
|
||||
"env": {
|
||||
"JITTEST_EXTRA_ARGS": "--jitflags=interp --ignore-timeouts={DIR}/cgc-jittest-timeouts.txt",
|
||||
"JSTESTS_EXTRA_ARGS": "--jitflags=interp --exclude-file={DIR}/cgc-jstests-slow.txt",
|
||||
"MSAN_OPTIONS": "external_symbolizer_path={TOOLTOOL_CHECKOUT}/clang/bin/llvm-symbolizer:log_path={OUTDIR}/sanitize_log"
|
||||
"MSAN_OPTIONS": "external_symbolizer_path={MOZ_FETCHES_DIR}/clang/bin/llvm-symbolizer:log_path={OUTDIR}/sanitize_log"
|
||||
},
|
||||
"ignore-test-failures": "true",
|
||||
"max-errors": 7,
|
||||
|
@ -4,7 +4,7 @@
|
||||
"debug": false,
|
||||
"compiler": "clang",
|
||||
"env": {
|
||||
"LLVM_SYMBOLIZER": "{TOOLTOOL_CHECKOUT}/clang/bin/llvm-symbolizer",
|
||||
"LLVM_SYMBOLIZER": "{MOZ_FETCHES_DIR}/clang/bin/llvm-symbolizer",
|
||||
"JITTEST_EXTRA_ARGS": "--jitflags=tsan --ignore-timeouts={DIR}/cgc-jittest-timeouts.txt --unusable-error-status --exclude-from={DIR}/tsan-slow.txt",
|
||||
"JSTESTS_EXTRA_ARGS": "--exclude-file={DIR}/cgc-jstests-slow.txt"
|
||||
},
|
||||
|
@ -76,7 +76,7 @@ dragons. To use it on SpiderMonkey:
|
||||
|
||||
mkdir work
|
||||
cd work
|
||||
( export GECKO_DIR=$SRCDIR; $GECKO_DIR/taskcluster/scripts/builder/build-haz-linux.sh $(pwd) --dep )
|
||||
( export GECKO_PATH=$SRCDIR; $GECKO_PATH/taskcluster/scripts/builder/build-haz-linux.sh $(pwd) --dep )
|
||||
|
||||
The `--dep` is optional, and will avoid rebuilding the JS shell used to run the
|
||||
analysis later.
|
||||
@ -89,7 +89,7 @@ If you see the error ``/lib/../lib64/crti.o: unrecognized relocation (0x2a) in s
|
||||
Output goes to `analysis/hazards.txt`. This will run the
|
||||
analysis on the js/src tree only; if you wish to analyze the full browser, use
|
||||
|
||||
( export GECKO_DIR=$SRCDIR; $GECKO_DIR/taskcluster/scripts/builder/build-haz-linux.sh --project browser $(pwd) )
|
||||
( export GECKO_PATH=$SRCDIR; $GECKO_PATH/taskcluster/scripts/builder/build-haz-linux.sh --project browser $(pwd) )
|
||||
|
||||
After running the analysis once, you can reuse the `*.xdb` database files
|
||||
generated, using modified analysis scripts, by running
|
||||
|
@ -22,8 +22,8 @@ ac_add_options --enable-js-shell
|
||||
# filenames stored by the analysis
|
||||
mk_add_options MOZ_OBJDIR=obj-analyzed
|
||||
|
||||
export LLVM_CONFIG=$TOOLTOOL_DIR/clang/bin/llvm-config
|
||||
export CBINDGEN="${TOOLTOOL_DIR}/cbindgen/cbindgen"
|
||||
export LLVM_CONFIG=$MOZ_FETCHES_DIR/clang/bin/llvm-config
|
||||
export CBINDGEN="${MOZ_FETCHES_DIR}/cbindgen/cbindgen"
|
||||
|
||||
# The configuration options are chosen to compile the most code
|
||||
# (--enable-debug, --enable-tests) in the trickiest way possible
|
||||
@ -31,7 +31,7 @@ export CBINDGEN="${TOOLTOOL_DIR}/cbindgen/cbindgen"
|
||||
ac_add_options --enable-debug
|
||||
ac_add_options --enable-tests
|
||||
ac_add_options --enable-optimize
|
||||
ac_add_options --with-compiler-wrapper=$TOOLTOOL_DIR/sixgill/usr/libexec/sixgill/scripts/wrap_gcc/basecc
|
||||
ac_add_options --with-compiler-wrapper=$MOZ_FETCHES_DIR/sixgill/usr/libexec/sixgill/scripts/wrap_gcc/basecc
|
||||
ac_add_options --without-ccache
|
||||
|
||||
ac_add_options --disable-replace-malloc
|
||||
@ -43,5 +43,5 @@ CFLAGS="$CFLAGS -Wno-attributes -Wno-ignored-attributes"
|
||||
CPPFLAGS="$CPPFLAGS -Wno-attributes -Wno-ignored-attributes"
|
||||
CXXFLAGS="$CXXFLAGS -Wno-attributes -Wno-ignored-attributes"
|
||||
|
||||
NODEJS="$TOOLTOOL_DIR/node/bin/node"
|
||||
NASM="$TOOLTOOL_DIR/nasm/nasm"
|
||||
NODEJS="$MOZ_FETCHES_DIR/node/bin/node"
|
||||
NASM="$MOZ_FETCHES_DIR/nasm/nasm"
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
|
||||
SRCDIR=$(cd $(dirname $0)/../../../..; pwd)
|
||||
GECKO_DIR=$SRCDIR $SRCDIR/taskcluster/scripts/builder/build-haz-linux.sh $(pwd) "$@"
|
||||
GECKO_PATH=$SRCDIR $SRCDIR/taskcluster/scripts/builder/build-haz-linux.sh $(pwd) "$@"
|
||||
|
@ -415,6 +415,21 @@ interface nsIXPCComponents_Utils : nsISupports
|
||||
*/
|
||||
bool isDeadWrapper(in jsval obj);
|
||||
|
||||
/**
|
||||
* Determines whether this value is a remote object proxy, such as
|
||||
* RemoteWindowProxy or RemoteLocationProxy, for an out-of-process frame.
|
||||
*
|
||||
* Remote object proxies do not grant chrome callers the same exemptions
|
||||
* to the same-origin-policy that in-process wrappers typically do, so
|
||||
* this can be used to determine whether access to cross-origin proxies is
|
||||
* safe:
|
||||
*
|
||||
* if (!Cu.isRemoteProxy(frame.contentWindow)) {
|
||||
* frame.contentWindow.doCrossOriginThing();
|
||||
* }
|
||||
*/
|
||||
bool isRemoteProxy(in jsval val);
|
||||
|
||||
/**
|
||||
* Determines whether this object is a cross-process wrapper.
|
||||
*/
|
||||
|
@ -30,6 +30,7 @@
|
||||
#include "mozilla/dom/DOMException.h"
|
||||
#include "mozilla/dom/DOMExceptionBinding.h"
|
||||
#include "mozilla/dom/BindingUtils.h"
|
||||
#include "mozilla/dom/RemoteObjectProxy.h"
|
||||
#include "mozilla/dom/StructuredCloneTags.h"
|
||||
#include "mozilla/dom/WindowBinding.h"
|
||||
#include "nsZipArchive.h"
|
||||
@ -1913,6 +1914,17 @@ nsXPCComponents_Utils::IsDeadWrapper(HandleValue obj, bool* out) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsXPCComponents_Utils::IsRemoteProxy(HandleValue val, bool* out) {
|
||||
if (val.isObject()) {
|
||||
*out = dom::IsRemoteObjectProxy(UncheckedUnwrap(&val.toObject()));
|
||||
;
|
||||
} else {
|
||||
*out = false;
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsXPCComponents_Utils::IsCrossProcessWrapper(HandleValue obj, bool* out) {
|
||||
*out = false;
|
||||
|
@ -43,7 +43,6 @@ support-files =
|
||||
[test_bug390488.html]
|
||||
[test_bug393269.html]
|
||||
[test_bug396851.html]
|
||||
fail-if = fission
|
||||
[test_bug428021.html]
|
||||
[test_bug446584.html]
|
||||
[test_bug462428.html]
|
||||
@ -53,7 +52,6 @@ fail-if = fission
|
||||
[test_bug504877.html]
|
||||
fail-if = fission
|
||||
[test_bug505915.html]
|
||||
fail-if = fission
|
||||
[test_bug560351.html]
|
||||
[test_bug585745.html]
|
||||
[test_bug589028.html]
|
||||
@ -64,10 +62,10 @@ fail-if = fission
|
||||
[test_bug628410.html]
|
||||
[test_bug628794.html]
|
||||
[test_bug629227.html]
|
||||
fail-if = fission
|
||||
skip-if = fission # Times out.
|
||||
[test_bug629331.html]
|
||||
[test_bug636097.html]
|
||||
fail-if = fission
|
||||
fail-if = fission # Bug 1573621: window.location access after cross-origin navigation.
|
||||
[test_bug650273.html]
|
||||
[test_bug655297-1.html]
|
||||
[test_bug655297-2.html]
|
||||
@ -83,22 +81,21 @@ skip-if = toolkit == "android" && debug && !is_fennec
|
||||
[test_bug790732.html]
|
||||
[test_bug793969.html]
|
||||
[test_bug800864.html]
|
||||
fail-if = fission
|
||||
fail-if = fission # Bug 1573621: window.location access after cross-origin navigation.
|
||||
[test_bug802557.html]
|
||||
skip-if = fission # Crashes: @ mozilla::dom::ContentParent::RecvDetachBrowsingContext(unsigned long, std::function<void (bool const&)>&&)
|
||||
fail-if = fission
|
||||
fail-if = fission # Bug 1573621: window.location access after cross-origin navigation.
|
||||
[test_bug803730.html]
|
||||
[test_bug809547.html]
|
||||
[test_bug829872.html]
|
||||
fail-if = fission
|
||||
[test_bug862380.html]
|
||||
[test_bug865260.html]
|
||||
[test_bug870423.html]
|
||||
fail-if = fission
|
||||
fail-if = fission # isinstance hooks for remote object proxies.
|
||||
[test_bug871887.html]
|
||||
[test_bug912322.html]
|
||||
[test_bug916945.html]
|
||||
fail-if = fission
|
||||
fail-if = fission # "name" attribute on cross-origin frames
|
||||
[test_bug92773.html]
|
||||
[test_bug940783.html]
|
||||
fail-if = fission
|
||||
@ -118,12 +115,11 @@ skip-if = fission && webrender && debug # Crashes intermittently: @ nsDocShell::
|
||||
[test_getWebIDLCaller.html]
|
||||
skip-if = (debug == false)
|
||||
[test_getweakmapkeys.html]
|
||||
[test_isRemoteProxy.html]
|
||||
[test_paris_weakmap_keys.html]
|
||||
skip-if = (debug == false)
|
||||
[test_nukeContentWindow.html]
|
||||
[test_sameOriginPolicy.html]
|
||||
skip-if = fission # Crashes: @ nsOuterWindowProxy::GetSubframeWindow(JSContext*, JS::Handle<JSObject*>, JS::Handle<JS::PropertyKey>) const
|
||||
fail-if = fission
|
||||
[test_sandbox_fetch.html]
|
||||
support-files =
|
||||
../../../../dom/tests/mochitest/fetch/test_fetch_basic.js
|
||||
|
@ -9,18 +9,30 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=396851
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
|
||||
<script type="text/javascript">
|
||||
function throws(func, pattern, msg) {
|
||||
try {
|
||||
func();
|
||||
ok(false, msg);
|
||||
} catch (e) {
|
||||
ok(pattern.test(e), `${msg}: Expect exception mathing ${pattern}`);
|
||||
}
|
||||
}
|
||||
|
||||
function go() {
|
||||
var iframe = $("ifr");
|
||||
var win = iframe.contentWindow;
|
||||
try {
|
||||
var doc = win.document;
|
||||
fail("Allowed cross-origin access to the document");
|
||||
} catch (e) {
|
||||
ok(e.toString().match("Permission denied") != null, "Weird exception thrown");
|
||||
}
|
||||
throws(() => win.document,
|
||||
/Permission denied/,
|
||||
"Unprivileged code should not be able to access cross-origin document");
|
||||
|
||||
doc = SpecialPowers.wrap(win).document;
|
||||
ok(doc != null, "Able to access the cross-origin document");
|
||||
if (SpecialPowers.useRemoteSubframes) {
|
||||
throws(() => win.document,
|
||||
/Permission denied/,
|
||||
"Privileged code should not be able to access cross-process document");
|
||||
} else {
|
||||
ok(SpecialPowers.wrap(win).document != null,
|
||||
"Able to access the cross-origin document");
|
||||
}
|
||||
SimpleTest.finish();
|
||||
}
|
||||
</script>
|
||||
|
@ -45,7 +45,7 @@ SimpleTest.waitForExplicitFinish();
|
||||
</script>
|
||||
</pre>
|
||||
|
||||
<iframe id="ifr" onload="go();" src="http://example.org/"></iframe>
|
||||
<iframe id="ifr" onload="go();" src="http://test1.mochi.test:8888/"></iframe>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
@ -19,19 +19,19 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=829872
|
||||
go();
|
||||
}
|
||||
|
||||
function check(elem, desc) {
|
||||
async function check(elem, desc) {
|
||||
is(elem.contentDocument, null, "null cross-origin contentDocument for " + desc);
|
||||
ok(SpecialPowers.wrap(elem).contentWindow.eval('frameElement === null;'),
|
||||
ok(await SpecialPowers.spawn(elem, [], () => this.content.eval('frameElement === null;')),
|
||||
"null cross-origin frameElement for " + desc);
|
||||
if (!(elem instanceof HTMLFrameElement))
|
||||
is(elem.getSVGDocument(), null, "null cross-origin getSVGDocument() for " + desc);
|
||||
}
|
||||
|
||||
function go() {
|
||||
async function go() {
|
||||
ok(true, "Starting test");
|
||||
check($('ifr'), "iframe element");
|
||||
check($('obj'), "object element");
|
||||
check($('framesetholder').contentDocument.getElementById('fr'), "frameset frame");
|
||||
await check($('ifr'), "iframe element");
|
||||
await check($('obj'), "object element");
|
||||
await check($('framesetholder').contentDocument.getElementById('fr'), "frameset frame");
|
||||
SimpleTest.finish();
|
||||
}
|
||||
|
||||
|
@ -18,7 +18,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=916945
|
||||
if (++gLoadCount == 2)
|
||||
go();
|
||||
}
|
||||
function go() {
|
||||
async function go() {
|
||||
// Both same-origin and cross-origin names should be visible if they're set
|
||||
// on the iframe element.
|
||||
ok('winA' in window, "same-origin named access works");
|
||||
@ -30,13 +30,18 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=916945
|
||||
// Setting the 'name' attribute should propagate to the docshell.
|
||||
var ifrB = document.getElementById('ifrB');
|
||||
ifrB.setAttribute('name', 'foo');
|
||||
is(SpecialPowers.wrap(ifrB).contentWindow.name, 'foo', 'attribute sets propagate to the docshell');
|
||||
await SpecialPowers.spawn(ifrB, [], () => {
|
||||
Assert.equal(this.content.name, 'foo',
|
||||
'attribute sets propagate to the docshell');
|
||||
});
|
||||
ok('foo' in window, "names are dynamic if updated via setAttribute");
|
||||
// XXXbholley - flip me when Window moves to new bindings.
|
||||
todo('foo' instanceof Window, "names are dynamic if updated via setAttribute");
|
||||
|
||||
// Setting window.name on the subframe should not propagate to the attribute.
|
||||
SpecialPowers.wrap(ifrB).contentWindow.name = 'bar';
|
||||
await SpecialPowers.spawn(ifrB, [], () => {
|
||||
this.content.name = "bar";
|
||||
});
|
||||
is(ifrB.getAttribute('name'), 'foo', 'docshell updates dont propagate to the attribute');
|
||||
|
||||
// When the frame element attribute and docshell name don't match, nothing is returned.
|
||||
|
54
js/xpconnect/tests/mochitest/test_isRemoteProxy.html
Normal file
54
js/xpconnect/tests/mochitest/test_isRemoteProxy.html
Normal file
@ -0,0 +1,54 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Tests for Cu.isRemoteProxy</title>
|
||||
<script src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
/* eslint-disable prettier/prettier */
|
||||
|
||||
async function addFrame(url) {
|
||||
let frame = document.createElement("iframe");
|
||||
frame.src = url;
|
||||
document.body.appendChild(frame);
|
||||
|
||||
await new Promise(resolve => {
|
||||
frame.addEventListener("load", resolve, { once: true });
|
||||
});
|
||||
|
||||
return frame;
|
||||
}
|
||||
|
||||
add_task(async function() {
|
||||
const { Cu } = SpecialPowers;
|
||||
|
||||
let localFrame = await addFrame("file_empty.html");
|
||||
let remoteFrame = await addFrame(
|
||||
SimpleTest.getTestFileURL("file_empty.html")
|
||||
.replace("mochi.test:8888", "example.com"));
|
||||
|
||||
ok(frames[0] === localFrame.contentWindow, "frames[0] is localFrame");
|
||||
ok(frames[1] === remoteFrame.contentWindow, "frames[1] is remoteFrame");
|
||||
|
||||
ok(!Cu.isRemoteProxy(window), "window is not a remote proxy");
|
||||
ok(!Cu.isRemoteProxy(location), "location is not a remote proxy");
|
||||
|
||||
ok(!Cu.isRemoteProxy(frames[0]), "frames[0] is not a remote proxy");
|
||||
ok(
|
||||
!Cu.isRemoteProxy(frames[0].location),
|
||||
"frames[0].location is not a remote proxy"
|
||||
);
|
||||
|
||||
const { useRemoteSubframes } = SpecialPowers;
|
||||
is(Cu.isRemoteProxy(frames[1]), useRemoteSubframes,
|
||||
"frames[1] is a remote proxy if Fission is enabled");
|
||||
is(Cu.isRemoteProxy(frames[1].location), useRemoteSubframes,
|
||||
"frames[1].location is a remote proxy if Fission is enabled");
|
||||
});
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -4,7 +4,6 @@ support-files =
|
||||
|
||||
[test_disabled.html]
|
||||
[test_filter_crossorigin.html]
|
||||
fail-if = fission
|
||||
support-files =
|
||||
filters.svg
|
||||
file_filter_crossorigin.svg
|
||||
|
@ -24,11 +24,20 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=695385
|
||||
<pre id="test">
|
||||
<script type="application/javascript">
|
||||
// Main Function
|
||||
function run() {
|
||||
async function run() {
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
||||
// FIXME(Fission): The load event fires before cross-origin iframes have
|
||||
// loaded (bug 1559841).
|
||||
if (SpecialPowers.useRemoteSubframes) {
|
||||
for (let i = 0; i < 100; i++) {
|
||||
await new Promise(resolve => setTimeout(resolve, 0));
|
||||
}
|
||||
}
|
||||
|
||||
let snapshots = new Array(4);
|
||||
for (let i = 0; i < snapshots.length; i++) {
|
||||
snapshots[i] = snapshotWindow(frames[i].window, false);
|
||||
snapshots[i] = await snapshotWindow(frames[i], false);
|
||||
}
|
||||
|
||||
// Compare mochi.test iframe against its reference:
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user