merge mozilla-inbound to mozilla-central. r=merge a=merge

MozReview-Commit-ID: 4CDH6A5NT2U
This commit is contained in:
Sebastian Hengst 2017-11-01 00:36:12 +01:00
commit 7a0f790c30
48 changed files with 436 additions and 452 deletions

View File

@ -18,6 +18,7 @@
#include "nsIWindowMediator.h"
#include "nsServiceManagerUtils.h"
#include "mozilla/Services.h"
#include "nsGlobalWindow.h"
#include "nsIStringBundle.h"
using namespace mozilla::a11y;
@ -164,28 +165,23 @@ ApplicationAccessible::Init()
// that all root accessibles are stored in application accessible children
// array.
nsCOMPtr<nsIWindowMediator> windowMediator =
do_GetService(NS_WINDOWMEDIATOR_CONTRACTID);
nsGlobalWindow::WindowByIdTable* windowsById =
nsGlobalWindow::GetWindowsTable();
nsCOMPtr<nsISimpleEnumerator> windowEnumerator;
nsresult rv = windowMediator->GetEnumerator(nullptr,
getter_AddRefs(windowEnumerator));
if (NS_FAILED(rv))
if (!windowsById) {
return;
}
for (auto iter = windowsById->Iter(); !iter.Done(); iter.Next()) {
nsGlobalWindow* window = iter.Data();
if (window->GetDocShell() && window->IsOuterWindow() &&
window->IsRootOuterWindow()) {
nsCOMPtr<nsIDocument> docNode = window->GetExtantDoc();
bool hasMore = false;
windowEnumerator->HasMoreElements(&hasMore);
while (hasMore) {
nsCOMPtr<nsISupports> window;
windowEnumerator->GetNext(getter_AddRefs(window));
nsCOMPtr<nsPIDOMWindowOuter> DOMWindow = do_QueryInterface(window);
if (DOMWindow) {
nsCOMPtr<nsIDocument> docNode = DOMWindow->GetDoc();
if (docNode) {
GetAccService()->GetDocAccessible(docNode); // ensure creation
GetAccService()->GetDocAccessible(docNode); // ensure creation
}
}
windowEnumerator->HasMoreElements(&hasMore);
}
}

View File

@ -35,6 +35,7 @@ BROWSER_CHROME_MANIFESTS += [
'tests/browser/browser.ini',
'tests/browser/e10s/browser.ini',
'tests/browser/events/browser.ini',
'tests/browser/general/browser.ini',
'tests/browser/scroll/browser.ini',
'tests/browser/states/browser.ini',
'tests/browser/tree/browser.ini'

View File

@ -0,0 +1,7 @@
[DEFAULT]
support-files =
!/accessible/tests/browser/shared-head.js
head.js
!/accessible/tests/mochitest/*.js
[browser_test_doc_creation.js]

View File

@ -0,0 +1,65 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
const nsIAccessibleRole = Ci.nsIAccessibleRole; // eslint-disable-line no-unused-vars
/* import-globals-from ../../mochitest/role.js */
loadScripts({ name: "role.js", dir: MOCHITESTS_DIR });
async function openNewTab(url) {
const forceNewProcess = true;
return BrowserTestUtils.openNewForegroundTab(
{ gBrowser, url, forceNewProcess });
}
const tab1URL = `data:text/html,
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8"/>
<title>First tab to be loaded</title>
</head>
<body>
<butotn>JUST A BUTTON</butotn>
</body>
</html>`;
const tab2URL = `data:text/html,
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8"/>
<title>Second tab to be loaded</title>
</head>
<body>
<butotn>JUST A BUTTON</butotn>
</body>
</html>`;
// Checking that, if there are open windows before accessibility was started,
// root accessibles for open windows are created so that all root accessibles
// are stored in application accessible children array.
add_task(async function testDocumentCreation() {
let tab1 = await openNewTab(tab1URL);
let tab2 = await openNewTab(tab2URL);
let accService = await initAccessibilityService(); // eslint-disable-line no-unused-vars
info("Verifying that each tab content document is in accessible cache.");
for (const browser of [...gBrowser.browsers]) {
await ContentTask.spawn(browser, null, async () => {
let accServiceContent =
Cc["@mozilla.org/accessibilityService;1"].getService(
Ci.nsIAccessibilityService);
ok(!!accServiceContent.getAccessibleFromCache(content.document),
"Document accessible is in cache.");
});
}
await BrowserTestUtils.removeTab(tab1);
await BrowserTestUtils.removeTab(tab2);
accService = null;
await shutdownAccessibilityService();
});

View File

@ -0,0 +1,55 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
/* exported initAccessibilityService, shutdownAccessibilityService */
// Load the shared-head file first.
/* import-globals-from ../shared-head.js */
Services.scriptloader.loadSubScript(
"chrome://mochitests/content/browser/accessible/tests/browser/shared-head.js",
this);
async function initAccessibilityService() {
info("Create accessibility service.");
let accService = Cc["@mozilla.org/accessibilityService;1"].getService(
Ci.nsIAccessibilityService);
await new Promise(resolve => {
if (Services.appinfo.accessibilityEnabled) {
resolve();
return;
}
let observe = (subject, topic, data) => {
if (data === "1") {
Services.obs.removeObserver(observe, "a11y-init-or-shutdown");
resolve();
}
};
Services.obs.addObserver(observe, "a11y-init-or-shutdown");
});
return accService;
}
function shutdownAccessibilityService() {
forceGC();
return new Promise(resolve => {
if (!Services.appinfo.accessibilityEnabled) {
resolve();
return;
}
let observe = (subject, topic, data) => {
if (data === "0") {
Services.obs.removeObserver(observe, "a11y-init-or-shutdown");
resolve();
}
};
Services.obs.addObserver(observe, "a11y-init-or-shutdown");
});
}

View File

@ -5,7 +5,7 @@
"use strict";
/* exported initPromise, shutdownPromise, waitForEvent, setE10sPrefs,
unsetE10sPrefs, forceGC */
unsetE10sPrefs */
/**
* Set e10s related preferences in the test environment.
@ -126,15 +126,3 @@ function waitForEvent(eventType, expectedId) {
Services.obs.addObserver(eventObserver, "accessible-event");
});
}
/**
* Force garbage collection.
*/
function forceGC() {
SpecialPowers.gc();
SpecialPowers.forceShrinkingGC();
SpecialPowers.forceCC();
SpecialPowers.gc();
SpecialPowers.forceShrinkingGC();
SpecialPowers.forceCC();
}

View File

@ -11,7 +11,7 @@
invokeSetStyle, getAccessibleDOMNodeID, getAccessibleTagName,
addAccessibleTask, findAccessibleChildByID, isDefunct,
CURRENT_CONTENT_DIR, loadScripts, loadFrameScripts, snippetToURL,
Cc, Cu, arrayFromChildren */
Cc, Cu, arrayFromChildren, forceGC */
const { interfaces: Ci, utils: Cu, classes: Cc } = Components;
@ -363,3 +363,15 @@ function arrayFromChildren(accessible) {
return Array.from({ length: accessible.childCount }, (c, i) =>
accessible.getChildAt(i));
}
/**
* Force garbage collection.
*/
function forceGC() {
SpecialPowers.gc();
SpecialPowers.forceShrinkingGC();
SpecialPowers.forceCC();
SpecialPowers.gc();
SpecialPowers.forceShrinkingGC();
SpecialPowers.forceCC();
}

View File

@ -35,6 +35,7 @@ skip-if = os == 'win' || os == 'linux'
[test_focus_name.html]
[test_focus_selects.html]
[test_focus_tabbox.xul]
skip-if = webrender
[test_focus_tree.xul]
[test_fromUserInput.html]
[test_label.xul]

View File

@ -8270,6 +8270,7 @@ const gAccessibilityServiceIndicator = {
let a11yServicesSupportURL =
Services.urlFormatter.formatURLPref("accessibility.support.url");
gBrowser.selectedTab = gBrowser.addTab(a11yServicesSupportURL);
Services.telemetry.scalarSet("a11y.indicator_acted_on", true);
}
},

View File

@ -1442,6 +1442,7 @@ var gPrivacyPane = {
let buttonIndex = confirmRestartPrompt(checked, 0, true, false);
if (buttonIndex == CONFIRM_RESTART_PROMPT_RESTART_NOW) {
Services.prefs.setIntPref("accessibility.force_disabled", checked ? 1 : 0);
Services.telemetry.scalarSet("preferences.prevent_accessibility_services", true);
Services.startup.quit(Ci.nsIAppStartup.eAttemptQuit | Ci.nsIAppStartup.eRestart);
}

View File

@ -607,7 +607,7 @@ def split_triplet(triplet, allow_unknown=False):
elif cpu.startswith('hppa') or cpu == 'parisc':
canonical_cpu = 'hppa'
endianness = 'big'
elif cpu.startswith('sparc64'):
elif cpu.startswith('sparc64') or cpu.startswith('sparcv9'):
canonical_cpu = 'sparc64'
endianness = 'big'
elif cpu.startswith('sparc') or cpu == 'sun4u':

View File

@ -19,4 +19,4 @@ load 1281695.html
load 1306476.html
load 1348381.html
load 1367930_1.html
load 1367930_2.html
skip-if(Android) load 1367930_2.html

View File

@ -59,6 +59,7 @@ skip-if = toolkit == 'android' # needs plugin support
[test_bug985859.html]
[test_bug986930.html]
[test_bug1092842.html]
skip-if = os == "win" && debug # Bug 1408490
[test_bug1165981.html]
[test_bug1245545.html]
[test_bug1307694.html]

View File

@ -8,7 +8,6 @@ TEST_DIRS += ['tests']
XPIDL_SOURCES += [
'nsITransaction.idl',
'nsITransactionList.idl',
'nsITransactionListener.idl',
'nsITransactionManager.idl',
]
@ -21,7 +20,6 @@ EXPORTS += [
UNIFIED_SOURCES += [
'nsTransactionItem.cpp',
'nsTransactionList.cpp',
'nsTransactionManager.cpp',
'nsTransactionManagerFactory.cpp',
'nsTransactionStack.cpp',

View File

@ -1,70 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "nsISupports.idl"
interface nsITransaction;
/*
* The nsITransactionList interface.
* <P>
* The implementation for this interface is provided by the Transaction Manager.
* This interface provides a mechanism for accessing the transactions on the
* Undo or Redo stacks as well as any auto-aggregated children that a
* transaction may have.
*/
[scriptable, uuid(d007ceff-c978-486a-b697-384ca01997be)]
interface nsITransactionList : nsISupports
{
/**
* The number of transactions contained in this list.
*/
readonly attribute long numItems;
/**
* itemIsBatch() returns true if the item at aIndex is a batch. Note that
* currently there is no requirement for a TransactionManager implementation
* to associate a toplevel nsITransaction with a batch so it is possible for
* itemIsBatch() to return true and getItem() to return null. However, you
* can still access the transactions contained in the batch with a call to
* getChildListForItem().
* @param aIndex The index of the item in the list.
*/
boolean itemIsBatch(in long aIndex);
/**
* getItem() returns the transaction at the given index in the list. Note that
* a null can be returned here if the item is a batch. The transaction
* returned is AddRef'd so it is up to the caller to Release the transaction
* when it is done.
* @param aIndex The index of the item in the list.
*/
nsITransaction getItem(in long aIndex);
/**
* getData() returns the data (of type nsISupports array) associated with
* the transaction list.
*/
void getData(in long aIndex, [optional] out unsigned long aLength,
[array, size_is(aLength), retval] out nsISupports aData);
/**
* getNumChildrenForItem() returns the number of child (auto-aggreated)
* transactions the item at aIndex has.
* @param aIndex The index of the item in the list.
*/
long getNumChildrenForItem(in long aIndex);
/**
* getChildListForItem() returns the list of children associated with the
* item at aIndex. Implementations may return null if there are no children,
* or an empty list. The list returned is AddRef'd so it is up to the caller
* to Release the transaction when it is done.
* @param aIndex The index of the item in the list.
*/
nsITransactionList getChildListForItem(in long aIndex);
};

View File

@ -5,7 +5,6 @@
#include "nsISupports.idl"
#include "nsITransaction.idl"
#include "nsITransactionList.idl"
#include "nsITransactionListener.idl"
%{ C++
@ -68,7 +67,7 @@ interface nsITransactionManager : nsISupports
* application to execute and group together several independent transactions
* so they can be undone with a single call to undoTransaction().
* @param aData An arbitrary nsISupports object that is associated with the
* batch. Can be retrieved from nsITransactionList.
* batch. Can be retrieved from the undo or redo stacks.
*/
void beginBatch(in nsISupports aData);
@ -134,20 +133,6 @@ interface nsITransactionManager : nsISupports
*/
nsITransaction peekRedoStack();
/**
* Returns the list of transactions on the undo stack. Note that the
* transaction at the top of the undo stack will actually be at the
* index 'n-1' in the list, where 'n' is the number of items in the list.
*/
nsITransactionList getUndoList();
/**
* Returns the list of transactions on the redo stack. Note that the
* transaction at the top of the redo stack will actually be at the
* index 'n-1' in the list, where 'n' is the number of items in the list.
*/
nsITransactionList getRedoList();
/**
* Adds a listener to the transaction manager's notification list. Listeners
* are notified whenever a transaction is done, undone, or redone.

View File

@ -1,174 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "mozilla/mozalloc.h"
#include "nsCOMPtr.h"
#include "nsDebug.h"
#include "nsError.h"
#include "nsID.h"
#include "nsISupportsUtils.h"
#include "nsITransactionManager.h"
#include "nsTransactionItem.h"
#include "nsTransactionList.h"
#include "nsTransactionStack.h"
#include "nscore.h"
NS_IMPL_ISUPPORTS(nsTransactionList, nsITransactionList)
nsTransactionList::nsTransactionList(nsITransactionManager *aTxnMgr, nsTransactionStack *aTxnStack)
: mTxnStack(aTxnStack)
, mTxnItem(nullptr)
{
if (aTxnMgr)
mTxnMgr = do_GetWeakReference(aTxnMgr);
}
nsTransactionList::nsTransactionList(nsITransactionManager *aTxnMgr, nsTransactionItem *aTxnItem)
: mTxnStack(0)
, mTxnItem(aTxnItem)
{
if (aTxnMgr)
mTxnMgr = do_GetWeakReference(aTxnMgr);
}
nsTransactionList::~nsTransactionList()
{
mTxnStack = 0;
mTxnItem = nullptr;
}
NS_IMETHODIMP nsTransactionList::GetNumItems(int32_t *aNumItems)
{
NS_ENSURE_TRUE(aNumItems, NS_ERROR_NULL_POINTER);
*aNumItems = 0;
nsCOMPtr<nsITransactionManager> txMgr = do_QueryReferent(mTxnMgr);
NS_ENSURE_TRUE(txMgr, NS_ERROR_FAILURE);
if (mTxnStack) {
*aNumItems = mTxnStack->GetSize();
} else if (mTxnItem) {
return mTxnItem->GetNumberOfChildren(aNumItems);
}
return NS_OK;
}
NS_IMETHODIMP nsTransactionList::ItemIsBatch(int32_t aIndex, bool *aIsBatch)
{
NS_ENSURE_TRUE(aIsBatch, NS_ERROR_NULL_POINTER);
*aIsBatch = false;
nsCOMPtr<nsITransactionManager> txMgr = do_QueryReferent(mTxnMgr);
NS_ENSURE_TRUE(txMgr, NS_ERROR_FAILURE);
RefPtr<nsTransactionItem> item;
if (mTxnStack) {
item = mTxnStack->GetItem(aIndex);
} else if (mTxnItem) {
nsresult rv = mTxnItem->GetChild(aIndex, getter_AddRefs(item));
NS_ENSURE_SUCCESS(rv, rv);
}
NS_ENSURE_TRUE(item, NS_ERROR_FAILURE);
return item->GetIsBatch(aIsBatch);
}
NS_IMETHODIMP nsTransactionList::GetData(int32_t aIndex,
uint32_t *aLength,
nsISupports ***aData)
{
nsCOMPtr<nsITransactionManager> txMgr = do_QueryReferent(mTxnMgr);
NS_ENSURE_TRUE(txMgr, NS_ERROR_FAILURE);
RefPtr<nsTransactionItem> item;
if (mTxnStack) {
item = mTxnStack->GetItem(aIndex);
} else if (mTxnItem) {
nsresult rv = mTxnItem->GetChild(aIndex, getter_AddRefs(item));
NS_ENSURE_SUCCESS(rv, rv);
}
nsCOMArray<nsISupports>& data = item->GetData();
nsISupports** ret = static_cast<nsISupports**>(moz_xmalloc(data.Count() *
sizeof(nsISupports*)));
for (int32_t i = 0; i < data.Count(); i++) {
NS_ADDREF(ret[i] = data[i]);
}
*aLength = data.Count();
*aData = ret;
return NS_OK;
}
NS_IMETHODIMP nsTransactionList::GetItem(int32_t aIndex, nsITransaction **aItem)
{
NS_ENSURE_TRUE(aItem, NS_ERROR_NULL_POINTER);
*aItem = 0;
nsCOMPtr<nsITransactionManager> txMgr = do_QueryReferent(mTxnMgr);
NS_ENSURE_TRUE(txMgr, NS_ERROR_FAILURE);
RefPtr<nsTransactionItem> item;
if (mTxnStack) {
item = mTxnStack->GetItem(aIndex);
} else if (mTxnItem) {
nsresult rv = mTxnItem->GetChild(aIndex, getter_AddRefs(item));
NS_ENSURE_SUCCESS(rv, rv);
}
NS_ENSURE_TRUE(item, NS_ERROR_FAILURE);
*aItem = item->GetTransaction().take();
return NS_OK;
}
NS_IMETHODIMP nsTransactionList::GetNumChildrenForItem(int32_t aIndex, int32_t *aNumChildren)
{
NS_ENSURE_TRUE(aNumChildren, NS_ERROR_NULL_POINTER);
*aNumChildren = 0;
nsCOMPtr<nsITransactionManager> txMgr = do_QueryReferent(mTxnMgr);
NS_ENSURE_TRUE(txMgr, NS_ERROR_FAILURE);
RefPtr<nsTransactionItem> item;
if (mTxnStack) {
item = mTxnStack->GetItem(aIndex);
} else if (mTxnItem) {
nsresult rv = mTxnItem->GetChild(aIndex, getter_AddRefs(item));
NS_ENSURE_SUCCESS(rv, rv);
}
NS_ENSURE_TRUE(item, NS_ERROR_FAILURE);
return item->GetNumberOfChildren(aNumChildren);
}
NS_IMETHODIMP nsTransactionList::GetChildListForItem(int32_t aIndex, nsITransactionList **aTxnList)
{
NS_ENSURE_TRUE(aTxnList, NS_ERROR_NULL_POINTER);
*aTxnList = 0;
nsCOMPtr<nsITransactionManager> txMgr = do_QueryReferent(mTxnMgr);
NS_ENSURE_TRUE(txMgr, NS_ERROR_FAILURE);
RefPtr<nsTransactionItem> item;
if (mTxnStack) {
item = mTxnStack->GetItem(aIndex);
} else if (mTxnItem) {
nsresult rv = mTxnItem->GetChild(aIndex, getter_AddRefs(item));
NS_ENSURE_SUCCESS(rv, rv);
}
NS_ENSURE_TRUE(item, NS_ERROR_FAILURE);
*aTxnList = (nsITransactionList *)new nsTransactionList(txMgr, item);
NS_ENSURE_TRUE(*aTxnList, NS_ERROR_OUT_OF_MEMORY);
NS_ADDREF(*aTxnList);
return NS_OK;
}

View File

@ -1,46 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef nsTransactionList_h__
#define nsTransactionList_h__
#include "nsISupportsImpl.h"
#include "nsITransactionList.h"
#include "nsIWeakReferenceUtils.h"
class nsITransaction;
class nsITransactionManager;
class nsTransactionItem;
class nsTransactionStack;
/** implementation of a transaction list object.
*
*/
class nsTransactionList : public nsITransactionList
{
private:
nsWeakPtr mTxnMgr;
nsTransactionStack *mTxnStack;
RefPtr<nsTransactionItem> mTxnItem;
protected:
virtual ~nsTransactionList();
public:
nsTransactionList(nsITransactionManager *aTxnMgr, nsTransactionStack *aTxnStack);
nsTransactionList(nsITransactionManager *aTxnMgr, nsTransactionItem *aTxnItem);
/* Macro for AddRef(), Release(), and QueryInterface() */
NS_DECL_ISUPPORTS
/* nsITransactionManager method implementations. */
NS_DECL_NSITRANSACTIONLIST
/* nsTransactionList specific methods. */
};
#endif // nsTransactionList_h__

View File

@ -11,11 +11,9 @@
#include "nsISupportsBase.h"
#include "nsISupportsUtils.h"
#include "nsITransaction.h"
#include "nsITransactionList.h"
#include "nsITransactionListener.h"
#include "nsIWeakReference.h"
#include "nsTransactionItem.h"
#include "nsTransactionList.h"
#include "nsTransactionManager.h"
#include "nsTransactionStack.h"
@ -369,26 +367,6 @@ nsTransactionManager::PeekRedoStack()
return tx->GetTransaction();
}
NS_IMETHODIMP
nsTransactionManager::GetUndoList(nsITransactionList **aTransactionList)
{
NS_ENSURE_TRUE(aTransactionList, NS_ERROR_NULL_POINTER);
*aTransactionList = (nsITransactionList *)new nsTransactionList(this, &mUndoStack);
NS_IF_ADDREF(*aTransactionList);
return (! *aTransactionList) ? NS_ERROR_OUT_OF_MEMORY : NS_OK;
}
NS_IMETHODIMP
nsTransactionManager::GetRedoList(nsITransactionList **aTransactionList)
{
NS_ENSURE_TRUE(aTransactionList, NS_ERROR_NULL_POINTER);
*aTransactionList = (nsITransactionList *)new nsTransactionList(this, &mRedoStack);
NS_IF_ADDREF(*aTransactionList);
return (! *aTransactionList) ? NS_ERROR_OUT_OF_MEMORY : NS_OK;
}
nsresult
nsTransactionManager::BatchTopUndo()
{

View File

@ -8,6 +8,7 @@
#include "base/task.h"
#include "gfxPrefs.h"
#include "GeckoProfiler.h"
#include "mozilla/layers/CompositorBridgeChild.h"
#include "mozilla/layers/ShadowLayers.h"
#include "mozilla/layers/SyncObject.h"
@ -56,6 +57,11 @@ struct MOZ_STACK_CLASS AutoCapturedPaintSetup
RefPtr<CompositorBridgeChild> mBridge;
};
PaintThread::PaintThread()
: mInAsyncPaintGroup(false)
{
}
void
PaintThread::Release()
{
@ -144,6 +150,14 @@ PaintThread::IsOnPaintThread()
return sThreadId == PlatformThread::CurrentId();
}
void
PaintThread::BeginLayerTransaction()
{
MOZ_ASSERT(NS_IsMainThread());
MOZ_ASSERT(!mInAsyncPaintGroup);
}
void
PaintThread::PaintContents(CapturedPaintState* aState,
PrepDrawTargetForPaintingCallback aCallback)
@ -186,6 +200,11 @@ PaintThread::AsyncPaintContents(CompositorBridgeChild* aBridge,
MOZ_ASSERT(IsOnPaintThread());
MOZ_ASSERT(aState);
if (!mInAsyncPaintGroup) {
mInAsyncPaintGroup = true;
PROFILER_TRACING("Paint", "Rasterize", TRACING_INTERVAL_START);
}
DrawTarget* target = aState->mTargetDual;
DrawTargetCapture* capture = aState->mCapture;
@ -273,11 +292,15 @@ PaintThread::AsyncEndLayerTransaction(CompositorBridgeChild* aBridge,
SyncObjectClient* aSyncObject)
{
MOZ_ASSERT(IsOnPaintThread());
MOZ_ASSERT(mInAsyncPaintGroup);
if (aSyncObject) {
aSyncObject->Synchronize();
}
mInAsyncPaintGroup = false;
PROFILER_TRACING("Paint", "Rasterize", TRACING_INTERVAL_END);
if (aBridge) {
aBridge->NotifyFinishedAsyncEndLayerTransaction();
}

View File

@ -74,6 +74,12 @@ public:
// Helper for asserts.
static bool IsOnPaintThread();
// Must be called on the main thread. Signifies that a new layer transaction
// is beginning. This must be called immediately after FlushAsyncPaints, and
// before any new painting occurs, as there can't be any async paints queued
// or running while this is executing.
void BeginLayerTransaction();
void PaintContents(CapturedPaintState* aState,
PrepDrawTargetForPaintingCallback aCallback);
@ -98,6 +104,8 @@ public:
void AddRef();
private:
PaintThread();
bool Init();
void ShutdownOnPaintThread();
void InitOnPaintThread();
@ -113,6 +121,8 @@ private:
static StaticRefPtr<nsIThread> sThread;
static PlatformThreadId sThreadId;
bool mInAsyncPaintGroup;
// This shouldn't be very many elements, so a list should be fine.
// Should only be accessed on the paint thread.
nsTArray<RefPtr<gfx::DrawTarget>> mDrawTargetsToFlush;

View File

@ -101,7 +101,7 @@ ClientLayerManager::ClientLayerManager(nsIWidget* aWidget)
, mTransactionIncomplete(false)
, mCompositorMightResample(false)
, mNeedsComposite(false)
, mTextureSyncOnPaintThread(false)
, mQueuedAsyncPaints(false)
, mPaintSequenceNumber(0)
, mDeviceResetSequenceNumber(0)
, mForwarder(new ShadowLayerForwarder(this))
@ -231,6 +231,9 @@ ClientLayerManager::BeginTransactionWithTarget(gfxContext* aTarget)
{
// Wait for any previous async paints to complete before starting to paint again.
GetCompositorBridgeChild()->FlushAsyncPaints();
if (PaintThread::Get()) {
PaintThread::Get()->BeginLayerTransaction();
}
MOZ_ASSERT(mForwarder, "ClientLayerManager::BeginTransaction without forwarder");
if (!mForwarder->IPCOpen()) {
@ -360,7 +363,7 @@ ClientLayerManager::EndTransactionInternal(DrawPaintedLayerCallback aCallback,
ClientLayer* root = ClientLayer::ToClientLayer(GetRoot());
mTransactionIncomplete = false;
mTextureSyncOnPaintThread = false;
mQueuedAsyncPaints = false;
// Apply pending tree updates before recomputing effective
// properties.
@ -467,6 +470,9 @@ ClientLayerManager::EndEmptyTransaction(EndTransactionFlags aFlags)
// Return without calling ForwardTransaction. This leaves the
// ShadowLayerForwarder transaction open; the following
// EndTransaction will complete it.
if (PaintThread::Get() && mQueuedAsyncPaints) {
PaintThread::Get()->EndLayerTransaction(nullptr);
}
return false;
}
if (mWidget) {
@ -742,7 +748,7 @@ ClientLayerManager::ForwardTransaction(bool aScheduleComposite)
// that we finished queuing async paints so it can schedule a runnable after
// all async painting is finished to do a texture sync and unblock the main
// thread if it is waiting before doing a new layer transaction.
if (mTextureSyncOnPaintThread) {
if (mQueuedAsyncPaints) {
MOZ_ASSERT(PaintThread::Get());
PaintThread::Get()->EndLayerTransaction(syncObject);
} else if (syncObject) {

View File

@ -160,7 +160,7 @@ public:
bool IsRepeatTransaction() { return mIsRepeatTransaction; }
void SetTransactionIncomplete() { mTransactionIncomplete = true; }
void SetNeedTextureSyncOnPaintThread() { mTextureSyncOnPaintThread = true; }
void SetQueuedAsyncPaints() { mQueuedAsyncPaints = true; }
bool HasShadowTarget() { return !!mShadowTarget; }
@ -351,7 +351,7 @@ private:
bool mTransactionIncomplete;
bool mCompositorMightResample;
bool mNeedsComposite;
bool mTextureSyncOnPaintThread;
bool mQueuedAsyncPaints;
// An incrementing sequence number for paints.
// Incremented in BeginTransaction(), but not for repeat transactions.

View File

@ -264,7 +264,7 @@ ClientPaintedLayer::PaintOffMainThread()
if (didUpdate) {
UpdateContentClient(state);
ClientManager()->SetNeedTextureSyncOnPaintThread();
ClientManager()->SetQueuedAsyncPaints();
}
return true;
}

View File

@ -0,0 +1,17 @@
class C {};
C.prototype.a = "a";
C.prototype.q = "q";
C.prototype.NaN = NaN;
class D extends C {
foo(p) {
return super[p];
}
}
function f() {
var d = new D();
for (let p in C.prototype) {
assertEq(p, String(d.foo(p)));
}
}
f();
f();

View File

@ -1113,19 +1113,18 @@ InitFromBailout(JSContext* cx, HandleScript caller, jsbytecode* callerPC,
// To enter a monitoring chain, we load the top stack value into R0
JitSpew(JitSpew_BaselineBailouts, " Popping top stack value into R0.");
builder.popValueInto(PCMappingSlotInfo::SlotInR0);
frameSize -= sizeof(Value);
if (JSOp(*pc) == JSOP_GETELEM_SUPER) {
// Push a fake value so that the stack stays balanced.
if (!builder.writeValue(UndefinedValue(), "GETELEM_SUPER stack blance"))
if (!builder.writeValue(UndefinedValue(), "GETELEM_SUPER stack balance"))
return false;
frameSize += sizeof(Value);
}
// Need to adjust the frameSize for the frame to match the values popped
// into registers.
frameSize -= sizeof(Value);
// Update the frame's frame size.
blFrame->setFrameSize(frameSize);
JitSpew(JitSpew_BaselineBailouts, " Adjusted framesize -= %d: %d",
(int) sizeof(Value), (int) frameSize);
JitSpew(JitSpew_BaselineBailouts, " Adjusted framesize: %u", unsigned(frameSize));
// If resuming into a JSOP_CALL, baseline keeps the arguments on the
// stack and pops them only after returning from the call IC.

View File

@ -1710,10 +1710,13 @@ MacroAssemblerMIPSCompat::pushValue(const Address& addr)
{
// Allocate stack slots for type and payload. One for each.
ma_subu(StackPointer, StackPointer, Imm32(sizeof(Value)));
// If address is based on StackPointer its offset needs to be adjusted
// to accommodate for previous stack allocation.
int32_t offset = addr.base != StackPointer ? addr.offset : addr.offset + sizeof(Value);
// Store type and payload.
ma_lw(ScratchRegister, Address(addr.base, addr.offset + TAG_OFFSET));
ma_lw(ScratchRegister, Address(addr.base, offset + TAG_OFFSET));
ma_sw(ScratchRegister, Address(StackPointer, TAG_OFFSET));
ma_lw(ScratchRegister, Address(addr.base, addr.offset + PAYLOAD_OFFSET));
ma_lw(ScratchRegister, Address(addr.base, offset + PAYLOAD_OFFSET));
ma_sw(ScratchRegister, Address(StackPointer, PAYLOAD_OFFSET));
}

View File

@ -50,6 +50,7 @@
#include "vm/StringBuffer.h"
#include "vm/WrapperObject.h"
#include "vm/Xdr.h"
#include "wasm/AsmJS.h"
#include "jsscriptinlines.h"
@ -2113,6 +2114,8 @@ bool
js::CanReuseScriptForClone(JSCompartment* compartment, HandleFunction fun,
HandleObject newParent)
{
MOZ_ASSERT(fun->isInterpreted());
if (compartment != fun->compartment() ||
fun->isSingleton() ||
ObjectGroup::useSingletonForClone(fun))
@ -2131,12 +2134,11 @@ js::CanReuseScriptForClone(JSCompartment* compartment, HandleFunction fun,
if (IsSyntacticEnvironment(newParent))
return true;
// We need to clone the script if we're interpreted and not already marked
// as having a non-syntactic scope. If we're lazy, go ahead and clone the
// script; see the big comment at the end of CopyScriptInternal for the
// explanation of what's going on there.
return !fun->isInterpreted() ||
(fun->hasScript() && fun->nonLazyScript()->hasNonSyntacticScope());
// We need to clone the script if we're not already marked as having a
// non-syntactic scope. If we're lazy, go ahead and clone the script; see
// the big comment at the end of CopyScriptInternal for the explanation of
// what's going on there.
return fun->hasScript() && fun->nonLazyScript()->hasNonSyntacticScope();
}
static inline JSFunction*
@ -2187,6 +2189,7 @@ js::CloneFunctionReuseScript(JSContext* cx, HandleFunction fun, HandleObject enc
HandleObject proto /* = nullptr */)
{
MOZ_ASSERT(NewFunctionEnvironmentIsWellFormed(cx, enclosingEnv));
MOZ_ASSERT(fun->isInterpreted());
MOZ_ASSERT(!fun->isBoundFunction());
MOZ_ASSERT(CanReuseScriptForClone(cx->compartment(), fun, enclosingEnv));
@ -2197,13 +2200,12 @@ js::CloneFunctionReuseScript(JSContext* cx, HandleFunction fun, HandleObject enc
if (fun->hasScript()) {
clone->initScript(fun->nonLazyScript());
clone->initEnvironment(enclosingEnv);
} else if (fun->isInterpretedLazy()) {
} else {
MOZ_ASSERT(fun->isInterpretedLazy());
MOZ_ASSERT(fun->compartment() == clone->compartment());
LazyScript* lazy = fun->lazyScriptOrNull();
clone->initLazyScript(lazy);
clone->initEnvironment(enclosingEnv);
} else {
clone->initNative(fun->native(), fun->jitInfo());
}
/*
@ -2221,25 +2223,19 @@ js::CloneFunctionAndScript(JSContext* cx, HandleFunction fun, HandleObject enclo
HandleObject proto /* = nullptr */)
{
MOZ_ASSERT(NewFunctionEnvironmentIsWellFormed(cx, enclosingEnv));
MOZ_ASSERT(fun->isInterpreted());
MOZ_ASSERT(!fun->isBoundFunction());
JSScript::AutoDelazify funScript(cx);
if (fun->isInterpreted()) {
funScript = fun;
if (!funScript)
return nullptr;
}
JSScript::AutoDelazify funScript(cx, fun);
if (!funScript)
return nullptr;
RootedFunction clone(cx, NewFunctionClone(cx, fun, SingletonObject, allocKind, proto));
if (!clone)
return nullptr;
if (fun->hasScript()) {
clone->initScript(nullptr);
clone->initEnvironment(enclosingEnv);
} else {
clone->initNative(fun->native(), fun->jitInfo());
}
clone->initScript(nullptr);
clone->initEnvironment(enclosingEnv);
/*
* Across compartments or if we have to introduce a non-syntactic scope we
@ -2256,21 +2252,57 @@ js::CloneFunctionAndScript(JSContext* cx, HandleFunction fun, HandleObject enclo
newScope->hasOnChain(ScopeKind::NonSyntactic));
#endif
if (clone->isInterpreted()) {
RootedScript script(cx, fun->nonLazyScript());
MOZ_ASSERT(script->compartment() == fun->compartment());
MOZ_ASSERT(cx->compartment() == clone->compartment(),
"Otherwise we could relazify clone below!");
RootedScript script(cx, fun->nonLazyScript());
MOZ_ASSERT(script->compartment() == fun->compartment());
MOZ_ASSERT(cx->compartment() == clone->compartment(),
"Otherwise we could relazify clone below!");
RootedScript clonedScript(cx, CloneScriptIntoFunction(cx, newScope, clone, script));
if (!clonedScript)
return nullptr;
Debugger::onNewScript(cx, clonedScript);
}
RootedScript clonedScript(cx, CloneScriptIntoFunction(cx, newScope, clone, script));
if (!clonedScript)
return nullptr;
Debugger::onNewScript(cx, clonedScript);
return clone;
}
JSFunction*
js::CloneAsmJSModuleFunction(JSContext* cx, HandleFunction fun)
{
MOZ_ASSERT(fun->isNative());
MOZ_ASSERT(IsAsmJSModule(fun));
MOZ_ASSERT(fun->isExtended());
MOZ_ASSERT(cx->compartment() == fun->compartment());
JSFunction* clone = NewFunctionClone(cx, fun, GenericObject, AllocKind::FUNCTION_EXTENDED,
/* proto = */ nullptr);
if (!clone)
return nullptr;
MOZ_ASSERT(fun->native() == InstantiateAsmJS);
MOZ_ASSERT(!fun->jitInfo());
clone->initNative(InstantiateAsmJS, nullptr);
clone->setGroup(fun->group());
return clone;
}
JSFunction*
js::CloneSelfHostingIntrinsic(JSContext* cx, HandleFunction fun)
{
MOZ_ASSERT(fun->isNative());
MOZ_ASSERT(fun->compartment()->isSelfHosting);
MOZ_ASSERT(!fun->isExtended());
MOZ_ASSERT(cx->compartment() != fun->compartment());
JSFunction* clone = NewFunctionClone(cx, fun, SingletonObject, AllocKind::FUNCTION,
/* proto = */ nullptr);
if (!clone)
return nullptr;
clone->initNative(fun->native(), fun->jitInfo());
return clone;
}
/*
* Return an atom for use as the name of a builtin method with the given
* property id.

View File

@ -827,6 +827,12 @@ CloneFunctionAndScript(JSContext* cx, HandleFunction fun, HandleObject parent,
gc::AllocKind kind = gc::AllocKind::FUNCTION,
HandleObject proto = nullptr);
extern JSFunction*
CloneAsmJSModuleFunction(JSContext* cx, HandleFunction fun);
extern JSFunction*
CloneSelfHostingIntrinsic(JSContext* cx, HandleFunction fun);
} // namespace js
inline js::FunctionExtended*

View File

@ -4397,7 +4397,13 @@ js::Lambda(JSContext* cx, HandleFunction fun, HandleObject parent)
{
MOZ_ASSERT(!fun->isArrow());
JSFunction* clone = CloneFunctionObjectIfNotSingleton(cx, fun, parent);
JSFunction* clone;
if (fun->isNative()) {
MOZ_ASSERT(IsAsmJSModule(fun));
clone = CloneAsmJSModuleFunction(cx, fun);
} else {
clone = CloneFunctionObjectIfNotSingleton(cx, fun, parent);
}
if (!clone)
return nullptr;

View File

@ -3067,23 +3067,29 @@ CloneObject(JSContext* cx, HandleNativeObject selfHostedObject)
RootedObject clone(cx);
if (selfHostedObject->is<JSFunction>()) {
RootedFunction selfHostedFunction(cx, &selfHostedObject->as<JSFunction>());
bool hasName = selfHostedFunction->explicitName() != nullptr;
if (selfHostedFunction->isInterpreted()) {
bool hasName = selfHostedFunction->explicitName() != nullptr;
// Arrow functions use the first extended slot for their lexical |this| value.
MOZ_ASSERT(!selfHostedFunction->isArrow());
js::gc::AllocKind kind = hasName
? gc::AllocKind::FUNCTION_EXTENDED
: selfHostedFunction->getAllocKind();
MOZ_ASSERT(!CanReuseScriptForClone(cx->compartment(), selfHostedFunction, cx->global()));
Rooted<LexicalEnvironmentObject*> globalLexical(cx, &cx->global()->lexicalEnvironment());
RootedScope emptyGlobalScope(cx, &cx->global()->emptyGlobalScope());
clone = CloneFunctionAndScript(cx, selfHostedFunction, globalLexical, emptyGlobalScope,
kind);
// To be able to re-lazify the cloned function, its name in the
// self-hosting compartment has to be stored on the clone.
if (clone && hasName) {
clone->as<JSFunction>().setExtendedSlot(LAZY_FUNCTION_NAME_SLOT,
StringValue(selfHostedFunction->explicitName()));
// Arrow functions use the first extended slot for their lexical |this| value.
MOZ_ASSERT(!selfHostedFunction->isArrow());
js::gc::AllocKind kind = hasName
? gc::AllocKind::FUNCTION_EXTENDED
: selfHostedFunction->getAllocKind();
Handle<GlobalObject*> global = cx->global();
Rooted<LexicalEnvironmentObject*> globalLexical(cx, &global->lexicalEnvironment());
RootedScope emptyGlobalScope(cx, &global->emptyGlobalScope());
MOZ_ASSERT(!CanReuseScriptForClone(cx->compartment(), selfHostedFunction, global));
clone = CloneFunctionAndScript(cx, selfHostedFunction, globalLexical, emptyGlobalScope,
kind);
// To be able to re-lazify the cloned function, its name in the
// self-hosting compartment has to be stored on the clone.
if (clone && hasName) {
Value nameVal = StringValue(selfHostedFunction->explicitName());
clone->as<JSFunction>().setExtendedSlot(LAZY_FUNCTION_NAME_SLOT, nameVal);
}
} else {
clone = CloneSelfHostingIntrinsic(cx, selfHostedFunction);
}
} else if (selfHostedObject->is<RegExpObject>()) {
RegExpObject& reobj = selfHostedObject->as<RegExpObject>();

View File

@ -8189,8 +8189,8 @@ AsmJSModuleFunctionToModule(JSFunction* fun)
}
// Implements the semantics of an asm.js module function that has been successfully validated.
static bool
InstantiateAsmJS(JSContext* cx, unsigned argc, JS::Value* vp)
bool
js::InstantiateAsmJS(JSContext* cx, unsigned argc, JS::Value* vp)
{
CallArgs args = CallArgsFromVp(argc, vp);

View File

@ -60,6 +60,9 @@ IsAsmJSFunction(JSFunction* fun);
extern bool
IsAsmJSStrictModeModuleOrFunction(JSFunction* fun);
extern bool
InstantiateAsmJS(JSContext* cx, unsigned argc, JS::Value* vp);
// asm.js testing natives:
extern bool

View File

@ -299,32 +299,39 @@ public class WebAppActivity extends AppCompatActivity
@Override
public boolean onLoadUri(final GeckoView view, final String urlStr,
final TargetWindow where) {
final Uri url = Uri.parse(urlStr);
if (url == null) {
final Uri uri = Uri.parse(urlStr);
if (uri == null) {
// We can't really handle this, so deny it?
Log.w(LOGTAG, "Failed to parse URL for navigation: " + urlStr);
return true;
}
if (mManifest.isInScope(url) && where != TargetWindow.NEW) {
if (mManifest.isInScope(uri) && where != TargetWindow.NEW) {
// This is in scope and wants to load in the same frame, so
// let Gecko handle it.
return false;
}
final CustomTabsIntent.Builder builder = new CustomTabsIntent.Builder()
.addDefaultShareMenuItem()
.setStartAnimations(this, R.anim.slide_in_right, R.anim.slide_out_left)
.setExitAnimations(this, R.anim.slide_in_left, R.anim.slide_out_right);
if ("http".equals(uri.getScheme()) || "https".equals(uri.getScheme())) {
final CustomTabsIntent.Builder builder = new CustomTabsIntent.Builder()
.addDefaultShareMenuItem()
.setStartAnimations(this, R.anim.slide_in_right, R.anim.slide_out_left)
.setExitAnimations(this, R.anim.slide_in_left, R.anim.slide_out_right);
final Integer themeColor = mManifest.getThemeColor();
if (themeColor != null) {
builder.setToolbarColor(themeColor);
final Integer themeColor = mManifest.getThemeColor();
if (themeColor != null) {
builder.setToolbarColor(themeColor);
}
final CustomTabsIntent tab = builder.build();
tab.intent.setClass(this, CustomTabsActivity.class);
tab.launchUrl(this, uri);
} else {
final Intent intent = new Intent();
intent.setAction(Intent.ACTION_VIEW);
intent.setData(uri);
startActivity(intent);
}
final CustomTabsIntent tab = builder.build();
tab.intent.setClass(this, CustomTabsActivity.class);
tab.launchUrl(this, url);
return true;
}

View File

@ -4,7 +4,7 @@
== bug569229-1.xml bug569229-1-ref.xml
== bug577418-1.html bug577418-1-ref.html
== bug582788-1.html bug582788-1-ref.html
fuzzy-if(skiaContent,2,5) == bug582940-1.html bug582940-1-ref.html
skip-if(OSX&&!isDebugBuild) fuzzy-if(skiaContent,2,5) == bug582940-1.html bug582940-1-ref.html
== bug592656-1.html bug592656-1-ref.html
fuzzy-if(skiaContent,1,5) == bug599320-1.html bug599320-1-ref.html
fuzzy-if(skiaContent,2,5) == bug608373-1.html bug608373-1-ref.html

View File

@ -0,0 +1,4 @@
[key.py]
type: wdspec
disabled:
if (os == "linux"): https://bugzilla.mozilla.org/show_bug.cgi?id=1407383

View File

@ -3,6 +3,7 @@ skip-if = os == "android" || (os == "win" && debug)
[test_ext_i18n_css.js]
[test_ext_contentscript.js]
[test_ext_contentscript_scriptCreated.js]
skip-if = debug # Bug 1407501
[test_ext_contentscript_triggeringPrincipal.js]
skip-if = os == "android" && debug
[test_ext_contentscript_xrays.js]

View File

@ -19,6 +19,20 @@ a11y:
keyed: false
cpp_guard: 'ACCESSIBILITY'
indicator_acted_on:
bug_numbers:
- 1412358
description: >
Recorded on click or SPACE/ENTER keypress event. Boolean stating if the
accessibility indicactor button was acted on.
expires: "62"
kind: boolean
notification_emails:
- yzenevich@mozilla.com
release_channel_collection: opt-out
record_in_processes:
- 'main'
# The following section contains the aushelper system add-on scalars.
aushelper:
websense_reg_version:
@ -619,6 +633,20 @@ preferences:
release_channel_collection: opt-out
record_in_processes:
- main
prevent_accessibility_services:
bug_numbers:
- 1412358
description: >
Recorded on command event. Boolean stating if the preference checkbox for
preventing accessibility from accessing the browser (Privacy & Security)
was checked.
expires: "62"
kind: boolean
notification_emails:
- yzenevich@mozilla.com
release_channel_collection: opt-out
record_in_processes:
- 'main'
# The following section contains WebRTC nICEr scalars
# For more info on ICE, see https://tools.ietf.org/html/rfc5245

View File

@ -25,7 +25,7 @@ class ChunkedJSONWriteFunc : public mozilla::JSONWriteFunc
public:
friend class SpliceableJSONWriter;
ChunkedJSONWriteFunc() {
ChunkedJSONWriteFunc() : mChunkPtr{nullptr}, mChunkEnd{nullptr} {
AllocChunk(kChunkSize);
}

View File

@ -27,8 +27,10 @@ public:
double aTime = 0)
: mMarkerName(strdup(aMarkerName))
, mPayload(Move(aPayload))
, mNext{nullptr}
, mTime(aTime)
{}
, mGenID{0}
{}
void SetGeneration(uint32_t aGenID) { mGenID = aGenID; }

View File

@ -31,6 +31,7 @@ ThreadInfo::ThreadInfo(const char* aName,
, mPlatformData(AllocPlatformData(aThreadId))
, mStackTop(aStackTop)
, mIsBeingProfiled(false)
, mFirstSavedStreamedSampleTime{0.0}
, mContext(nullptr)
, mJSSampling(INACTIVE)
, mLastSample()

View File

@ -694,7 +694,7 @@ static const char* const kMainThreadName = "GeckoMain";
class Registers
{
public:
Registers() {}
Registers() : mPC{nullptr}, mSP{nullptr}, mFP{nullptr}, mLR{nullptr} {}
#if defined(HAVE_NATIVE_UNWIND)
// Fills in mPC, mSP, mFP, mLR, and mContext for a synchronous sample.
@ -731,7 +731,7 @@ struct NativeStack
size_t mCount; // Number of entries filled.
NativeStack()
: mCount(0)
: mPCs(), mSPs(), mCount(0)
{}
};
@ -2499,6 +2499,10 @@ profiler_get_start_params(int* aEntries, double* aInterval, uint32_t* aFeatures,
AutoSetProfilerEnvVarsForChildProcess::AutoSetProfilerEnvVarsForChildProcess(
MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM_IN_IMPL)
: mSetEntries()
, mSetInterval()
, mSetFeaturesBitfield()
, mSetFilters()
{
MOZ_GUARD_OBJECT_NOTIFIER_INIT;

View File

@ -109,7 +109,7 @@ public:
const std::string &GetArch() const { return mArch; }
private:
SharedLibrary() {}
SharedLibrary() : mStart{0}, mEnd{0}, mOffset{0} {}
uintptr_t mStart;
uintptr_t mEnd;

View File

@ -31,7 +31,7 @@ using namespace mozilla::widget;
NS_IMPL_ISUPPORTS_INHERITED(GfxInfo, GfxInfoBase, nsIGfxInfoDebug)
#endif
GfxInfo::GfxInfo()
GfxInfo::GfxInfo() : mOSXVersion{0}
{
}

View File

@ -64,24 +64,44 @@ public:
static void Shutdown();
TISInputSourceWrapper()
: mInputSource{nullptr}
, mKeyboardLayout{nullptr}
, mUCKeyboardLayout{nullptr}
, mIsRTL{0}
, mOverrideKeyboard{false}
{
mInputSourceList = nullptr;
Clear();
}
explicit TISInputSourceWrapper(const char* aID)
: mInputSource{nullptr}
, mKeyboardLayout{nullptr}
, mUCKeyboardLayout{nullptr}
, mIsRTL{0}
, mOverrideKeyboard{false}
{
mInputSourceList = nullptr;
InitByInputSourceID(aID);
}
explicit TISInputSourceWrapper(SInt32 aLayoutID)
: mInputSource{nullptr}
, mKeyboardLayout{nullptr}
, mUCKeyboardLayout{nullptr}
, mIsRTL{0}
, mOverrideKeyboard{false}
{
mInputSourceList = nullptr;
InitByLayoutID(aLayoutID);
}
explicit TISInputSourceWrapper(TISInputSourceRef aInputSource)
: mInputSource{nullptr}
, mKeyboardLayout{nullptr}
, mUCKeyboardLayout{nullptr}
, mIsRTL{0}
, mOverrideKeyboard{false}
{
mInputSourceList = nullptr;
InitByTISInputSourceRef(aInputSource);

View File

@ -360,6 +360,7 @@ nsChildView::nsChildView() : nsBaseWidget()
, mEffectsLock("WidgetEffects")
, mShowsResizeIndicator(false)
, mHasRoundedBottomCorners(false)
, mDevPixelCornerRadius{0}
, mIsCoveringTitlebar(false)
, mIsFullscreen(false)
, mIsOpaque(false)
@ -368,6 +369,8 @@ nsChildView::nsChildView() : nsBaseWidget()
, mVisible(false)
, mDrawing(false)
, mIsDispatchPaint(false)
, mPluginFocused{false}
, mCurrentPanGestureBelongsToSwipe{false}
{
EnsureLogInitialized();
}
@ -3120,6 +3123,7 @@ nsChildView::GetDocumentAccessible()
GLPresenter::GLPresenter(GLContext* aContext)
: mGLContext(aContext)
, mQuadVBO{0}
{
mGLContext->MakeCurrent();
ShaderConfigOGL config;

View File

@ -21,6 +21,8 @@ using namespace mozilla;
NS_IMPL_ISUPPORTS_INHERITED(nsPrintSettingsX, nsPrintSettings, nsPrintSettingsX)
nsPrintSettingsX::nsPrintSettingsX()
: mAdjustedPaperWidth{0.0}
, mAdjustedPaperHeight{0.0}
{
NS_OBJC_BEGIN_TRY_ABORT_BLOCK;
@ -52,7 +54,7 @@ nsPrintSettingsX& nsPrintSettingsX::operator=(const nsPrintSettingsX& rhs)
if (this == &rhs) {
return *this;
}
nsPrintSettings::operator=(rhs);
[mPrintInfo release];
@ -92,7 +94,7 @@ NS_IMETHODIMP nsPrintSettingsX::InitUnwriteableMargin()
return NS_OK;
NS_OBJC_END_TRY_ABORT_BLOCK_NSRESULT;
NS_OBJC_END_TRY_ABORT_BLOCK_NSRESULT;
}
NS_IMETHODIMP nsPrintSettingsX::InitAdjustedPaperSize()
@ -177,7 +179,7 @@ nsresult nsPrintSettingsX::_Clone(nsIPrintSettings **_retval)
{
NS_ENSURE_ARG_POINTER(_retval);
*_retval = nullptr;
nsPrintSettingsX *newSettings = new nsPrintSettingsX(*this);
if (!newSettings)
return NS_ERROR_FAILURE;

View File

@ -45,6 +45,7 @@ nsToolkit* nsToolkit::gToolkit = nullptr;
nsToolkit::nsToolkit()
: mSleepWakeNotificationRLS(nullptr)
, mPowerNotifier{0}
, mEventTapPort(nullptr)
, mEventTapRLS(nullptr)
{
@ -79,7 +80,7 @@ static void ToolkitSleepWakeCallback(void *refCon, io_service_t service, natural
nsToolkit::PostSleepWakeNotification(NS_WIDGET_SLEEP_OBSERVER_TOPIC);
::IOAllowPowerChange(gRootPort, (long)messageArgument);
break;
case kIOMessageCanSystemSleep:
// In this case, the computer has been idle for several minutes
// and will sleep soon so you must either allow or cancel
@ -88,7 +89,7 @@ static void ToolkitSleepWakeCallback(void *refCon, io_service_t service, natural
// In Mozilla's case, we always allow sleep.
::IOAllowPowerChange(gRootPort,(long)messageArgument);
break;
case kIOMessageSystemHasPoweredOn:
// Handle wakeup.
nsToolkit::PostSleepWakeNotification(NS_WIDGET_WAKE_OBSERVER_TOPIC);