Merge inbound to central, a=merge

MozReview-Commit-ID: AiSwcmvIrE
This commit is contained in:
Wes Kocher 2017-06-15 16:22:40 -07:00
Родитель 9b6197930c 5faa1a752e
Коммит 208ec84119
78 изменённых файлов: 927 добавлений и 256 удалений

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

@ -24,13 +24,13 @@
"unpack": true
},
{
"version": "sccache rev d3aa1116844b50c03015266d2f48235509fa7deb",
"version": "sccache rev 9155425cfc038d6a60deb50816055f4e93b93ad1",
"algorithm": "sha512",
"visibility": "public",
"filename": "sccache2.tar.xz",
"unpack": true,
"digest": "fde0128b9a4df74f268f9d45748534d0314db0467ae22e36101df4a5374c36bb8676514e8b70254fb2e6f2a2d1224ff7ce498305223035d5f1e7e306fda2f5d5",
"size": 2179220
"digest": "da67d4a872f8d23ef0707e02a823e5a644f1988e605d2c46c787641c8c37ae4521ab7d83b1dc4c0cc52d203be6313c7f9580830845536fa7c2a521af9443f69a",
"size": 2192144
},
{
"version": "clang + llvm 3.9.0, built from SVN r290136",

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

@ -24,13 +24,13 @@
"unpack": true
},
{
"version": "sccache rev d3aa1116844b50c03015266d2f48235509fa7deb",
"version": "sccache rev 9155425cfc038d6a60deb50816055f4e93b93ad1",
"algorithm": "sha512",
"visibility": "public",
"filename": "sccache2.tar.xz",
"unpack": true,
"digest": "fde0128b9a4df74f268f9d45748534d0314db0467ae22e36101df4a5374c36bb8676514e8b70254fb2e6f2a2d1224ff7ce498305223035d5f1e7e306fda2f5d5",
"size": 2179220
"digest": "da67d4a872f8d23ef0707e02a823e5a644f1988e605d2c46c787641c8c37ae4521ab7d83b1dc4c0cc52d203be6313c7f9580830845536fa7c2a521af9443f69a",
"size": 2192144
},
{
"version": "clang + llvm 3.9.0, built from SVN r290136",

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

@ -24,12 +24,12 @@
"unpack": true
},
{
"version": "sccache rev d3aa1116844b50c03015266d2f48235509fa7deb",
"version": "sccache rev 9155425cfc038d6a60deb50816055f4e93b93ad1",
"algorithm": "sha512",
"visibility": "public",
"filename": "sccache2.tar.xz",
"unpack": true,
"digest": "fde0128b9a4df74f268f9d45748534d0314db0467ae22e36101df4a5374c36bb8676514e8b70254fb2e6f2a2d1224ff7ce498305223035d5f1e7e306fda2f5d5",
"size": 2179220
"digest": "da67d4a872f8d23ef0707e02a823e5a644f1988e605d2c46c787641c8c37ae4521ab7d83b1dc4c0cc52d203be6313c7f9580830845536fa7c2a521af9443f69a",
"size": 2192144
}
]

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

@ -24,11 +24,12 @@
"unpack": true
},
{
"version": "sccache rev b21198a7183a2fe226ff49348b1c0b51bae9f4f8",
"version": "sccache rev 9155425cfc038d6a60deb50816055f4e93b93ad1",
"algorithm": "sha512",
"visibility": "public",
"filename": "sccache2.tar.xz",
"unpack": true,
"digest": "b89c40dbf28c2bd54fadf017c15a8789f6e7611252a623cc3a1507e3dd6fc9e5a50d746e81776ba856e33fdc99b4a6413ba7c3ac0aed5f4835705da2b758ef22",
"size": 1020700
"digest": "da67d4a872f8d23ef0707e02a823e5a644f1988e605d2c46c787641c8c37ae4521ab7d83b1dc4c0cc52d203be6313c7f9580830845536fa7c2a521af9443f69a",
"size": 2192144
}
]

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

@ -32,13 +32,13 @@
"unpack": true
},
{
"version": "sccache rev d3aa1116844b50c03015266d2f48235509fa7deb",
"version": "sccache rev 9155425cfc038d6a60deb50816055f4e93b93ad1",
"algorithm": "sha512",
"visibility": "public",
"filename": "sccache2.tar.xz",
"unpack": true,
"digest": "fde0128b9a4df74f268f9d45748534d0314db0467ae22e36101df4a5374c36bb8676514e8b70254fb2e6f2a2d1224ff7ce498305223035d5f1e7e306fda2f5d5",
"size": 2179220
"digest": "da67d4a872f8d23ef0707e02a823e5a644f1988e605d2c46c787641c8c37ae4521ab7d83b1dc4c0cc52d203be6313c7f9580830845536fa7c2a521af9443f69a",
"size": 2192144
},
{
"version": "clang + llvm 3.9.0, built from SVN r290136",

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

@ -24,13 +24,13 @@
"unpack": true
},
{
"version": "sccache rev d3aa1116844b50c03015266d2f48235509fa7deb",
"version": "sccache rev 9155425cfc038d6a60deb50816055f4e93b93ad1",
"algorithm": "sha512",
"visibility": "public",
"filename": "sccache2.tar.xz",
"unpack": true,
"digest": "fde0128b9a4df74f268f9d45748534d0314db0467ae22e36101df4a5374c36bb8676514e8b70254fb2e6f2a2d1224ff7ce498305223035d5f1e7e306fda2f5d5",
"size": 2179220
"digest": "da67d4a872f8d23ef0707e02a823e5a644f1988e605d2c46c787641c8c37ae4521ab7d83b1dc4c0cc52d203be6313c7f9580830845536fa7c2a521af9443f69a",
"size": 2192144
},
{
"version": "clang + llvm 3.9.0, built from SVN r290136",

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

@ -16,13 +16,13 @@
"unpack": true
},
{
"version": "sccache rev d3aa1116844b50c03015266d2f48235509fa7deb",
"version": "sccache rev 9155425cfc038d6a60deb50816055f4e93b93ad1",
"algorithm": "sha512",
"visibility": "public",
"filename": "sccache2.tar.bz2",
"unpack": true,
"digest": "0c6516cd41ab5c49644ac40be4cb3f3c358d4ecc8d5ea6d3eff627c4230c16aba37152365c99132d4673991a34cac282efb7fc4bb4f96086300676e456feb316",
"size": 1609392
"digest": "6e14c9a19ee4178b105ee2d995c647888a162056c61d2bd5d1d9dce0326af5ea45cc7d2f28d0b9a499ab2aa909ed534e6c545c6d27319bdd598b6dbceaca2e22",
"size": 1669459
},
{
"version": "cctools port from commit hash 8e9c3f2506b51",

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

@ -32,12 +32,12 @@
"filename": "MacOSX10.10.sdk.tar.xz"
},
{
"version": "sccache rev b21198a7183a2fe226ff49348b1c0b51bae9f4f8",
"version": "sccache rev 9155425cfc038d6a60deb50816055f4e93b93ad1",
"algorithm": "sha512",
"visibility": "public",
"filename": "sccache2.tar.xz",
"unpack": true,
"digest": "b89c40dbf28c2bd54fadf017c15a8789f6e7611252a623cc3a1507e3dd6fc9e5a50d746e81776ba856e33fdc99b4a6413ba7c3ac0aed5f4835705da2b758ef22",
"size": 1020700
"digest": "da67d4a872f8d23ef0707e02a823e5a644f1988e605d2c46c787641c8c37ae4521ab7d83b1dc4c0cc52d203be6313c7f9580830845536fa7c2a521af9443f69a",
"size": 2192144
}
]

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

@ -24,13 +24,13 @@
"filename": "MacOSX10.7.sdk.tar.bz2"
},
{
"version": "sccache rev d3aa1116844b50c03015266d2f48235509fa7deb",
"version": "sccache rev 9155425cfc038d6a60deb50816055f4e93b93ad1",
"algorithm": "sha512",
"visibility": "public",
"filename": "sccache2.tar.xz",
"unpack": true,
"digest": "fde0128b9a4df74f268f9d45748534d0314db0467ae22e36101df4a5374c36bb8676514e8b70254fb2e6f2a2d1224ff7ce498305223035d5f1e7e306fda2f5d5",
"size": 2179220
"digest": "da67d4a872f8d23ef0707e02a823e5a644f1988e605d2c46c787641c8c37ae4521ab7d83b1dc4c0cc52d203be6313c7f9580830845536fa7c2a521af9443f69a",
"size": 2192144
},
{
"version": "https://github.com/mozilla/libdmg-hfsplus rev ba04b00435a0853f1499d751617177828ee8ec00",

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

@ -24,12 +24,12 @@
"unpack": true
},
{
"version": "sccache rev d3aa1116844b50c03015266d2f48235509fa7deb",
"version": "sccache rev 9155425cfc038d6a60deb50816055f4e93b93ad1",
"algorithm": "sha512",
"visibility": "public",
"filename": "sccache2.tar.bz2",
"unpack": true,
"digest": "0c6516cd41ab5c49644ac40be4cb3f3c358d4ecc8d5ea6d3eff627c4230c16aba37152365c99132d4673991a34cac282efb7fc4bb4f96086300676e456feb316",
"size": 1609392
"digest": "6e14c9a19ee4178b105ee2d995c647888a162056c61d2bd5d1d9dce0326af5ea45cc7d2f28d0b9a499ab2aa909ed534e6c545c6d27319bdd598b6dbceaca2e22",
"size": 1669459
}
]

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

@ -14,13 +14,13 @@
"unpack": true
},
{
"version": "sccache rev d3aa1116844b50c03015266d2f48235509fa7deb",
"version": "sccache rev 9155425cfc038d6a60deb50816055f4e93b93ad1",
"algorithm": "sha512",
"visibility": "public",
"filename": "sccache2.tar.bz2",
"unpack": true,
"digest": "6c6727b239318187acf7d8bf4ceb7f669a7a680c1cb2bc3ceac8b198cdb562f91e3d046efe3c867c1e7d4c61af8d094c3da3b90ea77034d54677fd0ae44eacce",
"size": 1638872
"digest": "ce3a59557d91e3a874663f64576d184556053430d997b1581874073d067e92e342002bf7c8ee2f056ea86bdbafb9872a81e98d592fc990d40ad43e0539df00ad",
"size": 1878161
},
{
"version": "Visual Studio 2015 Update 3 14.0.25425.01 / SDK 10.0.14393.0",

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

@ -14,13 +14,13 @@
"unpack": true
},
{
"version": "sccache rev d3aa1116844b50c03015266d2f48235509fa7deb",
"version": "sccache rev 9155425cfc038d6a60deb50816055f4e93b93ad1",
"algorithm": "sha512",
"visibility": "public",
"filename": "sccache2.tar.bz2",
"unpack": true,
"digest": "6c6727b239318187acf7d8bf4ceb7f669a7a680c1cb2bc3ceac8b198cdb562f91e3d046efe3c867c1e7d4c61af8d094c3da3b90ea77034d54677fd0ae44eacce",
"size": 1638872
"digest": "ce3a59557d91e3a874663f64576d184556053430d997b1581874073d067e92e342002bf7c8ee2f056ea86bdbafb9872a81e98d592fc990d40ad43e0539df00ad",
"size": 1878161
},
{
"version": "Visual Studio 2015 Update 3 14.0.25425.01 / SDK 10.0.14393.0",

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

@ -14,13 +14,13 @@
"unpack": true
},
{
"version": "sccache rev d3aa1116844b50c03015266d2f48235509fa7deb",
"version": "sccache rev 9155425cfc038d6a60deb50816055f4e93b93ad1",
"algorithm": "sha512",
"visibility": "public",
"filename": "sccache2.tar.bz2",
"unpack": true,
"digest": "6c6727b239318187acf7d8bf4ceb7f669a7a680c1cb2bc3ceac8b198cdb562f91e3d046efe3c867c1e7d4c61af8d094c3da3b90ea77034d54677fd0ae44eacce",
"size": 1638872
"digest": "ce3a59557d91e3a874663f64576d184556053430d997b1581874073d067e92e342002bf7c8ee2f056ea86bdbafb9872a81e98d592fc990d40ad43e0539df00ad",
"size": 1878161
},
{
"version": "Visual Studio 2015 Update 3 14.0.25425.01 / SDK 10.0.14393.0",

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

@ -15,13 +15,13 @@
"unpack": true
},
{
"version": "sccache rev d3aa1116844b50c03015266d2f48235509fa7deb",
"version": "sccache rev 9155425cfc038d6a60deb50816055f4e93b93ad1",
"algorithm": "sha512",
"visibility": "public",
"filename": "sccache2.tar.bz2",
"unpack": true,
"digest": "6c6727b239318187acf7d8bf4ceb7f669a7a680c1cb2bc3ceac8b198cdb562f91e3d046efe3c867c1e7d4c61af8d094c3da3b90ea77034d54677fd0ae44eacce",
"size": 1638872
"digest": "ce3a59557d91e3a874663f64576d184556053430d997b1581874073d067e92e342002bf7c8ee2f056ea86bdbafb9872a81e98d592fc990d40ad43e0539df00ad",
"size": 1878161
},
{
"version": "Visual Studio 2015 Update 3 14.0.25425.01 / SDK 10.0.14393.0",

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

@ -15,13 +15,13 @@
"unpack": true
},
{
"version": "sccache rev d3aa1116844b50c03015266d2f48235509fa7deb",
"version": "sccache rev 9155425cfc038d6a60deb50816055f4e93b93ad1",
"algorithm": "sha512",
"visibility": "public",
"filename": "sccache2.tar.bz2",
"unpack": true,
"digest": "6c6727b239318187acf7d8bf4ceb7f669a7a680c1cb2bc3ceac8b198cdb562f91e3d046efe3c867c1e7d4c61af8d094c3da3b90ea77034d54677fd0ae44eacce",
"size": 1638872
"digest": "ce3a59557d91e3a874663f64576d184556053430d997b1581874073d067e92e342002bf7c8ee2f056ea86bdbafb9872a81e98d592fc990d40ad43e0539df00ad",
"size": 1878161
},
{
"version": "Visual Studio 2015 Update 3 14.0.25425.01 / SDK 10.0.14393.0",

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

@ -904,6 +904,11 @@ ifdef MOZ_RUST_SIMD
rust_unlock_unstable += RUSTC_BOOTSTRAP=1
endif
ifdef MOZ_USING_SCCACHE
sccache_wrap := RUSTC_WRAPPER='$(CCACHE)'
endif
# This function is intended to be called by:
#
# $(call CARGO_BUILD,EXTRA_ENV_VAR1=X EXTRA_ENV_VAR2=Y ...)
@ -912,7 +917,7 @@ endif
#
# $(call CARGO_BUILD)
define CARGO_BUILD
env $(environment_cleaner) $(rust_unlock_unstable) $(rustflags_override) \
env $(environment_cleaner) $(rust_unlock_unstable) $(rustflags_override) $(sccache_wrap) \
CARGO_TARGET_DIR=$(CARGO_TARGET_DIR) \
RUSTC=$(RUSTC) \
MOZ_SRC=$(topsrcdir) \

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

@ -235,6 +235,7 @@ skip-if = (os == 'linux' && bits == 32 && debug) # bug 1328915, disable linux32
[browser_rules_strict-search-filter_02.js]
[browser_rules_strict-search-filter_03.js]
[browser_rules_style-editor-link.js]
skip-if = !debug # Bug 1309759
[browser_rules_url-click-opens-new-tab.js]
[browser_rules_urls-clickable.js]
[browser_rules_user-agent-styles.js]

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

@ -2315,6 +2315,11 @@ nsJSContext::MaybePokeCC()
return;
}
uint32_t sinceLastCCEnd = TimeUntilNow(sLastCCEndTime);
if (sinceLastCCEnd && sinceLastCCEnd < NS_CC_DELAY) {
return;
}
if (ShouldTriggerCC(nsCycleCollector_suspectedCount())) {
sCCRunnerFireCount = 0;

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

@ -855,6 +855,7 @@ ContentChild::ProvideWindowCommon(TabChild* aTabOpener,
uint64_t layersId = 0;
CompositorOptions compositorOptions;
uint32_t maxTouchPoints = 0;
DimensionInfo dimensionInfo;
if (aIframeMoz) {
MOZ_ASSERT(aTabOpener);
@ -893,7 +894,8 @@ ContentChild::ProvideWindowCommon(TabChild* aTabOpener,
&textureFactoryIdentifier,
&layersId,
&compositorOptions,
&maxTouchPoints)) {
&maxTouchPoints,
&dimensionInfo)) {
PRenderFrameChild::Send__delete__(renderFrame);
return NS_ERROR_NOT_AVAILABLE;
}
@ -942,6 +944,8 @@ ContentChild::ProvideWindowCommon(TabChild* aTabOpener,
newChild->DoFakeShow(textureFactoryIdentifier, layersId, compositorOptions,
renderFrame, showInfo);
newChild->RecvUpdateDimensions(dimensionInfo);
for (size_t i = 0; i < frameScripts.Length(); i++) {
FrameScriptInfo& info = frameScripts[i];
if (!newChild->RecvLoadRemoteScript(info.url(), info.runInGlobalScope())) {

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

@ -4637,7 +4637,8 @@ ContentParent::RecvCreateWindow(PBrowserParent* aThisTab,
TextureFactoryIdentifier* aTextureFactoryIdentifier,
uint64_t* aLayersId,
CompositorOptions* aCompositorOptions,
uint32_t* aMaxTouchPoints)
uint32_t* aMaxTouchPoints,
DimensionInfo* aDimensions)
{
// We always expect to open a new window here. If we don't, it's an error.
*aWindowIsNew = true;
@ -4694,6 +4695,9 @@ ContentParent::RecvCreateWindow(PBrowserParent* aThisTab,
nsCOMPtr<nsIWidget> widget = newTab->GetWidget();
*aMaxTouchPoints = widget ? widget->GetMaxTouchPoints() : 0;
// NOTE: widget must be set for this to return a meaningful value.
*aDimensions = widget ? newTab->GetDimensionInfo() : DimensionInfo();
return IPC_OK();
}

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

@ -543,7 +543,8 @@ public:
layers::TextureFactoryIdentifier* aTextureFactoryIdentifier,
uint64_t* aLayersId,
mozilla::layers::CompositorOptions* aCompositorOptions,
uint32_t* aMaxTouchPoints) override;
uint32_t* aMaxTouchPoints,
DimensionInfo* aDimensions) override;
virtual mozilla::ipc::IPCResult RecvCreateWindowInDifferentProcess(
PBrowserParent* aThisTab,

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

@ -18,6 +18,10 @@ using LayoutDeviceIntRect from "Units.h";
using DesktopIntRect from "Units.h";
using DesktopToLayoutDeviceScale from "Units.h";
using CSSToLayoutDeviceScale from "Units.h";
using CSSRect from "Units.h";
using CSSSize from "Units.h";
using mozilla::LayoutDeviceIntPoint from "Units.h";
using mozilla::dom::ScreenOrientationInternal from "mozilla/dom/ScreenOrientation.h";
namespace mozilla {
namespace dom {
@ -83,5 +87,14 @@ struct ScreenDetails {
CSSToLayoutDeviceScale defaultCSSScaleFactor;
};
struct DimensionInfo
{
CSSRect rect;
CSSSize size;
ScreenOrientationInternal orientation;
LayoutDeviceIntPoint clientOffset;
LayoutDeviceIntPoint chromeDisp;
};
} // namespace dom
} // namespace mozilla

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

@ -35,8 +35,6 @@ include "mozilla/layers/LayersMessageUtils.h";
using class IPC::Principal from "mozilla/dom/PermissionMessageUtils.h";
using class mozilla::gfx::Matrix from "mozilla/gfx/Matrix.h";
using struct gfxSize from "gfxPoint.h";
using CSSRect from "Units.h";
using CSSSize from "Units.h";
using mozilla::LayoutDeviceIntPoint from "Units.h";
using mozilla::LayoutDevicePoint from "Units.h";
using mozilla::ScreenIntPoint from "Units.h";
@ -66,7 +64,6 @@ using class mozilla::WidgetSelectionEvent from "ipc/nsGUIEventIPC.h";
using class mozilla::WidgetTouchEvent from "ipc/nsGUIEventIPC.h";
using class mozilla::WidgetPluginEvent from "ipc/nsGUIEventIPC.h";
using struct mozilla::dom::RemoteDOMEvent from "mozilla/dom/TabMessageUtils.h";
using mozilla::dom::ScreenOrientationInternal from "mozilla/dom/ScreenOrientation.h";
using struct mozilla::layers::TextureFactoryIdentifier from "mozilla/layers/CompositorTypes.h";
using mozilla::layers::CompositorOptions from "mozilla/layers/CompositorOptions.h";
using mozilla::CSSToScreenScale from "Units.h";
@ -639,10 +636,7 @@ child:
async LoadURL(nsCString uri, ShowInfo info);
async UpdateDimensions(CSSRect rect, CSSSize size,
ScreenOrientationInternal orientation,
LayoutDeviceIntPoint clientOffset,
LayoutDeviceIntPoint chromeDisp) compressall;
async UpdateDimensions(DimensionInfo dimensions) compressall;
async SizeModeChanged(nsSizeMode sizeMode);

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

@ -1002,7 +1002,8 @@ parent:
TextureFactoryIdentifier textureFactoryIdentifier,
uint64_t layersId,
CompositorOptions compositorOptions,
uint32_t maxTouchPoints);
uint32_t maxTouchPoints,
DimensionInfo dimensions);
async CreateWindowInDifferentProcess(
PBrowser aThisTab,

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

@ -1219,22 +1219,21 @@ TabChild::RecvInitRendering(const TextureFactoryIdentifier& aTextureFactoryIdent
}
mozilla::ipc::IPCResult
TabChild::RecvUpdateDimensions(const CSSRect& rect, const CSSSize& size,
const ScreenOrientationInternal& orientation,
const LayoutDeviceIntPoint& clientOffset,
const LayoutDeviceIntPoint& chromeDisp)
TabChild::RecvUpdateDimensions(const DimensionInfo& aDimensionInfo)
{
if (!mRemoteFrame) {
return IPC_OK();
}
mUnscaledOuterRect = rect;
mClientOffset = clientOffset;
mChromeDisp = chromeDisp;
mUnscaledOuterRect = aDimensionInfo.rect();
mClientOffset = aDimensionInfo.clientOffset();
mChromeDisp = aDimensionInfo.chromeDisp();
mOrientation = orientation;
SetUnscaledInnerSize(size);
if (!mHasValidInnerSize && size.width != 0 && size.height != 0) {
mOrientation = aDimensionInfo.orientation();
SetUnscaledInnerSize(aDimensionInfo.size());
if (!mHasValidInnerSize &&
aDimensionInfo.size().width != 0 &&
aDimensionInfo.size().height != 0) {
mHasValidInnerSize = true;
}
@ -1248,8 +1247,8 @@ TabChild::RecvUpdateDimensions(const CSSRect& rect, const CSSSize& size,
baseWin->SetPositionAndSize(0, 0, screenSize.width, screenSize.height,
nsIBaseWindow::eRepaint);
mPuppetWidget->Resize(screenRect.x + clientOffset.x + chromeDisp.x,
screenRect.y + clientOffset.y + chromeDisp.y,
mPuppetWidget->Resize(screenRect.x + mClientOffset.x + mChromeDisp.x,
screenRect.y + mClientOffset.y + mChromeDisp.y,
screenSize.width, screenSize.height, true);
return IPC_OK();

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

@ -350,11 +350,7 @@ public:
PRenderFrameChild* aRenderFrame) override;
virtual mozilla::ipc::IPCResult
RecvUpdateDimensions(const CSSRect& aRect,
const CSSSize& aSize,
const ScreenOrientationInternal& aOrientation,
const LayoutDeviceIntPoint& aClientOffset,
const LayoutDeviceIntPoint& aChromeDisp) override;
RecvUpdateDimensions(const mozilla::dom::DimensionInfo& aDimensionInfo) override;
virtual mozilla::ipc::IPCResult
RecvSizeModeChanged(const nsSizeMode& aSizeMode) override;

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

@ -737,22 +737,31 @@ TabParent::UpdateDimensions(const nsIntRect& rect, const ScreenIntSize& size)
mClientOffset = clientOffset;
mChromeOffset = chromeOffset;
CSSToLayoutDeviceScale widgetScale = widget->GetDefaultScale();
LayoutDeviceIntRect devicePixelRect =
ViewAs<LayoutDevicePixel>(mRect,
PixelCastJustification::LayoutDeviceIsScreenForTabDims);
LayoutDeviceIntSize devicePixelSize =
ViewAs<LayoutDevicePixel>(mDimensions,
PixelCastJustification::LayoutDeviceIsScreenForTabDims);
CSSRect unscaledRect = devicePixelRect / widgetScale;
CSSSize unscaledSize = devicePixelSize / widgetScale;
Unused << SendUpdateDimensions(unscaledRect, unscaledSize,
orientation, clientOffset, chromeOffset);
Unused << SendUpdateDimensions(GetDimensionInfo());
}
}
DimensionInfo
TabParent::GetDimensionInfo()
{
nsCOMPtr<nsIWidget> widget = GetWidget();
MOZ_ASSERT(widget);
CSSToLayoutDeviceScale widgetScale = widget->GetDefaultScale();
LayoutDeviceIntRect devicePixelRect =
ViewAs<LayoutDevicePixel>(mRect,
PixelCastJustification::LayoutDeviceIsScreenForTabDims);
LayoutDeviceIntSize devicePixelSize =
ViewAs<LayoutDevicePixel>(mDimensions,
PixelCastJustification::LayoutDeviceIsScreenForTabDims);
CSSRect unscaledRect = devicePixelRect / widgetScale;
CSSSize unscaledSize = devicePixelSize / widgetScale;
DimensionInfo di(unscaledRect, unscaledSize, mOrientation,
mClientOffset, mChromeOffset);
return di;
}
void
TabParent::SizeModeChanged(const nsSizeMode& aSizeMode)
{

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

@ -362,6 +362,8 @@ public:
void UpdateDimensions(const nsIntRect& aRect, const ScreenIntSize& aSize);
DimensionInfo GetDimensionInfo();
void SizeModeChanged(const nsSizeMode& aSizeMode);
void UIResolutionChanged();

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

@ -135,3 +135,5 @@ run-if = e10s
[test_WebKitCSSMatrix.html]
[test_windowedhistoryframes.html]
[test_windowProperties.html]
[test_resizeby.html]
skip-if = toolkit == 'android' # Window sizes cannot be controled on android.

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

@ -0,0 +1,65 @@
<!DOCTYPE HTML>
<html>
<head>
<title>Test for Bug 1369627</title>
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
<script type="application/javascript" src="/tests/SimpleTest/SpawnTask.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
</head>
<body onload="loadedResolve()">
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1369627">Mozilla Bug 1369627</a>
<p id="display"></p>
<div id="content">
<button id="clicky">clicky</button>
</div>
<pre id="test">
</pre>
<script>
/** Test for Bug 1369627 **/
let loadedResolve;
let loaded = new Promise(resolve => { loadedResolve = resolve });
add_task(async function resizeby() {
await loaded;
let clicky = document.querySelector("#clicky");
let popupPromise = new Promise(resolve => {
let linkclick = () => {
clicky.removeEventListener('click', linkclick);
let popup = window.open("about:blank", "_blank", "width=500,height=500");
is(popup.innerHeight, 500);
is(popup.innerWidth, 500);
popup.resizeBy(50, 0);
// We resized synchronously. If this happened, we sometimes won't fire
// an resize event, so we resolve immediately.
if (popup.innerWidth == 550) {
resolve(popup);
} else {
let popupresize = () => {
popup.removeEventListener('resize', popupresize);
resolve(popup);
};
popup.addEventListener('resize', popupresize);
}
};
clicky.addEventListener('click', linkclick);
});
synthesizeMouseAtCenter(clicky, {}, window);
let popup = await popupPromise;
is(popup.innerHeight, 500);
is(popup.innerWidth, 550);
popup.close();
});
</script>
</body>
</html>

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

@ -9,16 +9,16 @@
<script type="text/javascript">
let { classes: Cc, interfaces: Ci, utils: Cu } = Components;
const State = {
BYTECHECK: -1,
INSTALLING: 0,
INSTALLED: 1,
ACTIVATING: 2,
ACTIVATED: 3,
REDUNDANT: 4
INSTALLING: Ci.nsIServiceWorkerInfo.STATE_INSTALLING,
INSTALLED: Ci.nsIServiceWorkerInfo.STATE_INSTALLED,
ACTIVATING: Ci.nsIServiceWorkerInfo.STATE_ACTIVATING,
ACTIVATED: Ci.nsIServiceWorkerInfo.STATE_ACTIVATED,
REDUNDANT: Ci.nsIServiceWorkerInfo.STATE_REDUNDANT
};
let { classes: Cc, interfaces: Ci, utils: Cu } = Components;
let swm = Cc["@mozilla.org/serviceworkers/manager;1"].
getService(Ci.nsIServiceWorkerManager);

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

@ -114,7 +114,7 @@ SharedSurface::ProdCopy(SharedSurface* src, SharedSurface* dest,
src->mSize,
dest->mSize,
srcTarget,
true);
!!gl->Screen());
} else if (src->mAttachType == AttachmentType::GLRenderbuffer) {
GLuint srcRB = src->ProdRenderbuffer();
ScopedFramebufferForRenderbuffer srcWrapper(gl, srcRB);

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

@ -848,6 +848,39 @@ BaselineCacheIRCompiler::emitLoadStringResult()
return true;
}
typedef bool (*StringSplitHelperFn)(JSContext*, HandleString, HandleString, HandleObjectGroup,
uint32_t limit, MutableHandleValue);
static const VMFunction StringSplitHelperInfo =
FunctionInfo<StringSplitHelperFn>(StringSplitHelper, "StringSplitHelper");
bool
BaselineCacheIRCompiler::emitCallStringSplitResult()
{
Register str = allocator.useRegister(masm, reader.stringOperandId());
Register sep = allocator.useRegister(masm, reader.stringOperandId());
Address groupAddr(stubAddress(reader.stubOffset()));
AutoScratchRegister scratch(allocator, masm);
allocator.discardStack(masm);
AutoStubFrame stubFrame(*this);
stubFrame.enter(masm, scratch);
// Load the group in the scratch register.
masm.loadPtr(groupAddr, scratch);
masm.Push(Imm32(INT32_MAX));
masm.Push(scratch);
masm.Push(sep);
masm.Push(str);
if (!callVM(masm, StringSplitHelperInfo))
return false;
stubFrame.leave(masm);
return true;
}
bool
BaselineCacheIRCompiler::callTypeUpdateIC(Register obj, ValueOperand val, Register scratch,
LiveGeneralRegisterSet saveRegs)
@ -1795,6 +1828,15 @@ BaselineCacheIRCompiler::emitLoadObject()
return true;
}
bool
BaselineCacheIRCompiler::emitLoadStackValue()
{
ValueOperand val = allocator.defineValueRegister(masm, reader.valOperandId());
Address addr = allocator.addressOf(masm, BaselineFrameSlot(reader.uint32Immediate()));
masm.loadValue(addr, val);
return true;
}
bool
BaselineCacheIRCompiler::emitGuardDOMExpandoMissingOrGuardShape()
{
@ -1896,6 +1938,15 @@ BaselineCacheIRCompiler::init(CacheKind kind)
// availableGeneralRegs can't know that GetName/BindName is only using
// the payloadReg and not typeReg on x86.
available.add(R0.typeReg());
#endif
break;
case CacheKind::Call:
MOZ_ASSERT(numInputs == 1);
allocator.initInputLocation(0, R0.scratchReg(), JSVAL_TYPE_INT32);
#if defined(JS_NUNBOX32)
// availableGeneralRegs can't know that Call is only using
// the payloadReg and not typeReg on x86.
available.add(R0.typeReg());
#endif
break;
}
@ -1943,6 +1994,7 @@ jit::AttachBaselineCacheIRStub(JSContext* cx, const CacheIRWriter& writer,
case CacheKind::GetProp:
case CacheKind::GetElem:
case CacheKind::GetName:
case CacheKind::Call:
stubDataOffset = sizeof(ICCacheIR_Monitored);
stubKind = CacheIRStubKind::Monitored;
break;

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

@ -2047,7 +2047,7 @@ GetTemplateObjectForClassHook(JSContext* cx, JSNative hook, CallArgs& args,
}
static bool
IsOptimizableCallStringSplit(const Value& callee, int argc, Value* args)
IsOptimizableConstStringSplit(const Value& callee, int argc, Value* args)
{
if (argc != 2 || !args[0].isString() || !args[1].isString())
return false;
@ -2085,13 +2085,11 @@ TryAttachCallStub(JSContext* cx, ICCall_Fallback* stub, HandleScript script, jsb
RootedValue thisv(cx, vp[1]);
// Don't attach an optimized call stub if we could potentially attach an
// optimized StringSplit stub.
if (stub->numOptimizedStubs() == 0 && IsOptimizableCallStringSplit(callee, argc, vp + 2))
// optimized ConstStringSplit stub.
if (stub->numOptimizedStubs() == 0 && IsOptimizableConstStringSplit(callee, argc, vp + 2))
return true;
MOZ_ASSERT_IF(stub->hasStub(ICStub::Call_StringSplit), stub->numOptimizedStubs() == 1);
stub->unlinkStubsWithKind(cx, ICStub::Call_StringSplit);
stub->unlinkStubsWithKind(cx, ICStub::Call_ConstStringSplit);
if (!callee.isObject())
return true;
@ -2333,9 +2331,9 @@ CopyArray(JSContext* cx, HandleObject obj, MutableHandleValue result)
}
static bool
TryAttachStringSplit(JSContext* cx, ICCall_Fallback* stub, HandleScript script,
uint32_t argc, HandleValue callee, Value* vp, jsbytecode* pc,
HandleValue res, bool* attached)
TryAttachConstStringSplit(JSContext* cx, ICCall_Fallback* stub, HandleScript script,
uint32_t argc, HandleValue callee, Value* vp, jsbytecode* pc,
HandleValue res, bool* attached)
{
if (stub->numOptimizedStubs() != 0)
return true;
@ -2346,7 +2344,7 @@ TryAttachStringSplit(JSContext* cx, ICCall_Fallback* stub, HandleScript script,
if (JSOp(*pc) == JSOP_NEW)
return true;
if (!IsOptimizableCallStringSplit(callee, argc, args))
if (!IsOptimizableConstStringSplit(callee, argc, args))
return true;
MOZ_ASSERT(callee.isObject());
@ -2375,9 +2373,8 @@ TryAttachStringSplit(JSContext* cx, ICCall_Fallback* stub, HandleScript script,
}
}
ICCall_StringSplit::Compiler compiler(cx, stub->fallbackMonitorStub()->firstMonitorStub(),
script->pcToOffset(pc), str, sep,
arr);
ICCall_ConstStringSplit::Compiler compiler(cx, stub->fallbackMonitorStub()->firstMonitorStub(),
script->pcToOffset(pc), str, sep, arr);
ICStub* newStub = compiler.getStub(compiler.getStubSpace(script));
if (!newStub)
return false;
@ -2417,14 +2414,22 @@ DoCallFallback(JSContext* cx, BaselineFrame* frame, ICCall_Fallback* stub_, uint
return false;
}
bool createSingleton = ObjectGroup::useSingletonForNewObject(cx, script, pc);
CallIRGenerator gen(cx, script, pc, stub->state().mode(), argc,
callee, callArgs.thisv(),
HandleValueArray::fromMarkedLocation(argc, vp+2));
bool optimizeAfterCall = false;
CallIRGenerator::OptStrategy optStrategy = gen.getOptStrategy(&optimizeAfterCall);
// Try attaching a call stub.
// Try attaching a call stub, if the CallIRGenerator has determined that this
// operation cannot be optimized after the call.
bool handled = false;
if (!TryAttachCallStub(cx, stub, script, pc, op, argc, vp, constructing, false,
createSingleton, &handled))
{
return false;
if (!optimizeAfterCall) {
bool createSingleton = ObjectGroup::useSingletonForNewObject(cx, script, pc);
if (!TryAttachCallStub(cx, stub, script, pc, op, argc, vp, constructing, false,
createSingleton, &handled))
{
return false;
}
}
if (op == JSOP_NEW) {
@ -2467,11 +2472,24 @@ DoCallFallback(JSContext* cx, BaselineFrame* frame, ICCall_Fallback* stub_, uint
if (!stub->addMonitorStubForValue(cx, frame, types, res))
return false;
// If 'callee' is a potential Call_StringSplit, try to attach an
// optimized StringSplit stub. Note that vp[0] now holds the return value
// instead of the callee, so we pass the callee as well.
if (!TryAttachStringSplit(cx, stub, script, argc, callee, vp, pc, res, &handled))
return false;
if (optimizeAfterCall && !handled && optStrategy != CallIRGenerator::OptStrategy::None) {
if (gen.tryAttachStub()) {
ICStub* newStub = AttachBaselineCacheIRStub(cx, gen.writerRef(), gen.cacheKind(),
ICStubEngine::Baseline, script, stub,
&handled);
if (newStub) {
JitSpew(JitSpew_BaselineIC, " Attached CacheIR stub");
}
}
}
if (!handled) {
// If 'callee' is a potential Call_ConstStringSplit, try to attach an
// optimized ConstStringSplit stub. Note that vp[0] now holds the return value
// instead of the callee, so we pass the callee as well.
if (!TryAttachConstStringSplit(cx, stub, script, argc, callee, vp, pc, res, &handled))
return false;
}
if (!handled)
stub->noteUnoptimizableCall();
@ -3251,7 +3269,7 @@ typedef bool (*CopyArrayFn)(JSContext*, HandleObject, MutableHandleValue);
static const VMFunction CopyArrayInfo = FunctionInfo<CopyArrayFn>(CopyArray, "CopyArray");
bool
ICCall_StringSplit::Compiler::generateStubCode(MacroAssembler& masm)
ICCall_ConstStringSplit::Compiler::generateStubCode(MacroAssembler& masm)
{
MOZ_ASSERT(engine_ == Engine::Baseline);

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

@ -1214,7 +1214,7 @@ class ICCall_ScriptedFunCall : public ICMonitoredStub
};
};
class ICCall_StringSplit : public ICMonitoredStub
class ICCall_ConstStringSplit : public ICMonitoredStub
{
friend class ICStubSpace;
@ -1224,24 +1224,24 @@ class ICCall_StringSplit : public ICMonitoredStub
GCPtrString expectedSep_;
GCPtrObject templateObject_;
ICCall_StringSplit(JitCode* stubCode, ICStub* firstMonitorStub, uint32_t pcOffset, JSString* str,
JSString* sep, JSObject* templateObject)
: ICMonitoredStub(ICStub::Call_StringSplit, stubCode, firstMonitorStub),
ICCall_ConstStringSplit(JitCode* stubCode, ICStub* firstMonitorStub, uint32_t pcOffset,
JSString* str, JSString* sep, JSObject* templateObject)
: ICMonitoredStub(ICStub::Call_ConstStringSplit, stubCode, firstMonitorStub),
pcOffset_(pcOffset), expectedStr_(str), expectedSep_(sep),
templateObject_(templateObject)
{ }
public:
static size_t offsetOfExpectedStr() {
return offsetof(ICCall_StringSplit, expectedStr_);
return offsetof(ICCall_ConstStringSplit, expectedStr_);
}
static size_t offsetOfExpectedSep() {
return offsetof(ICCall_StringSplit, expectedSep_);
return offsetof(ICCall_ConstStringSplit, expectedSep_);
}
static size_t offsetOfTemplateObject() {
return offsetof(ICCall_StringSplit, templateObject_);
return offsetof(ICCall_ConstStringSplit, templateObject_);
}
GCPtrString& expectedStr() {
@ -1274,7 +1274,7 @@ class ICCall_StringSplit : public ICMonitoredStub
public:
Compiler(JSContext* cx, ICStub* firstMonitorStub, uint32_t pcOffset, HandleString str,
HandleString sep, HandleValue templateObject)
: ICCallStubCompiler(cx, ICStub::Call_StringSplit),
: ICCallStubCompiler(cx, ICStub::Call_ConstStringSplit),
firstMonitorStub_(firstMonitorStub),
pcOffset_(pcOffset),
expectedStr_(cx, str),
@ -1283,8 +1283,9 @@ class ICCall_StringSplit : public ICMonitoredStub
{ }
ICStub* getStub(ICStubSpace* space) {
return newStub<ICCall_StringSplit>(space, getStubCode(), firstMonitorStub_, pcOffset_,
expectedStr_, expectedSep_, templateObject_);
return newStub<ICCall_ConstStringSplit>(space, getStubCode(), firstMonitorStub_,
pcOffset_, expectedStr_, expectedSep_,
templateObject_);
}
};
};

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

@ -47,7 +47,7 @@ namespace jit {
_(Call_ScriptedApplyArray) \
_(Call_ScriptedApplyArguments) \
_(Call_ScriptedFunCall) \
_(Call_StringSplit) \
_(Call_ConstStringSplit) \
_(Call_IsSuspendedStarGenerator) \
\
_(GetElem_Fallback) \

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

@ -620,25 +620,25 @@ BaselineInspector::getTemplateObjectForNative(jsbytecode* pc, Native native)
}
bool
BaselineInspector::isOptimizableCallStringSplit(jsbytecode* pc, JSString** strOut, JSString** sepOut,
JSObject** objOut)
BaselineInspector::isOptimizableConstStringSplit(jsbytecode* pc, JSString** strOut,
JSString** sepOut, JSObject** objOut)
{
if (!hasBaselineScript())
return false;
const ICEntry& entry = icEntryFromPC(pc);
// If StringSplit stub is attached, must have only one stub attached.
// If ConstStringSplit stub is attached, must have only one stub attached.
if (entry.fallbackStub()->numOptimizedStubs() != 1)
return false;
ICStub* stub = entry.firstStub();
if (stub->kind() != ICStub::Call_StringSplit)
if (stub->kind() != ICStub::Call_ConstStringSplit)
return false;
*strOut = stub->toCall_StringSplit()->expectedStr();
*sepOut = stub->toCall_StringSplit()->expectedSep();
*objOut = stub->toCall_StringSplit()->templateObject();
*strOut = stub->toCall_ConstStringSplit()->expectedStr();
*sepOut = stub->toCall_ConstStringSplit()->expectedSep();
*objOut = stub->toCall_ConstStringSplit()->templateObject();
return true;
}

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

@ -110,8 +110,8 @@ class BaselineInspector
bool hasSeenDoubleResult(jsbytecode* pc);
bool hasSeenNonStringIterMore(jsbytecode* pc);
MOZ_MUST_USE bool isOptimizableCallStringSplit(jsbytecode* pc, JSString** strOut,
JSString** sepOut, JSObject** objOut);
MOZ_MUST_USE bool isOptimizableConstStringSplit(jsbytecode* pc, JSString** strOut,
JSString** sepOut, JSObject** objOut);
JSObject* getTemplateObject(jsbytecode* pc);
JSObject* getTemplateObjectForNative(jsbytecode* pc, Native native);
JSObject* getTemplateObjectForClassHook(jsbytecode* pc, const Class* clasp);

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

@ -13,6 +13,7 @@
#include "jit/CacheIRSpewer.h"
#include "jit/IonCaches.h"
#include "vm/SelfHosting.h"
#include "jsobjinlines.h"
#include "vm/EnvironmentObject-inl.h"
@ -3528,3 +3529,128 @@ TypeOfIRGenerator::tryAttachObject(ValOperandId valId)
return true;
}
CallIRGenerator::CallIRGenerator(JSContext* cx, HandleScript script, jsbytecode* pc,
ICState::Mode mode, uint32_t argc,
HandleValue callee, HandleValue thisval, HandleValueArray args)
: IRGenerator(cx, script, pc, CacheKind::Call, mode),
argc_(argc),
callee_(callee),
thisval_(thisval),
args_(args),
cachedStrategy_()
{ }
CallIRGenerator::OptStrategy
CallIRGenerator::canOptimize()
{
// Ensure callee is a function.
if (!callee_.isObject() || !callee_.toObject().is<JSFunction>())
return OptStrategy::None;
RootedFunction calleeFunc(cx_, &callee_.toObject().as<JSFunction>());
OptStrategy strategy;
if ((strategy = canOptimizeStringSplit(calleeFunc)) != OptStrategy::None) {
return strategy;
}
return OptStrategy::None;
}
CallIRGenerator::OptStrategy
CallIRGenerator::canOptimizeStringSplit(HandleFunction calleeFunc)
{
if (argc_ != 2 || !args_[0].isString() || !args_[1].isString())
return OptStrategy::None;
// Just for now: if they're both atoms, then do not optimize using
// CacheIR and allow the legacy "ConstStringSplit" BaselineIC optimization
// to proceed.
if (args_[0].toString()->isAtom() && args_[1].toString()->isAtom())
return OptStrategy::None;
if (!calleeFunc->isNative())
return OptStrategy::None;
if (calleeFunc->native() != js::intrinsic_StringSplitString)
return OptStrategy::None;
return OptStrategy::StringSplit;
}
bool
CallIRGenerator::tryAttachStringSplit()
{
// Get the object group to use for this location.
RootedObjectGroup group(cx_, ObjectGroupCompartment::getStringSplitStringGroup(cx_));
if (!group) {
return false;
}
AutoAssertNoPendingException aanpe(cx_);
Int32OperandId argcId(writer.setInputOperandId(0));
// Ensure argc == 1.
writer.guardSpecificInt32Immediate(argcId, 2);
// 1 argument only. Stack-layout here is (bottom to top):
//
// 3: Callee
// 2: ThisValue
// 1: Arg0
// 0: Arg1 <-- Top of stack
// Ensure callee is an object and is the function that matches the callee optimized
// against during stub generation (i.e. the String_split function object).
ValOperandId calleeValId = writer.loadStackValue(3);
ObjOperandId calleeObjId = writer.guardIsObject(calleeValId);
writer.guardIsNativeFunction(calleeObjId, js::intrinsic_StringSplitString);
// Ensure arg0 is a string.
ValOperandId arg0ValId = writer.loadStackValue(1);
StringOperandId arg0StrId = writer.guardIsString(arg0ValId);
// Ensure arg1 is a string.
ValOperandId arg1ValId = writer.loadStackValue(0);
StringOperandId arg1StrId = writer.guardIsString(arg1ValId);
// Call custom string splitter VM-function.
writer.callStringSplitResult(arg0StrId, arg1StrId, group);
writer.typeMonitorResult();
return true;
}
CallIRGenerator::OptStrategy
CallIRGenerator::getOptStrategy(bool* optimizeAfterCall)
{
if (!cachedStrategy_) {
cachedStrategy_ = mozilla::Some(canOptimize());
}
if (optimizeAfterCall != nullptr) {
MOZ_ASSERT(cachedStrategy_.isSome());
switch (cachedStrategy_.value()) {
case OptStrategy::StringSplit:
*optimizeAfterCall = true;
break;
default:
*optimizeAfterCall = false;
}
}
return cachedStrategy_.value();
}
bool
CallIRGenerator::tryAttachStub()
{
OptStrategy strategy = getOptStrategy();
if (strategy == OptStrategy::StringSplit) {
return tryAttachStringSplit();
}
MOZ_ASSERT(strategy == OptStrategy::None);
return false;
}

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

@ -142,7 +142,8 @@ class TypedOperandId : public OperandId
_(BindName) \
_(In) \
_(HasOwn) \
_(TypeOf)
_(TypeOf) \
_(Call)
enum class CacheKind : uint8_t
{
@ -165,12 +166,14 @@ extern const char* CacheKindNames[];
_(GuardProto) \
_(GuardClass) \
_(GuardCompartment) \
_(GuardIsNativeFunction) \
_(GuardIsProxy) \
_(GuardIsCrossCompartmentWrapper) \
_(GuardNotDOMProxy) \
_(GuardSpecificObject) \
_(GuardSpecificAtom) \
_(GuardSpecificSymbol) \
_(GuardSpecificInt32Immediate) \
_(GuardNoDetachedTypedObjects) \
_(GuardMagicValue) \
_(GuardFrameHasNoArgumentsObject) \
@ -180,6 +183,7 @@ extern const char* CacheKindNames[];
_(GuardAndGetIndexFromString) \
_(GuardHasGetterSetter) \
_(GuardGroupHasUnanalyzedNewScript) \
_(LoadStackValue) \
_(LoadObject) \
_(LoadProto) \
_(LoadEnclosingEnvironment) \
@ -249,6 +253,10 @@ extern const char* CacheKindNames[];
_(LoadStringResult) \
_(LoadTypeOfObjectResult) \
\
_(CallStringSplitResult) \
_(CallPrintString) \
_(Breakpoint) \
\
_(TypeMonitorResult) \
_(ReturnFromIC) \
_(WrapResult)
@ -377,6 +385,16 @@ class MOZ_RAII CacheIRWriter : public JS::CustomAutoRooter
operandLastUsed_[opId.id()] = nextInstructionId_ - 1;
}
void writeInt32Immediate(int32_t i32) {
buffer_.writeSigned(i32);
}
void writeUint32Immediate(uint32_t u32) {
buffer_.writeUnsigned(u32);
}
void writePointer(void* ptr) {
buffer_.writeRawPointer(ptr);
}
void writeOpWithOperandId(CacheOp op, OperandId opId) {
writeOp(op);
writeOperandId(opId);
@ -503,6 +521,10 @@ class MOZ_RAII CacheIRWriter : public JS::CustomAutoRooter
writeOpWithOperandId(CacheOp::GuardClass, obj);
buffer_.writeByte(uint32_t(kind));
}
void guardIsNativeFunction(ObjOperandId obj, JSNative nativeFunc) {
writeOpWithOperandId(CacheOp::GuardIsNativeFunction, obj);
writePointer(JS_FUNC_TO_DATA_PTR(void*, nativeFunc));
}
void guardIsProxy(ObjOperandId obj) {
writeOpWithOperandId(CacheOp::GuardIsProxy, obj);
}
@ -524,6 +546,11 @@ class MOZ_RAII CacheIRWriter : public JS::CustomAutoRooter
writeOpWithOperandId(CacheOp::GuardSpecificSymbol, sym);
addStubField(uintptr_t(expected), StubField::Type::Symbol);
}
void guardSpecificInt32Immediate(Int32OperandId operand, int32_t expected) {
writeOp(CacheOp::GuardSpecificInt32Immediate);
writeOperandId(operand);
writeInt32Immediate(expected);
}
void guardMagicValue(ValOperandId val, JSWhyMagic magic) {
writeOpWithOperandId(CacheOp::GuardMagicValue, val);
buffer_.writeByte(uint32_t(magic));
@ -580,6 +607,12 @@ class MOZ_RAII CacheIRWriter : public JS::CustomAutoRooter
return res;
}
ValOperandId loadStackValue(uint32_t idx) {
ValOperandId res(nextOperandId_++);
writeOpWithOperandId(CacheOp::LoadStackValue, res);
writeUint32Immediate(idx);
return res;
}
ObjOperandId loadObject(JSObject* obj) {
ObjOperandId res(nextOperandId_++);
writeOpWithOperandId(CacheOp::LoadObject, res);
@ -912,6 +945,21 @@ class MOZ_RAII CacheIRWriter : public JS::CustomAutoRooter
writeOpWithOperandId(CacheOp::LoadTypeOfObjectResult, obj);
}
void callStringSplitResult(StringOperandId str, StringOperandId sep, ObjectGroup* group) {
writeOp(CacheOp::CallStringSplitResult);
writeOperandId(str);
writeOperandId(sep);
addStubField(uintptr_t(group), StubField::Type::ObjectGroup);
}
void callPrintString(const char* str) {
writeOp(CacheOp::CallPrintString);
writePointer(const_cast<char*>(str));
}
void breakpoint() {
writeOp(CacheOp::Breakpoint);
}
void typeMonitorResult() {
writeOp(CacheOp::TypeMonitorResult);
}
@ -961,6 +1009,9 @@ class MOZ_RAII CacheIRReader
Scalar::Type scalarType() { return Scalar::Type(buffer_.readByte()); }
uint32_t typeDescrKey() { return buffer_.readByte(); }
JSWhyMagic whyMagic() { return JSWhyMagic(buffer_.readByte()); }
int32_t int32Immediate() { return buffer_.readSigned(); }
uint32_t uint32Immediate() { return buffer_.readUnsigned(); }
void* pointer() { return buffer_.readRawPointer(); }
ReferenceTypeDescr::Type referenceTypeDescrType() {
return ReferenceTypeDescr::Type(buffer_.readByte());
@ -1318,6 +1369,35 @@ class MOZ_RAII TypeOfIRGenerator : public IRGenerator
bool tryAttachStub();
};
class MOZ_RAII CallIRGenerator : public IRGenerator
{
public:
enum class OptStrategy {
None = 0,
StringSplit
};
private:
uint32_t argc_;
HandleValue callee_;
HandleValue thisval_;
HandleValueArray args_;
mozilla::Maybe<OptStrategy> cachedStrategy_;
OptStrategy canOptimize();
OptStrategy canOptimizeStringSplit(HandleFunction calleeFunc);
bool tryAttachStringSplit();
public:
CallIRGenerator(JSContext* cx, HandleScript, jsbytecode* pc, ICState::Mode mode,
uint32_t argc, HandleValue callee, HandleValue thisval,
HandleValueArray args);
OptStrategy getOptStrategy(bool* optimizeAfterCall = nullptr);
bool tryAttachStub();
};
} // namespace jit
} // namespace js

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

@ -1400,6 +1400,27 @@ CacheIRCompiler::emitGuardClass()
return true;
}
bool
CacheIRCompiler::emitGuardIsNativeFunction()
{
Register obj = allocator.useRegister(masm, reader.objOperandId());
JSNative nativeFunc = reinterpret_cast<JSNative>(reader.pointer());
AutoScratchRegister scratch(allocator, masm);
FailurePath* failure;
if (!addFailurePath(&failure))
return false;
// Ensure obj is a function.
const Class* clasp = &JSFunction::class_;
masm.branchTestObjClass(Assembler::NotEqual, obj, scratch, clasp, failure->label());
// Ensure function native matches.
masm.branchPtr(Assembler::NotEqual, Address(obj, JSFunction::offsetOfNativeOrScript()),
ImmPtr(nativeFunc), failure->label());
return true;
}
bool
CacheIRCompiler::emitGuardIsProxy()
{
@ -1445,6 +1466,20 @@ CacheIRCompiler::emitGuardNotDOMProxy()
return true;
}
bool
CacheIRCompiler::emitGuardSpecificInt32Immediate()
{
Register reg = allocator.useRegister(masm, reader.int32OperandId());
int32_t ival = reader.int32Immediate();
FailurePath* failure;
if (!addFailurePath(&failure))
return false;
masm.branch32(Assembler::NotEqual, reg, Imm32(ival), failure->label());
return true;
}
bool
CacheIRCompiler::emitGuardMagicValue()
{
@ -2191,6 +2226,21 @@ CacheIRCompiler::emitLoadTypeOfObjectResult()
return true;
}
bool
CacheIRCompiler::emitCallPrintString()
{
const char* str = reinterpret_cast<char*>(reader.pointer());
masm.printf(str);
return true;
}
bool
CacheIRCompiler::emitBreakpoint()
{
masm.breakpoint();
return true;
}
void
CacheIRCompiler::emitStoreTypedObjectReferenceProp(ValueOperand val, ReferenceTypeDescr::Type type,
const Address& dest, Register scratch)

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

@ -22,9 +22,11 @@ namespace jit {
_(GuardIsInt32Index) \
_(GuardType) \
_(GuardClass) \
_(GuardIsNativeFunction) \
_(GuardIsProxy) \
_(GuardIsCrossCompartmentWrapper) \
_(GuardNotDOMProxy) \
_(GuardSpecificInt32Immediate) \
_(GuardMagicValue) \
_(GuardNoUnboxedExpando) \
_(GuardAndLoadUnboxedExpando) \
@ -53,6 +55,8 @@ namespace jit {
_(LoadTypedElementResult) \
_(LoadObjectResult) \
_(LoadTypeOfObjectResult) \
_(CallPrintString) \
_(Breakpoint) \
_(MegamorphicLoadSlotByValueResult) \
_(MegamorphicHasOwnResult) \
_(WrapResult)

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

@ -286,6 +286,9 @@ CodeGenerator::visitOutOfLineICFallback(OutOfLineICFallback* ool)
masm.jump(ool->rejoin());
return;
}
case CacheKind::Call:
/* CacheIR Call ICs should not show up in Ion. */
MOZ_CRASH();
}
MOZ_CRASH();
}

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

@ -87,6 +87,14 @@ class CompactBufferReader
return result;
}
void* readRawPointer() {
uintptr_t ptrWord = 0;
for (unsigned i = 0; i < sizeof(uintptr_t); i++) {
ptrWord |= static_cast<uintptr_t>(readByte()) << (i*8);
}
return reinterpret_cast<void*>(ptrWord);
}
bool more() const {
MOZ_ASSERT(buffer_ <= end_);
return buffer_ < end_;
@ -175,6 +183,12 @@ class CompactBufferWriter
uint8_t* endPtr = buffer() + length();
reinterpret_cast<uint32_t*>(endPtr)[-1] = value;
}
void writeRawPointer(void* ptr) {
uintptr_t ptrWord = reinterpret_cast<uintptr_t>(ptr);
for (unsigned i = 0; i < sizeof(uintptr_t); i++) {
writeByte((ptrWord >> (i*8)) & 0xFF);
}
}
size_t length() const {
return buffer_.length();
}

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

@ -456,6 +456,7 @@ IonCacheIRCompiler::init()
break;
}
case CacheKind::TypeOf:
case CacheKind::Call:
MOZ_CRASH("Invalid cache");
case CacheKind::HasOwn: {
IonHasOwnIC* ic = ic_->asHasOwnIC();
@ -1164,6 +1165,37 @@ IonCacheIRCompiler::emitLoadStringResult()
MOZ_CRASH("not used in ion");
}
typedef bool (*StringSplitHelperFn)(JSContext*, HandleString, HandleString, HandleObjectGroup,
uint32_t limit, MutableHandleValue);
static const VMFunction StringSplitHelperInfo =
FunctionInfo<StringSplitHelperFn>(StringSplitHelper, "StringSplitHelper");
bool
IonCacheIRCompiler::emitCallStringSplitResult()
{
AutoSaveLiveRegisters save(*this);
AutoOutputRegister output(*this);
Register str = allocator.useRegister(masm, reader.stringOperandId());
Register sep = allocator.useRegister(masm, reader.stringOperandId());
ObjectGroup* group = groupStubField(reader.stubOffset());
allocator.discardStack(masm);
prepareVMCall(masm);
masm.Push(str);
masm.Push(sep);
masm.Push(ImmGCPtr(group));
masm.Push(Imm32(INT32_MAX));
if (!callVM(masm, StringSplitHelperInfo))
return false;
masm.storeCallResultValue(output);
return true;
}
static bool
GroupHasPropertyTypes(ObjectGroup* group, jsid* id, Value* v)
{
@ -1964,6 +1996,13 @@ IonCacheIRCompiler::emitLoadObject()
return true;
}
bool
IonCacheIRCompiler::emitLoadStackValue()
{
MOZ_ASSERT_UNREACHABLE("emitLoadStackValue not supported for IonCaches.");
return false;
}
bool
IonCacheIRCompiler::emitGuardDOMExpandoMissingOrGuardShape()
{

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

@ -51,6 +51,7 @@ IonIC::scratchRegisterForEntryJump()
case CacheKind::In:
return asInIC()->temp();
case CacheKind::TypeOf:
case CacheKind::Call:
MOZ_CRASH("Baseline-specific for now");
case CacheKind::HasOwn:
return asHasOwnIC()->output();

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

@ -1483,7 +1483,7 @@ IonBuilder::inlineConstantStringSplitString(CallInfo& callInfo)
JSString* stringStr = nullptr;
JSString* stringSep = nullptr;
JSObject* templateObject = nullptr;
if (!inspector->isOptimizableCallStringSplit(pc, &stringStr, &stringSep, &templateObject))
if (!inspector->isOptimizableConstStringSplit(pc, &stringStr, &stringSep, &templateObject))
return InliningStatus_NotInlined;
MOZ_ASSERT(stringStr);
@ -1584,11 +1584,14 @@ IonBuilder::inlineStringSplitString(CallInfo& callInfo)
if (resultConstStringSplit != InliningStatus_NotInlined)
return resultConstStringSplit;
JSObject* templateObject = inspector->getTemplateObjectForNative(pc, js::intrinsic_StringSplitString);
if (!templateObject)
JSContext* cx = GetJitContext()->cx;
ObjectGroup* group = ObjectGroupCompartment::getStringSplitStringGroup(cx);
if (!group)
return InliningStatus_NotInlined;
if (group->maybePreliminaryObjects())
return InliningStatus_NotInlined;
TypeSet::ObjectKey* retKey = TypeSet::ObjectKey::get(templateObject);
TypeSet::ObjectKey* retKey = TypeSet::ObjectKey::get(group);
if (retKey->unknownProperties())
return InliningStatus_NotInlined;
@ -1602,12 +1605,7 @@ IonBuilder::inlineStringSplitString(CallInfo& callInfo)
}
callInfo.setImplicitlyUsedUnchecked();
MConstant* templateObjectDef = MConstant::New(alloc(), ObjectValue(*templateObject),
constraints());
current->add(templateObjectDef);
MStringSplit* ins = MStringSplit::New(alloc(), constraints(), strArg, sepArg,
templateObjectDef);
MStringSplit* ins = MStringSplit::New(alloc(), constraints(), strArg, sepArg, group);
current->add(ins);
current->push(ins);

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

@ -7491,15 +7491,19 @@ class MSinCos
};
class MStringSplit
: public MTernaryInstruction,
: public MBinaryInstruction,
public MixPolicy<StringPolicy<0>, StringPolicy<1> >::Data
{
CompilerObjectGroup group_;
MStringSplit(CompilerConstraintList* constraints, MDefinition* string, MDefinition* sep,
MConstant* templateObject)
: MTernaryInstruction(string, sep, templateObject)
ObjectGroup* group)
: MBinaryInstruction(string, sep),
group_(group)
{
setResultType(MIRType::Object);
setResultTypeSet(templateObject->resultTypeSet());
TemporaryTypeSet* types = MakeSingletonTypeSet(constraints, group);
setResultTypeSet(types);
}
public:
@ -7507,11 +7511,8 @@ class MStringSplit
TRIVIAL_NEW_WRAPPERS
NAMED_OPERANDS((0, string), (1, separator))
JSObject* templateObject() const {
return &getOperand(2)->toConstant()->toObject();
}
ObjectGroup* group() const {
return templateObject()->group();
return group_;
}
bool possiblyCalls() const override {
return true;
@ -7525,6 +7526,9 @@ class MStringSplit
bool canRecoverOnBailout() const override {
return true;
}
bool appendRoots(MRootList& roots) const override {
return roots.append(group_);
}
};
// Returns the value to use as |this| value. See also ComputeThis and

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

@ -1044,7 +1044,10 @@ RStringSplit::recover(JSContext* cx, SnapshotIterator& iter) const
{
RootedString str(cx, iter.read().toString());
RootedString sep(cx, iter.read().toString());
RootedObjectGroup group(cx, iter.read().toObject().group());
RootedObjectGroup group(cx, ObjectGroupCompartment::getStringSplitStringGroup(cx));
if (!group) {
return false;
}
RootedValue result(cx);
JSObject* res = str_split_string(cx, group, str, sep, INT32_MAX);

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

@ -485,7 +485,7 @@ class RRandom final : public RInstruction
class RStringSplit final : public RInstruction
{
public:
RINSTRUCTION_HEADER_NUM_OP_(StringSplit, 3)
RINSTRUCTION_HEADER_NUM_OP_(StringSplit, 2)
MOZ_MUST_USE bool recover(JSContext* cx, SnapshotIterator& iter) const override;
};

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

@ -173,7 +173,7 @@ ICStub::NonCacheIRStubMakesGCCalls(Kind kind)
case Call_ScriptedApplyArray:
case Call_ScriptedApplyArguments:
case Call_ScriptedFunCall:
case Call_StringSplit:
case Call_ConstStringSplit:
case WarmUpCounter_Fallback:
case RetSub_Fallback:
// These two fallback stubs don't actually make non-tail calls,
@ -259,8 +259,8 @@ ICStub::trace(JSTracer* trc)
TraceNullableEdge(trc, &callStub->templateObject(), "baseline-callclasshook-template");
break;
}
case ICStub::Call_StringSplit: {
ICCall_StringSplit* callStub = toCall_StringSplit();
case ICStub::Call_ConstStringSplit: {
ICCall_ConstStringSplit* callStub = toCall_ConstStringSplit();
TraceEdge(trc, &callStub->templateObject(), "baseline-callstringsplit-template");
TraceEdge(trc, &callStub->expectedSep(), "baseline-callstringsplit-sep");
TraceEdge(trc, &callStub->expectedStr(), "baseline-callstringsplit-str");

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

@ -323,6 +323,19 @@ StringsEqual(JSContext* cx, HandleString lhs, HandleString rhs, bool* res)
template bool StringsEqual<true>(JSContext* cx, HandleString lhs, HandleString rhs, bool* res);
template bool StringsEqual<false>(JSContext* cx, HandleString lhs, HandleString rhs, bool* res);
bool StringSplitHelper(JSContext* cx, HandleString str, HandleString sep,
HandleObjectGroup group, uint32_t limit,
MutableHandleValue result)
{
JSObject* resultObj = str_split_string(cx, group, str, sep, limit);
if (!resultObj)
return false;
result.setObject(*resultObj);
return true;
}
bool
ArrayPopDense(JSContext* cx, HandleObject obj, MutableHandleValue rval)
{

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

@ -646,6 +646,10 @@ bool GreaterThanOrEqual(JSContext* cx, MutableHandleValue lhs, MutableHandleValu
template<bool Equal>
bool StringsEqual(JSContext* cx, HandleString left, HandleString right, bool* res);
MOZ_MUST_USE bool StringSplitHelper(JSContext* cx, HandleString str, HandleString sep,
HandleObjectGroup group, uint32_t limit,
MutableHandleValue result);
MOZ_MUST_USE bool ArrayPopDense(JSContext* cx, HandleObject obj, MutableHandleValue rval);
MOZ_MUST_USE bool ArrayPushDense(JSContext* cx, HandleObject obj, HandleValue v, uint32_t* length);
MOZ_MUST_USE bool ArrayShiftDense(JSContext* cx, HandleObject obj, MutableHandleValue rval);

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

@ -1693,6 +1693,7 @@ ObjectGroupCompartment::~ObjectGroupCompartment()
js_delete(arrayObjectTable);
js_delete(plainObjectTable);
js_delete(allocationSiteTable);
stringSplitStringGroup = nullptr;
}
void
@ -1739,6 +1740,44 @@ ObjectGroupCompartment::makeGroup(JSContext* cx, const Class* clasp,
return group;
}
/* static */
ObjectGroup*
ObjectGroupCompartment::getStringSplitStringGroup(JSContext* cx)
{
ObjectGroupCompartment& groups = cx->compartment()->objectGroups;
ObjectGroup* group = groups.stringSplitStringGroup.get();
if (group) {
return group;
}
// The following code is a specialized version of the code
// for ObjectGroup::allocationSiteGroup().
const Class* clasp = GetClassForProtoKey(JSProto_Array);
RootedObject proto(cx);
if (!GetBuiltinPrototype(cx, JSProto_Array, &proto))
return nullptr;
Rooted<TaggedProto> tagged(cx, TaggedProto(proto));
group = makeGroup(cx, clasp, tagged, /* initialFlags = */ 0);
if (!group)
return nullptr;
if (cx->options().unboxedArrays()) {
PreliminaryObjectArrayWithTemplate* preliminaryObjects =
cx->new_<PreliminaryObjectArrayWithTemplate>(nullptr);
if (preliminaryObjects)
group->setPreliminaryObjects(preliminaryObjects);
else
cx->recoverFromOutOfMemory();
}
groups.stringSplitStringGroup.set(group);
return group;
}
void
ObjectGroupCompartment::addSizeOfExcludingThis(mozilla::MallocSizeOf mallocSizeOf,
size_t* allocationSiteTables,
@ -1820,6 +1859,11 @@ ObjectGroupCompartment::sweep(FreeOp* fop)
arrayObjectTable->sweep();
if (plainObjectTable)
plainObjectTable->sweep();
if (stringSplitStringGroup) {
if (JS::GCPolicy<ReadBarrieredObjectGroup>::needsSweep(&stringSplitStringGroup)) {
stringSplitStringGroup = nullptr;
}
}
}
void

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

@ -623,6 +623,14 @@ class ObjectGroupCompartment
// Table for referencing types of objects keyed to an allocation site.
AllocationSiteTable* allocationSiteTable;
// A single per-compartment ObjectGroup for all calls to StringSplitString.
// StringSplitString is always called from self-hosted code, and conceptually
// the return object for a string.split(string) operation should have a
// unified type. Having a global group for this also allows us to remove
// the hash-table lookup that would be required if we allocated this group
// on the basis of call-site pc.
ReadBarrieredObjectGroup stringSplitStringGroup;
public:
struct NewEntry;
@ -640,6 +648,8 @@ class ObjectGroupCompartment
Handle<TaggedProto> proto,
ObjectGroupFlags initialFlags = 0);
static ObjectGroup* getStringSplitStringGroup(JSContext* cx);
void addSizeOfExcludingThis(mozilla::MallocSizeOf mallocSizeOf,
size_t* allocationSiteTables,
size_t* arrayGroupTables,

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

@ -1658,7 +1658,7 @@ js::intrinsic_StringSplitString(JSContext* cx, unsigned argc, Value* vp)
RootedString string(cx, args[0].toString());
RootedString sep(cx, args[1].toString());
RootedObjectGroup group(cx, ObjectGroup::callingAllocationSiteGroup(cx, JSProto_Array));
RootedObjectGroup group(cx, ObjectGroupCompartment::getStringSplitStringGroup(cx));
if (!group)
return false;
@ -1683,7 +1683,7 @@ intrinsic_StringSplitStringLimit(JSContext* cx, unsigned argc, Value* vp)
// because of Ion optimization.
uint32_t limit = uint32_t(args[2].toNumber());
RootedObjectGroup group(cx, ObjectGroup::callingAllocationSiteGroup(cx, JSProto_Array));
RootedObjectGroup group(cx, ObjectGroupCompartment::getStringSplitStringGroup(cx));
if (!group)
return false;

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

@ -23,6 +23,7 @@ support-files =
[test_bug504311.xul]
[test_bug514660.xul]
[test_bug533845.xul]
skip-if = os == 'linux' && !debug # Bug 1208197
[test_bug551434.html]
[test_bug708062.html]
[test_bug812817.xul]

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

@ -15,13 +15,13 @@
"unpack": true
},
{
"version": "sccache rev d3aa1116844b50c03015266d2f48235509fa7deb",
"version": "sccache rev 9155425cfc038d6a60deb50816055f4e93b93ad1",
"algorithm": "sha512",
"visibility": "public",
"filename": "sccache2.tar.xz",
"unpack": true,
"digest": "fde0128b9a4df74f268f9d45748534d0314db0467ae22e36101df4a5374c36bb8676514e8b70254fb2e6f2a2d1224ff7ce498305223035d5f1e7e306fda2f5d5",
"size": 2179220
"digest": "da67d4a872f8d23ef0707e02a823e5a644f1988e605d2c46c787641c8c37ae4521ab7d83b1dc4c0cc52d203be6313c7f9580830845536fa7c2a521af9443f69a",
"size": 2192144
},
{
"size": 30899096,

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

@ -23,13 +23,13 @@
"unpack": true
},
{
"version": "sccache rev d3aa1116844b50c03015266d2f48235509fa7deb",
"version": "sccache rev 9155425cfc038d6a60deb50816055f4e93b93ad1",
"algorithm": "sha512",
"visibility": "public",
"filename": "sccache2.tar.xz",
"unpack": true,
"digest": "fde0128b9a4df74f268f9d45748534d0314db0467ae22e36101df4a5374c36bb8676514e8b70254fb2e6f2a2d1224ff7ce498305223035d5f1e7e306fda2f5d5",
"size": 2179220
"digest": "da67d4a872f8d23ef0707e02a823e5a644f1988e605d2c46c787641c8c37ae4521ab7d83b1dc4c0cc52d203be6313c7f9580830845536fa7c2a521af9443f69a",
"size": 2192144
},
{
"size": 30899096,

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

@ -24,13 +24,13 @@
"unpack": true
},
{
"version": "sccache rev d3aa1116844b50c03015266d2f48235509fa7deb",
"version": "sccache rev 9155425cfc038d6a60deb50816055f4e93b93ad1",
"algorithm": "sha512",
"visibility": "public",
"filename": "sccache2.tar.xz",
"unpack": true,
"digest": "fde0128b9a4df74f268f9d45748534d0314db0467ae22e36101df4a5374c36bb8676514e8b70254fb2e6f2a2d1224ff7ce498305223035d5f1e7e306fda2f5d5",
"size": 2179220
"digest": "da67d4a872f8d23ef0707e02a823e5a644f1988e605d2c46c787641c8c37ae4521ab7d83b1dc4c0cc52d203be6313c7f9580830845536fa7c2a521af9443f69a",
"size": 2192144
},
{
"size": 4906080,

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

@ -24,13 +24,13 @@
"unpack": true
},
{
"version": "sccache rev d3aa1116844b50c03015266d2f48235509fa7deb",
"version": "sccache rev 9155425cfc038d6a60deb50816055f4e93b93ad1",
"algorithm": "sha512",
"visibility": "public",
"filename": "sccache2.tar.xz",
"unpack": true,
"digest": "fde0128b9a4df74f268f9d45748534d0314db0467ae22e36101df4a5374c36bb8676514e8b70254fb2e6f2a2d1224ff7ce498305223035d5f1e7e306fda2f5d5",
"size": 2179220
"digest": "da67d4a872f8d23ef0707e02a823e5a644f1988e605d2c46c787641c8c37ae4521ab7d83b1dc4c0cc52d203be6313c7f9580830845536fa7c2a521af9443f69a",
"size": 2192144
},
{
"size": 4906080,

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

@ -5732,3 +5732,6 @@ pref("layers.advanced.filter-layers", 2);
// Enable lowercased response header name
pref("dom.xhr.lowercase_header.enabled", false);
// Open noopener links in a new process
pref("dom.noopener.newprocess.enabled", true);

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

@ -209,6 +209,7 @@ HttpBaseChannel::HttpBaseChannel()
, mAltDataLength(0)
, mForceMainDocumentChannel(false)
, mIsTrackingResource(false)
, mLastRedirectFlags(0)
{
LOG(("Creating HttpBaseChannel @%p\n", this));
@ -2962,7 +2963,26 @@ HttpBaseChannel::ShouldIntercept(nsIURI* aURI)
nsCOMPtr<nsINetworkInterceptController> controller;
GetCallback(controller);
bool shouldIntercept = false;
if (controller && !BypassServiceWorker() && mLoadInfo) {
// We should never intercept internal redirects. The ServiceWorker code
// can trigger interntal redirects as the result of a FetchEvent. If
// we re-intercept then an infinite loop can occur.
//
// Its also important that we do not set the LOAD_BYPASS_SERVICE_WORKER
// flag because an internal redirect occurs. Its possible that another
// interception should occur after the internal redirect. For example,
// if the ServiceWorker chooses not to call respondWith() the channel
// will be reset with an internal redirect. If the request is a navigation
// and the network then triggers a redirect its possible the new URL
// should be intercepted again.
//
// Note, HSTS upgrade redirects are often treated the same as internal
// redirects. In this case, however, we intentionally allow interception
// of HSTS upgrade redirects. This matches the expected spec behavior and
// does not run the risk of infinite loops as described above.
bool internalRedirect = mLastRedirectFlags & nsIChannelEventSink::REDIRECT_INTERNAL;
if (controller && mLoadInfo && !BypassServiceWorker() && !internalRedirect) {
nsresult rv = controller->ShouldPrepareForIntercept(aURI ? aURI : mURI.get(),
nsContentUtils::IsNonSubresourceRequest(this),
&shouldIntercept);
@ -3249,8 +3269,12 @@ HttpBaseChannel::SetupReplacementChannel(nsIURI *newURI,
// Preserve the CORS preflight information.
nsCOMPtr<nsIHttpChannelInternal> httpInternal = do_QueryInterface(newChannel);
if (mRequireCORSPreflight && httpInternal) {
httpInternal->SetCorsPreflightParameters(mUnsafeHeaders);
if (httpInternal) {
httpInternal->SetLastRedirectFlags(redirectFlags);
if (mRequireCORSPreflight) {
httpInternal->SetCorsPreflightParameters(mUnsafeHeaders);
}
}
if (preserveMethod) {
@ -4063,5 +4087,20 @@ HttpBaseChannel::GetConnectionInfoHashKey(nsACString& aConnectionInfoHashKey)
return NS_OK;
}
NS_IMETHODIMP
HttpBaseChannel::GetLastRedirectFlags(uint32_t *aValue)
{
NS_ENSURE_ARG(aValue);
*aValue = mLastRedirectFlags;
return NS_OK;
}
NS_IMETHODIMP
HttpBaseChannel::SetLastRedirectFlags(uint32_t aValue)
{
mLastRedirectFlags = aValue;
return NS_OK;
}
} // namespace net
} // namespace mozilla

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

@ -261,6 +261,8 @@ public:
NS_IMETHOD GetConnectionInfoHashKey(nsACString& aConnectionInfoHashKey) override;
NS_IMETHOD GetIntegrityMetadata(nsAString& aIntegrityMetadata) override;
NS_IMETHOD SetIntegrityMetadata(const nsAString& aIntegrityMetadata) override;
NS_IMETHOD GetLastRedirectFlags(uint32_t *aValue) override;
NS_IMETHOD SetLastRedirectFlags(uint32_t aValue) override;
inline void CleanRedirectCacheChainIfNecessary()
{
@ -631,6 +633,11 @@ protected:
uint64_t mChannelId;
// If this channel was created as the result of a redirect, then this value
// will reflect the redirect flags passed to the SetupReplacementChannel()
// method.
uint32_t mLastRedirectFlags;
nsString mIntegrityMetadata;
// Classified channel's matched information

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

@ -3163,7 +3163,9 @@ HttpChannelChild::ResetInterception()
// The chance to intercept any further requests associated with this channel
// (such as redirects) has passed.
mLoadFlags |= LOAD_BYPASS_SERVICE_WORKER;
if (mRedirectMode != nsIHttpChannelInternal::REDIRECT_MODE_MANUAL) {
mLoadFlags |= LOAD_BYPASS_SERVICE_WORKER;
}
// Continue with the original cross-process request
nsresult rv = ContinueAsyncOpen();

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

@ -5553,20 +5553,14 @@ nsHttpChannel::SetupReplacementChannel(nsIURI *newURI,
}
if (!(redirectFlags & nsIChannelEventSink::REDIRECT_STS_UPGRADE) &&
mInterceptCache != INTERCEPTED) {
// Ensure that internally-redirected channels, or loads with manual
// redirect mode cannot be intercepted, which would look like two
// separate requests to the nsINetworkInterceptController.
if (mRedirectMode != nsIHttpChannelInternal::REDIRECT_MODE_MANUAL ||
(redirectFlags & (nsIChannelEventSink::REDIRECT_TEMPORARY |
nsIChannelEventSink::REDIRECT_PERMANENT)) == 0) {
nsLoadFlags loadFlags = nsIRequest::LOAD_NORMAL;
rv = newChannel->GetLoadFlags(&loadFlags);
NS_ENSURE_SUCCESS(rv, rv);
loadFlags |= nsIChannel::LOAD_BYPASS_SERVICE_WORKER;
rv = newChannel->SetLoadFlags(loadFlags);
NS_ENSURE_SUCCESS(rv, rv);
}
mInterceptCache != INTERCEPTED &&
mRedirectMode != nsIHttpChannelInternal::REDIRECT_MODE_MANUAL) {
nsLoadFlags loadFlags = nsIRequest::LOAD_NORMAL;
rv = newChannel->GetLoadFlags(&loadFlags);
NS_ENSURE_SUCCESS(rv, rv);
loadFlags |= nsIChannel::LOAD_BYPASS_SERVICE_WORKER;
rv = newChannel->SetLoadFlags(loadFlags);
NS_ENSURE_SUCCESS(rv, rv);
}
if (redirectFlags & nsIChannelEventSink::REDIRECT_INTERNAL) {

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

@ -3079,7 +3079,10 @@ nsHttpConnectionMgr::ShouldStopReading(nsHttpTransaction * aTrans, bool aThrottl
bool nsHttpConnectionMgr::IsConnEntryUnderPressure(nsHttpConnectionInfo *connInfo)
{
nsConnectionEntry *ent = mCT.Get(connInfo->HashKey());
MOZ_ASSERT(ent);
if (!ent) {
// No entry, no pressure.
return false;
}
nsTArray<RefPtr<PendingTransactionInfo>> *transactions =
ent->mPendingTransactionTable.Get(mCurrentTopLevelOuterContentWindowId);

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

@ -314,4 +314,12 @@ interface nsIHttpChannelInternal : nsISupports
* The connection info's hash key. We use it to test connection separation.
*/
[must_use] readonly attribute ACString connectionInfoHashKey;
/**
* If this channel was created as the result of a redirect, then this
* value will reflect the redirect flags passed to the
* SetupReplacementChannel() method.
*/
[noscript, infallible]
attribute unsigned long lastRedirectFlags;
};

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

@ -115,10 +115,14 @@ class FFSetup(object):
mozrunner.Runner)
if self.test_config.get('webextensions', None):
# bug 1272255 - marionette doesn't work with MOZ_DISABLE_NONLOCAL_CONNECTIONS
self.env['MOZ_DISABLE_NONLOCAL_CONNECTIONS'] = '0'
args = [self.browser_config["extra_args"], "-marionette"]
runner = runner_cls(profile=self.profile_dir,
binary=self.browser_config["browser_path"],
cmdargs=args,
env=self.env,
process_class=ProcessHandlerMixin,
process_args={})
@ -158,6 +162,7 @@ class FFSetup(object):
runner = runner_cls(profile=self.profile_dir,
binary=self.browser_config["browser_path"],
cmdargs=args,
env=self.env,
process_class=ProcessHandlerMixin,
process_args={})

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

@ -523,7 +523,7 @@ class tp5o(PageloaderTest):
@register_test()
class tp5o_webext(tp5o):
webextensions = '${talos}/webextensions/dummy/dummy.xpi'
webextensions = '${talos}/webextensions/dummy/dummy-signed.xpi'
preferences = {'xpinstall.signatures.required': False}

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

@ -12,6 +12,7 @@ import xtalos
import subprocess
import json
import mozfile
import shutil
EVENTNAME_INDEX = 0
@ -38,6 +39,14 @@ gConnectionIDs = {}
gHeaders = {}
def uploadFile(filename):
mud = os.environ.get('MOZ_UPLOAD_DIR', None)
if mud:
print("uploading raw file %s via blobber" % filename)
mud_filename = os.path.join(mud, filename)
shutil.copyfile(filename, "%s.log" % mud_filename)
def filterOutHeader(data):
# -1 means we have not yet found the header
# 0 means we are in the header
@ -292,8 +301,9 @@ def etlparser(xperf_path, etl_filename, processID, approot=None,
elif event.startswith("Microsoft-Windows-TCPIP"):
trackThreadNetIO(row, io, stage)
# remove the csv file
if not debug:
if debug:
uploadFile(csvname)
else:
mozfile.remove(csvname)
output = "thread, stage, counter, value\n"
@ -303,6 +313,9 @@ def etlparser(xperf_path, etl_filename, processID, approot=None,
fname = "%s_thread_stats%s" % os.path.splitext(outputFile)
with open(fname, "w") as f:
f.write(output)
if debug:
uploadFile(fname)
else:
print(output)
@ -319,9 +332,18 @@ def etlparser(xperf_path, etl_filename, processID, approot=None,
(all_stages and x[2] != stages[0] or
not checkWhitelist(x[0], whitelist)),
files.iterkeys())
if debug:
# in debug, we want stages = [startup+normal] and all threads, not just (main)
# we will use this data to upload fileIO info to blobber only for debug mode
outputData = filter(lambda x: (all_stages or x[2] in [stages[0], stages[1]]) and
(all_stages and x[2] not in [stages[0], stages[1]] or
not checkWhitelist(x[0], whitelist)),
files.iterkeys())
else:
outputData = filekeys
# output data
for row in filekeys:
for row in outputData:
output = "%s, %s, %s, %s, %s, %s, %s\n" % (
row[0],
row[1],
@ -336,6 +358,8 @@ def etlparser(xperf_path, etl_filename, processID, approot=None,
if outputFile:
# close the file handle
outFile.close()
if debug:
uploadFile(outputFile)
# We still like to have the outputfile to record the raw data, now
# filter out acceptable files/ranges
@ -455,12 +479,8 @@ def etlparser(xperf_path, etl_filename, processID, approot=None,
with open(error_filename, 'w') as errorFile:
errorFile.write('\n'.join(errors))
# TODO: commented this out from bug 1205005, we have a memory error in blobber
# upload
# mud = os.environ.get('MOZ_UPLOAD_DIR', None)
# if mud:
# mud_filename = os.path.join(mud, etl_filename)
# os.rename(etl_filename, mud_filename)
if debug:
uploadFile(etl_filename)
def etlparser_from_config(config_file, **kwargs):

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

@ -19,21 +19,39 @@
"{firefox}\\browser\\features\\shield-recipe-client@mozilla.org.xpi": {"mincount": 0, "maxcount": 100, "minbytes": 0, "maxbytes": 10000000},
"{firefox}\\browser\\features\\activity-stream@mozilla.org.xpi": {"mincount": 0, "maxcount": 100, "minbytes": 0, "maxbytes": 10000000},
"{firefox}\\browser\\features\\screenshots@mozilla.org.xpi": {"mincount": 0, "maxcount": 100, "minbytes": 0, "maxbytes": 10000000},
"{firefox}\\browser\\features\\onboarding@mozilla.org.xpi": {"mincount": 0, "maxcount": 100, "minbytes": 0, "maxbytes": 10000000},
"{firefox}\\browser\\features\\followonsearch@mozilla.com.xpi": {"mincount": 0, "maxcount": 100, "minbytes": 0, "maxbytes": 10000000},
"{talos}\\talos\\tests\\tp5n\\tp5n.manifest": {"mincount": 0, "maxcount": 8, "minbytes": 0, "maxbytes": 32786},
"{talos}\\talos\\tests\\tp5n\\tp5n.manifest.develop": {"mincount": 0, "maxcount": 8, "minbytes": 0, "maxbytes": 32786},
"{profile}\\localstore.rdf": {"mincount": 2, "maxcount": 2, "minbytes": 8192, "maxbytes": 8192},
"{firefox}\\dependentlibs.list": {"mincount": 4, "maxcount": 4, "minbytes": 16384, "maxbytes": 16384},
"{profile}\\content-prefs.sqlite": {"mincount": 6, "maxcount": 6, "minbytes": 65768, "maxbytes": 65768},
"{profile}\\extensions.ini": {"mincount": 2, "maxcount": 2, "minbytes": 8192, "maxbytes": 8192},
"{profile}\\containers.json": {"mincount": 0, "maxcount": 4, "minbytes": 0, "maxbytes": 512},
"{profile}\\extensions.json": {"mincount": 0, "maxcount": 4, "minbytes": 0, "maxbytes": 512},
"{profile}\\times.json": {"mincount": 0, "maxcount": 4, "minbytes": 0, "maxbytes": 512},
"{profile}\\sessionstore-backups\\recovery.js": {"mincount": 0, "maxcount": 2, "minbytes": 0, "maxbytes": 5602},
"{profile}\\sessioncheckpoints.json.tmp": {"mincount": 0, "maxcount": 2, "minbytes": 0, "maxbytes": 512},
"{profile}\\sessioncheckpoints.json": {"mincount": 0, "maxcount": 2, "minbytes": 0, "maxbytes": 512},
"{profile}\\extensions\\pageloader@mozilla.org\\chrome.manifest": {"mincount": 2, "maxcount": 2, "minbytes": 600, "maxbytes": 600},
"{profile}\\extensions\\pageloader@mozilla.org\\chrome\\mozillafilelogger.js": {"mincount": 0, "maxcount": 4, "minbytes": 0, "maxbytes": 125200},
"{profile}\\extensions\\pageloader@mozilla.org\\chrome\\memory.js": {"mincount": 0, "maxcount": 4, "minbytes": 0, "maxbytes": 127000},
"{profile}\\extensions\\pageloader@mozilla.org\\chrome\\profiler.js": {"mincount": 0, "maxcount": 4, "minbytes": 0, "maxbytes": 127000},
"{profile}\\extensions\\pageloader@mozilla.org\\chrome\\pageloader.js": {"mincount": 0, "maxcount": 2, "minbytes": 0, "maxbytes": 127000},
"{profile}\\extensions\\pageloader@mozilla.org\\chrome\\pageloader.xul": {"mincount": 0, "maxcount": 4, "minbytes": 0, "maxbytes": 127000},
"{profile}\\extensions\\pageloader@mozilla.org\\chrome\\report.js": {"mincount": 0, "maxcount": 4, "minbytes": 0, "maxbytes": 127000},
"{profile}\\extensions\\pageloader@mozilla.org\\chrome\\quit.js": {"mincount": 0, "maxcount": 4, "minbytes": 0, "maxbytes": 127000},
"{profile}\\extensions\\talos-powers@mozilla.org\\chrome.manifest": {"mincount": 2, "maxcount": 2, "minbytes": 600, "maxbytes": 600},
"{profile}\\extensions\\talos-powers@mozilla.org\\chrome\\talos-powers-content.js": {"mincount": 2, "maxcount": 2, "minbytes": 2000, "maxbytes": 2000},
"{firefox}\\profiles.ini": {"mincount": 2, "maxcount": 2, "minbytes": 8192, "maxbytes": 8192},
"{firefox}\\firefox.exe": {"mincount": 2, "maxcount": 2, "minbytes": 8192, "maxbytes": 8192},
"{firefox}\\gmp-clearkey\\0.1\\manifest.json": {"mincount": 2, "maxcount": 2, "minbytes": 512, "maxbytes": 512},
"c:\\program files\\nvidia corporation\\3d vision\\nvstereoapii.dll": {"mincount": 0, "maxcount": 4, "minbytes": 2, "maxbytes": 33792},
"c:\\programdata\\nvidia corporation\\drs\\nvdrssel.bin": {"mincount": 2, "maxcount": 2, "minbytes": 2, "maxbytes": 2},
"c:\\programdata\\nvidia corporation\\drs\\nvapptimestamps": {"mincount": 22, "maxcount": 22, "minbytes": 704, "maxbytes": 704},
"{profile}\\places.sqlite": {"mincount": 8, "maxcount": 8, "minbytes": 196808, "maxbytes": 196808},
"c:\\windows\\system32\\dwrite.dll": {"mincount": 4, "maxcount": 4, "minbytes": 16384, "maxbytes": 90112},
"c:\\windows\\system32\\audioses.dll": {"mincount": 4, "maxcount": 4, "minbytes": 16384, "maxbytes": 32768},
"c:\\users\\desktop.ini": {"mincount": 2, "maxcount": 2, "minbytes": 352, "maxbytes": 352},
"{desktop}\\desktop.ini": {"mincount": 6, "maxcount": 6, "minbytes": 1692, "maxbytes": 1692},
"c:\\windows\\fonts\\staticcache.dat": {"mincount": 2, "maxcount": 2, "minbytes": 120, "maxbytes": 120},
@ -57,4 +75,9 @@
"{profile}\\favicons.sqlite": {"mincount": 8, "maxcount": 12, "minbytes": 196808, "maxbytes": 393216},
"{profile}\\favicons.sqlite-shm": {"mincount": 0, "maxcount": 4, "minbytes": 65536, "maxbytes": 131072},
"{profile}\\favicons.sqlite-wal": {"mincount": 0, "maxcount": 32, "minbytes": 0, "maxbytes": 131072},
"c:\\windows\\system32\\msctf.dll": {"mincount": 0, "maxcount": 2, "minbytes": 0, "maxbytes": 65536},
"{profile}\\handlers.json": {"mincount": 0, "maxcount": 4, "minbytes": 0, "maxbytes": 1388},
"{profile}\\startupcache": {"mincount": 0, "maxcount": 2, "minbytes": 0, "maxbytes": 8192},
"{profile}\\sessionstore.js": {"mincount": 0, "maxcount": 2, "minbytes": 0, "maxbytes": 4096},
"{profile}\\addonstartup.json.lz4": {"mincount": 0, "maxcount": 2, "minbytes": 0, "maxbytes": 8192}
}

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

@ -1,11 +0,0 @@
[navigation-redirect.https.html]
type: testharness
[SW-fallbacked redirect to same-origin same-scope.]
expected: FAIL
[SW-fallbacked redirect to same-origin other-scope.]
expected: FAIL
[SW-fallbacked redirect to other-origin in-scope.]
expected: FAIL

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

@ -904,64 +904,65 @@ nsFormFillController::OnSearchCompletion(nsIAutoCompleteResult *aResult)
NS_IMETHODIMP
nsFormFillController::HandleEvent(nsIDOMEvent* aEvent)
{
nsAutoString type;
aEvent->GetType(type);
WidgetEvent* internalEvent = aEvent->WidgetEventPtr();
NS_ENSURE_STATE(internalEvent);
if (type.EqualsLiteral("focus")) {
switch (internalEvent->mMessage) {
case eFocus:
return Focus(aEvent);
}
if (type.EqualsLiteral("mousedown")) {
case eMouseDown:
return MouseDown(aEvent);
}
if (type.EqualsLiteral("keypress")) {
case eKeyPress:
return KeyPress(aEvent);
}
if (type.EqualsLiteral("input")) {
bool unused = false;
return (!mSuppressOnInput && mController && mFocusedInput) ?
mController->HandleText(&unused) : NS_OK;
}
if (type.EqualsLiteral("blur")) {
case eEditorInput:
{
bool unused = false;
return (!mSuppressOnInput && mController && mFocusedInput) ?
mController->HandleText(&unused) : NS_OK;
}
case eBlur:
if (mFocusedInput) {
StopControllingInput();
}
return NS_OK;
}
if (type.EqualsLiteral("compositionstart")) {
case eCompositionStart:
NS_ASSERTION(mController, "should have a controller!");
if (mController && mFocusedInput) {
mController->HandleStartComposition();
}
return NS_OK;
}
if (type.EqualsLiteral("compositionend")) {
case eCompositionEnd:
NS_ASSERTION(mController, "should have a controller!");
if (mController && mFocusedInput) {
mController->HandleEndComposition();
}
return NS_OK;
}
if (type.EqualsLiteral("contextmenu")) {
case eContextMenu:
if (mFocusedPopup) {
mFocusedPopup->ClosePopup();
}
return NS_OK;
}
if (type.EqualsLiteral("pagehide")) {
nsCOMPtr<nsIDocument> doc = do_QueryInterface(
aEvent->InternalDOMEvent()->GetTarget());
if (!doc) {
return NS_OK;
}
if (mFocusedInput) {
if (doc == mFocusedInputNode->OwnerDoc()) {
StopControllingInput();
case ePageHide:
{
nsCOMPtr<nsIDocument> doc = do_QueryInterface(
aEvent->InternalDOMEvent()->GetTarget());
if (!doc) {
return NS_OK;
}
}
RemoveForDocument(doc);
if (mFocusedInput) {
if (doc == mFocusedInputNode->OwnerDoc()) {
StopControllingInput();
}
}
RemoveForDocument(doc);
}
break;
default:
// Handling the default case to shut up stupid -Wswitch warnings.
// One day compilers will be smarter...
break;
}
return NS_OK;

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

@ -1370,10 +1370,11 @@ Library.</p>
<h1 id="gpl-3.0">GNU General Public License 3.0</h1>
<p>This license does not apply to any of the code shipped with
Firefox, but may apply to Disconnect.me blocklists downloaded
after installation for use with the tracking protection feature.
Firefox and such blocklists are separate and independent works as
described in Sections 5 and 6 of this license.</p>
Firefox, but may apply to blocklists downloaded after installation
for use with the tracking protection feature. Firefox and such
blocklists are separate and independent works as described in
Sections 5 and 6 of this license. Our blocklist is based on one
originally written by Disconnect.me.</p>
<pre>Version 3, 29 June 2007

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

@ -316,6 +316,13 @@ this.AppConstants = Object.freeze({
false,
#endif
MOZ_ANDROID_MOZILLA_ONLINE:
#ifdef MOZ_ANDROID_MOZILLA_ONLINE
true,
#else
false,
#endif
DLL_PREFIX: "@DLL_PREFIX@",
DLL_SUFFIX: "@DLL_SUFFIX@",

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

@ -308,6 +308,7 @@ for var in ('ANDROID_PACKAGE_NAME',
for var in ('MOZ_TOOLKIT_SEARCH',
'MOZ_SYSTEM_NSS',
'MOZ_UPDATER',
'MOZ_ANDROID_MOZILLA_ONLINE',
'MOZ_SWITCHBOARD'):
if CONFIG[var]:
DEFINES[var] = True

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

@ -382,6 +382,7 @@ public:
}
WidgetEvent(const WidgetEvent& aOther)
: WidgetEventTime()
{
MOZ_COUNT_CTOR(WidgetEvent);
*this = aOther;