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

This commit is contained in:
Sebastian Hengst 2017-11-01 00:38:25 +01:00
Родитель 7d2beacd9e 7a0f790c30
Коммит 2470a9a87b
58 изменённых файлов: 657 добавлений и 611 удалений

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

@ -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);
}
}

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

@ -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'

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

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

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

@ -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();
});

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

@ -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");
});
}

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

@ -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();
}

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

@ -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();
}

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

@ -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]

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

@ -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);
}
},

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

@ -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);
}

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

@ -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':

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

@ -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

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

@ -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]

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

@ -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',

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

@ -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);
};

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

@ -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.

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

@ -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;
}

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

@ -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__

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

@ -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()
{

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

@ -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();
}

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

@ -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;

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

@ -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) {

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

@ -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.

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

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

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

@ -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();

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

@ -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.

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

@ -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));
}

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

@ -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.

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

@ -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*

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

@ -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;

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

@ -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>();

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

@ -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);

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

@ -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

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

@ -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;
}

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

@ -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

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

@ -1158,4 +1158,4 @@ static const TransportSecurityPreload kPublicKeyPinningPreloadList[] = {
static const int32_t kUnknownId = -1;
static const PRTime kPreloadPKPinsExpirationTime = INT64_C(1517856182967000);
static const PRTime kPreloadPKPinsExpirationTime = INT64_C(1517944169982000);

Разница между файлами не показана из-за своего большого размера Загрузить разницу

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

@ -8,8 +8,9 @@
/*****************************************************************************/
#include <stdint.h>
const PRTime gPreloadListExpirationTime = INT64_C(1520275370003000);
const PRTime gPreloadListExpirationTime = INT64_C(1520363354924000);
%%
0-1.party, 1
0.me.uk, 1
00001.am, 1
00002.am, 1
@ -266,6 +267,7 @@ const PRTime gPreloadListExpirationTime = INT64_C(1520275370003000);
38blog.com, 1
393335.ml, 1
398.info, 1
3ags.de, 1
3bakayottu.com, 1
3bigking.com, 1
3c-d.de, 1
@ -349,7 +351,6 @@ const PRTime gPreloadListExpirationTime = INT64_C(1520275370003000);
500p.xyz, 1
50north.de, 1
50plusnet.nl, 1
513vpn.net, 1
525.info, 1
52neptune.com, 1
5432.cc, 1
@ -893,7 +894,6 @@ agileui.com, 1
agiley.se, 1
agilob.net, 1
aging.gov, 1
agingstop.net, 1
agotnes.com, 1
agouraelectrical.com, 1
agourahillselectrical.com, 1
@ -919,7 +919,6 @@ aheng.me, 1
ahero4all.org, 1
ahiru3.com, 1
ahkubiak.ovh, 1
ahlaejaba.com, 1
ahlz.sk, 1
ahmad.works, 1
ahmadly.com, 1
@ -1627,6 +1626,7 @@ ao2.it, 1
aojiao.org, 0
aoku3d.com, 1
aolabs.nz, 1
aomberg.com, 1
aooobo.com, 1
aopedeure.nl, 1
aosc.io, 0
@ -1883,6 +1883,7 @@ arnor.org, 1
arnoudraeven.nl, 1
arnoudvandalen.nl, 1
arocloud.de, 0
arod.tk, 1
arokha.com, 1
aroonchande.com, 1
around-the-blog.com, 1
@ -2710,7 +2711,6 @@ bedrocklinux.org, 1
bee.clothing, 1
bee.supply, 1
bee.tools, 1
beehive.govt.nz, 1
beehive42.com, 1
beehive42.eu, 1
beehive42.net, 1
@ -2909,7 +2909,6 @@ besthotsales.com, 1
bestlashesandbrows.com, 1
bestlashesandbrows.hu, 1
bestleftwild.com, 1
bestmodels.su, 1
bestmotherfucking.website, 1
bestperfumebrands.com, 1
bestschools.top, 1
@ -3218,6 +3217,7 @@ bitmessage.ch, 1
bitmex.com, 1
bitminter.com, 1
bitmoe.com, 1
bitmon.net, 1
bitok.com, 1
bitplay.space, 1
bitpod.de, 1
@ -3708,7 +3708,6 @@ brasalcosmetics.com, 1
brashear.me, 1
brasilbombas.com.br, 1
brasserie-mino.fr, 1
brasspipedreams.org, 1
bratislava-airport-taxi.com, 1
bratteng.me, 0
bratvanov.com, 1
@ -4519,7 +4518,6 @@ cegfw.com, 1
ceilingpac.org, 1
cejhon.cz, 0
cekaja.com, 1
celebphotos.blog, 1
celebrityscope.net, 1
celec.gob.ec, 0
celiendev.ch, 1
@ -4887,7 +4885,6 @@ chrismckee.co.uk, 1
chrisnekarda.com, 1
chrisnicholas.io, 1
chrispstreet.com, 1
chrisself.xyz, 1
chrisshort.net, 0
christadelphiananswers.org, 1
christadelphians.eu, 1
@ -6652,6 +6649,7 @@ degeberg.com, 1
degeberg.dk, 1
degen-elektrotechnik.de, 1
degraafschapdierenartsen.nl, 1
dehopre.com, 1
dehydrated.de, 1
deidee.nl, 1
deinballon.de, 1
@ -7197,7 +7195,6 @@ dlg.im, 1
dlitz.net, 1
dlld.com, 1
dlouwrink.nl, 1
dlrsp.org, 1
dlyl888.com, 1
dlzz.net, 1
dm.lookout.com, 0
@ -7440,6 +7437,7 @@ downloadsoftwaregratisan.com, 1
downtimerobot.com, 1
downtimerobot.nl, 1
downtownvernon.com, 1
doyoucheck.com, 0
doyouedc.com, 1
doyoulyft.com, 1
doyoutax.com, 1
@ -8127,6 +8125,7 @@ elexprimidor.com, 1
elglobo.com.mx, 1
elgosblanc.com, 1
elhall.pro, 1
elhall.ru, 1
elhamadimi.com, 1
elhossari.com, 1
elia.cloud, 1
@ -8633,7 +8632,6 @@ etccooperative.org, 1
eteapparel.com, 1
eteesheet.com, 1
etelej.com, 0
etenendrinken.nu, 1
eternalabyss.int.eu.org, 1
eth-faucet.net, 1
eth0.nl, 1
@ -9034,7 +9032,6 @@ familieholme.de, 1
familjenfrodlund.se, 1
familjenm.se, 1
familletouret.fr, 1
familylawhotline.org, 1
familyreal.ru, 1
famososnaweb.com, 1
famousbirthdays.com, 1
@ -9072,6 +9069,7 @@ faretravel.co.uk, 1
farfallapets.com.br, 1
farfetchos.com, 1
fargtorget.se, 1
farhadexchange.com, 1
farhood.org, 1
farid.is, 1
farkas.bz, 1
@ -9714,7 +9712,6 @@ fortesanshop.it, 1
fortnine.ca, 1
fortran.io, 1
fortress.no, 1
fortress.sk, 1
fortricks.in, 1
fortuna-loessnitz.de, 1
fortuna-s.com, 1
@ -9739,7 +9736,6 @@ foshanshequ.com, 1
fossewayflowers.co.uk, 1
fossewayflowers.com, 1
fossewaygardencentre.co.uk, 1
fossgruppen.se, 1
fossilfreeyale.org, 1
fotella.com, 1
fotikpro.ru, 1
@ -10464,7 +10460,6 @@ gerardobsd.com, 1
gerardozamudio.mx, 1
germandarknes.net, 1
germansoldiers.net, 1
germanssky.de, 1
germanticz.de, 1
gernert-server.de, 1
gero.io, 1
@ -10861,7 +10856,6 @@ gouldcooksey.com, 1
goup.co, 1
goup.com.tr, 1
gourmetfestival.de, 1
gouthro-goteborg.se, 1
gov.tc, 1
governmentjobs.gov, 1
governorhub.com, 1
@ -11245,6 +11239,7 @@ hackerone-ext-content.com, 1
hackerone-user-content.com, 1
hackerone.com, 1
hackerone.net, 1
hackerstxt.org, 1
hackgins.com, 1
hackingand.coffee, 1
hackingdh.com, 1
@ -12302,7 +12297,6 @@ iaeste.no, 1
iainsimms.me, 1
ialis.me, 1
iamcarrico.com, 1
iamsoareyou.se, 1
iamtheib.me, 1
iamusingtheinter.net, 1
iamwoodbeard.com, 1
@ -12404,7 +12398,7 @@ idexxpublicationportal.com, 1
idgard.de, 1
idhosts.co.id, 1
idid.tk, 1
idinby.dk, 0
idinby.dk, 1
idiopolis.org, 1
idiotentruppe.de, 1
idmanagement.gov, 1
@ -12426,6 +12420,8 @@ idunno.org, 1
idvl.de, 1
ie.search.yahoo.com, 0
iec.pe, 1
ieeesb.nl, 1
ieeesbe.nl, 1
ieeespmb.org, 1
ieji.de, 0
iemas.azurewebsites.net, 1
@ -14936,6 +14932,7 @@ kwidz.fr, 1
kwikmed.eu, 0
kwipi.com, 1
kwmr.me, 1
kwok.cc, 1
kwyxz.org, 1
kxah35.com, 1
kyberna.xyz, 1
@ -15402,6 +15399,7 @@ lernerspersonalinjury.ca, 1
lernorteuropa.com, 1
lernorteuropa.de, 1
lernorteuropa.eu, 1
lernplattform-akademie.de, 1
lerp.me, 1
les-ateliers-de-melineo.be, 1
les-pingouins.com, 1
@ -15436,7 +15434,6 @@ leticiagomeztagle.com, 1
lets-go-acoustic.de, 1
lets-ktai.jp, 1
lets.ninja, 1
lets.nu, 1
letsencrypt-for-cpanel.com, 1
letsgame.nl, 1
letsgetchecked.com, 1
@ -15808,6 +15805,7 @@ loanstreet.nl, 1
lobivia.de, 1
lobosdomain.no-ip.info, 1
locais.org, 1
local360.net, 1
localbandz.com, 1
localbitcoins.com, 1
localblock.co.za, 1
@ -16251,7 +16249,6 @@ madin.ru, 1
madirc.net, 1
madmar.ee, 1
madnetwork.org, 1
madoka.nu, 1
madokami.net, 1
madrants.net, 1
madreacqua.org, 1
@ -16858,7 +16855,6 @@ mdcloudps.com, 1
mdek.at, 1
mdewendt.de, 1
mdf-bis.com, 1
mdkr.nl, 1
mdma.net, 1
mdmed.clinic, 1
mdosch.de, 1
@ -17239,7 +17235,6 @@ midwestbloggers.org, 1
midweststructuralrepair.com, 1
mieuxgrandir.ch, 1
miffy.me, 1
mig5.net, 1
miggy.org, 1
mightymillionsraffle.com, 1
miguel.pw, 1
@ -17322,7 +17317,6 @@ minacssas.com, 1
minakov.pro, 1
minami.xyz, 1
minamo.io, 1
minantavla.se, 1
minaprine.com, 1
mind-box.ch, 1
mind-hochschul-netzwerk.de, 1
@ -17647,7 +17641,6 @@ mondial-movers.nl, 1
moneychangersoftware.com, 1
moneygo.se, 1
moneyhouse.de, 1
moneytoday.se, 1
mongla168.net, 1
mongla88.net, 1
monique.io, 1
@ -17823,7 +17816,7 @@ mplicka.cz, 1
mplusm.eu, 1
mpn.poker, 1
mpnpokertour.com, 1
mpreserver.com, 1
mpreserver.com, 0
mpserver12.org, 1
mpsgarage.com.au, 1
mpsoundcraft.com, 1
@ -18605,7 +18598,6 @@ nesolabs.com, 1
nesolabs.de, 1
nesterov.pw, 1
nestone.ru, 1
nestor.nu, 1
neswec.org.uk, 1
net-safe.info, 1
net2o.com, 1
@ -18864,7 +18856,6 @@ niess.space, 1
niesstar.com, 1
nietzsche.com, 1
nieuwsoverijssel.nl, 1
nifpnet.nl, 1
niftiestsoftware.com, 1
nifume.com, 1
nigelwakefield.com, 1
@ -19178,7 +19169,6 @@ nudel.ninja, 1
nudestpics.com, 1
nuel.cl, 1
nuevaimagenpublicidad.es, 1
nukute.com, 1
null-life.com, 1
nullday.de, 1
nullpointer.io, 1
@ -19284,7 +19274,6 @@ oblikdom.ru, 1
oblondata.io, 1
obrienlab.com, 1
obscur.us, 1
observatory.se, 1
obsidianirc.net, 1
obsproject.com, 1
obtima.org, 1
@ -20088,6 +20077,7 @@ passvau.lt, 1
passwd.one, 1
passwd.org, 1
password-checker.de, 1
password.codes, 1
password.consulting, 1
password.work, 1
passwordhashing.com, 1
@ -20371,7 +20361,6 @@ pestici.de, 1
pet-hotel-mura.net, 1
pet-life.top, 1
petabits.de, 1
petangen.se, 1
petbooking.it, 1
petcarvers.com, 1
petelew.is, 1
@ -20779,7 +20768,7 @@ plexusmd.com, 1
plinc.co, 1
pliosoft.com, 1
plitu.de, 1
ploader.ru, 1
ploader.ru, 0
plongee-phuket.fr, 1
ploofer.com, 1
plot.ly, 1
@ -21001,6 +20990,7 @@ postdarwinian.com, 1
postdarwinism.com, 1
postdeck.de, 1
posteo.de, 0
posterspy.com, 1
postfalls-naturopathic.com, 1
postfinance.ch, 1
postmatescode.com, 1
@ -21124,7 +21114,6 @@ present-m.com, 1
presentesdegrife.com.br, 1
president.bg, 1
prespanok.sk, 1
press-presse.ca, 1
presscenter.jp, 1
presses.ch, 1
pressrush.com, 1
@ -21698,6 +21687,7 @@ rabbit.wales, 1
rabbitvcactus.eu, 1
rabota-x.ru, 1
rabotaescort.com, 1
racasdecachorro.org, 1
racermaster.xyz, 0
raceviewcycles.com, 1
raceviewequestrian.com, 1
@ -22133,6 +22123,7 @@ remoteutilities.com, 1
removedrepo.com, 1
renascentia.asia, 1
renaultclubticino.ch, 1
rencaijia.com, 1
renderloop.com, 1
rene-schwarz.com, 1
rene-stolp.de, 1
@ -22680,7 +22671,6 @@ rsldb.com, 1
rsm-intern.de, 1
rsm-liga.de, 1
rss.sh, 0
rssr.se, 1
rstraining.co.uk, 1
rstsecuritygroup.co.uk, 1
rsttraining.co.uk, 1
@ -23881,7 +23871,6 @@ shiseki.top, 1
shishamania.de, 1
shishkin.link, 1
shishkin.us, 1
shishlik.net, 1
shitagi-shop.com, 1
shitbeast.institute, 1
shitfest.info, 1
@ -23924,6 +23913,7 @@ shopsouthafrican.com, 1
shoptec.sk, 1
shorebreaksecurity.com, 1
shortdiary.me, 1
shorten.ninja, 1
shortpath.com, 1
shortr.li, 1
shoshin-aikido.de, 1
@ -24358,6 +24348,7 @@ slow.zone, 1
slowb.ro, 1
slowfood.es, 1
slowgames.xyz, 1
slowsociety.org, 1
slpower.com, 1
slrd-isperih.com, 1
slse.ca, 1
@ -24798,6 +24789,7 @@ spherenix.org, 1
sphinx.network, 1
spicydog.org, 1
spicydog.tk, 0
spicymatch.com, 1
spicywombat.com, 1
spidermail.tk, 1
spideroak.com, 1
@ -25306,6 +25298,7 @@ stuco.co, 1
studenckiemetody.pl, 1
student-eshop.cz, 1
student-eshop.sk, 1
student.andover.edu, 1
studentforums.biz, 1
studentite.bg, 0
studentloans.gov, 1
@ -25398,7 +25391,6 @@ suevia-ka.de, 1
sufix.cz, 1
sugarandcloth.com, 1
sugarbrother.com, 1
sugarshin.net, 1
suggestim.ch, 1
suiranfes.com, 1
suitocracy.com, 1
@ -25760,7 +25752,6 @@ tammy.pro, 1
tampabaybusinesslistings.com, 1
tanak3n.xyz, 1
tancredi.nl, 1
tandblekningidag.com, 1
tandem-trade.ru, 1
tangiblesecurity.com, 1
tango-cats.de, 1
@ -26396,7 +26387,6 @@ thesharedbrain.ch, 1
thesharedbrain.com, 1
thesharepointfarm.com, 1
theshine.pl, 1
theshopally.com, 1
thesignalco.com.au, 1
thesisgeek.com, 1
thesishelp.net, 1
@ -26670,6 +26660,7 @@ tkn.tokyo, 1
tkts.cl, 1
tkusano.jp, 1
tkw01536.de, 1
tlach.cz, 1
tlca.org, 1
tlcnet.info, 1
tlehseasyads.com, 1
@ -26720,7 +26711,6 @@ tobias-kluge.de, 1
tobias-picha.de, 1
tobias-weidhase.de, 1
tobias.gr, 1
tobiasbergius.se, 1
tobiasbrunner.net, 1
tobiasconradi.com, 1
tobiashorvath.com, 1
@ -27406,7 +27396,6 @@ tworaz.net, 1
twotube.ie, 1
twun.io, 1
twuni.org, 1
txcap.org, 1
txcp01.com, 1
txcp02.com, 1
txdivorce.org, 1
@ -27726,7 +27715,6 @@ urbanietz-immobilien.de, 1
urbanmelbourne.info, 1
urbannewsservice.com, 1
urbansparrow.in, 1
urbanstylestaging.com, 1
urbanwildlifealliance.org, 1
urbexdk.nl, 1
urcentral.com, 1
@ -28630,7 +28618,6 @@ webart-factory.de, 1
webbhuset.se, 0
webbiz.co.uk, 1
webbson.net, 1
webbx.se, 1
webcamtoy.com, 1
webcatechism.com, 1
webclimbers.ch, 1
@ -28692,7 +28679,6 @@ webpubsub.com, 1
webqueens.com, 1
webrentcars.com, 1
webreport.fr, 1
webreslist.com, 1
webs4all.ro, 0
websectools.com, 1
websecurity.is, 1
@ -28769,7 +28755,6 @@ wein.cc, 1
weinbergerlawgroup.com, 1
weinhandel-preissler.de, 1
weirdesigns.com, 1
weirdserver.com, 1
weisse-liste.de, 1
weissman.agency, 1
weiterbildung-vdz.de, 1
@ -29665,7 +29650,6 @@ xn--y8j148r.xn--q9jyb4c, 1
xn--y8j2eb5631a4qf5n0h.com, 1
xn--y8j5gq14rbdd.net, 1
xn--yj8h0m.ws, 1
xn--ykrp42k.com, 1
xn--zettlmeil-n1a.de, 1
xn5.de, 1
xnaas.info, 1
@ -30094,6 +30078,7 @@ zappbuildapps.com, 1
zaratan.fr, 1
zarmarket.org, 1
zarpo.com.br, 1
zary.me, 1
zaufanatrzeciastrona.pl, 1
zavec.com.ec, 1
zavetaji.lv, 1
@ -30256,6 +30241,7 @@ zojadravai.com, 1
zoki.art, 1
zokster.net, 1
zolokar.xyz, 1
zolotoy-standart.com.ua, 1
zombiesecured.com, 1
zomerschoen.nl, 1
zone-produkte.de, 1

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

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

7
third_party/python/json-e/jsone/__init__.py поставляемый
Просмотреть файл

@ -1,9 +1,8 @@
from __future__ import absolute_import, print_function, unicode_literals
import datetime
import re
from .render import renderValue
from .shared import JSONTemplateError, DeleteMarker, TemplateError
from .shared import JSONTemplateError, DeleteMarker, TemplateError, fromNow
from . import builtins
_context_re = re.compile(r'[a-zA-Z_][a-zA-Z0-9_]*$')
@ -12,8 +11,8 @@ _context_re = re.compile(r'[a-zA-Z_][a-zA-Z0-9_]*$')
def render(template, context):
if not all(_context_re.match(c) for c in context):
raise TemplateError('top level keys of context must follow '
'/[a-zA-Z_][a-zA-Z0-9_]*/')
full_context = {'now': datetime.datetime.utcnow()}
'/[a-zA-Z_][a-zA-Z0-9_]*/')
full_context = {'now': fromNow('0 seconds', None)}
full_context.update(builtins.build(full_context))
full_context.update(context)
rv = renderValue(template, full_context)

8
third_party/python/json-e/jsone/builtins.py поставляемый
Просмотреть файл

@ -14,7 +14,8 @@ def build(context):
def builtin(name, variadic=None, argument_tests=None, minArgs=None):
def wrap(fn):
def bad(reason=None):
raise BuiltinError((reason or 'invalid arguments to {}').format(name))
raise BuiltinError(
(reason or 'invalid arguments to builtin: {}').format(name))
if variadic:
def invoke(*args):
if minArgs:
@ -51,6 +52,9 @@ def build(context):
def is_string_or_array(v):
return isinstance(v, (string, list))
def anything_except_array(v):
return isinstance(v, (string, int, float, bool)) or v is None
def anything(v):
return isinstance(v, (string, int, float, list, dict)) or v is None or callable(v)
@ -78,7 +82,7 @@ def build(context):
return v.upper()
builtin('len', argument_tests=[is_string_or_array])(len)
builtin('str', argument_tests=[anything])(to_str)
builtin('str', argument_tests=[anything_except_array])(to_str)
@builtin('strip', argument_tests=[is_string])
def strip(s):

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

@ -95,7 +95,8 @@ class ExpressionEvaluator(PrattParser):
try:
return self.context[token.value]
except KeyError:
raise TemplateError('no context value named "{}"'.format(token.value))
raise TemplateError(
'no context value named "{}"'.format(token.value))
@prefix("null")
def null(self, token, pc):
@ -179,7 +180,8 @@ class ExpressionEvaluator(PrattParser):
try:
return left[k]
except KeyError:
raise TemplateError('{} not found in {}'.format(k, json.dumps(left)))
raise TemplateError(
'{} not found in {}'.format(k, json.dumps(left)))
@infix("(")
def function_call(self, left, token, pc):
@ -213,7 +215,8 @@ class ExpressionEvaluator(PrattParser):
if not isinstance(left, string):
raise expectationError('in-string', 'string on left side')
elif not isinstance(right, list):
raise expectationError('in', 'Array, string, or object on right side')
raise expectationError(
'in', 'Array, string, or object on right side')
try:
return left in right
except TypeError:
@ -283,4 +286,3 @@ def accessProperty(value, a, b, is_interval):
return value[a]
except KeyError:
return None
#raise TemplateError('{} not found in {}'.format(a, json.dumps(value)))

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

@ -111,12 +111,14 @@ class PrattParser(with_metaclass(PrattParserMeta, object)):
mo = self.token_re.match(remainder)
if not mo:
if remainder:
raise SyntaxError("Unexpected input: '{}'".format(remainder))
raise SyntaxError(
"Unexpected input: '{}'".format(remainder))
break
offset += mo.end()
# figure out which token matched (note that idx is 0-based)
indexes = list(filter(lambda x: x[1] is not None, enumerate(mo.groups())))
indexes = list(
filter(lambda x: x[1] is not None, enumerate(mo.groups())))
if indexes:
idx = indexes[0][0]
yield Token(

56
third_party/python/json-e/jsone/render.py поставляемый
Просмотреть файл

@ -9,6 +9,7 @@ from .six import viewitems
import functools
operators = {}
IDENTIFIER_RE = re.compile(r'[a-zA-Z_][a-zA-Z0-9_]*$')
def operator(name):
@ -24,6 +25,8 @@ def evaluateExpression(expr, context):
_interpolation_start_re = re.compile(r'\$?\${')
def interpolate(string, context):
mo = _interpolation_start_re.search(string)
if not mo:
@ -40,7 +43,10 @@ def interpolate(string, context):
if isinstance(parsed, (list, dict)):
raise TemplateError(
"interpolation of '{}' produced an array or object".format(string[:offset]))
result.append(to_str(parsed))
if to_str(parsed) == "null":
result.append("")
else:
result.append(to_str(parsed))
string = string[offset + 1:]
else: # found `$${`
result.append('${')
@ -54,6 +60,16 @@ def interpolate(string, context):
return ''.join(result)
def checkUndefinedProperties(template, allowed):
unknownKeys = []
combined = "|".join(allowed) + "$"
unknownKeys = [key for key in sorted(template)
if not re.match(combined, key)]
if unknownKeys:
raise TemplateError(allowed[0].replace('\\', '') +
" has undefined properties: " + " ".join(unknownKeys))
@operator('$eval')
def eval(template, context):
return evaluateExpression(renderValue(template['$eval'], context), context)
@ -61,6 +77,7 @@ def eval(template, context):
@operator('$flatten')
def flatten(template, context):
checkUndefinedProperties(template, ['\$flatten'])
value = renderValue(template['$flatten'], context)
if not isinstance(value, list):
raise TemplateError('$flatten value must evaluate to an array')
@ -77,6 +94,7 @@ def flatten(template, context):
@operator('$flattenDeep')
def flattenDeep(template, context):
checkUndefinedProperties(template, ['\$flattenDeep'])
value = renderValue(template['$flattenDeep'], context)
if not isinstance(value, list):
raise TemplateError('$flattenDeep value must evaluate to an array')
@ -94,8 +112,10 @@ def flattenDeep(template, context):
@operator('$fromNow')
def fromNow(template, context):
checkUndefinedProperties(template, ['\$fromNow', 'from'])
offset = renderValue(template['$fromNow'], context)
reference = renderValue(template['from'], context) if 'from' in template else context.get('now')
reference = renderValue(
template['from'], context) if 'from' in template else context.get('now')
if not isinstance(offset, string):
raise TemplateError("$fromNow expects a string")
@ -104,6 +124,7 @@ def fromNow(template, context):
@operator('$if')
def ifConstruct(template, context):
checkUndefinedProperties(template, ['\$if', 'then', 'else'])
condition = evaluateExpression(template['$if'], context)
try:
if condition:
@ -117,15 +138,21 @@ def ifConstruct(template, context):
@operator('$json')
def jsonConstruct(template, context):
checkUndefinedProperties(template, ['\$json'])
value = renderValue(template['$json'], context)
return json.dumps(value, separators=(',', ':'))
@operator('$let')
def let(template, context):
checkUndefinedProperties(template, ['\$let', 'in'])
variables = renderValue(template['$let'], context)
if not isinstance(variables, dict):
raise TemplateError("$let value must evaluate to an object")
else:
if not all(IDENTIFIER_RE.match(variableNames) for variableNames in variables.keys()):
raise TemplateError('top level keys of $let must follow /[a-zA-Z_][a-zA-Z0-9_]*/')
subcontext = context.copy()
subcontext.update(variables)
try:
@ -137,6 +164,8 @@ def let(template, context):
@operator('$map')
def map(template, context):
EACH_RE = 'each\([a-zA-Z_][a-zA-Z0-9_]*\)'
checkUndefinedProperties(template, ['\$map', EACH_RE])
value = renderValue(template['$map'], context)
if not isinstance(value, list) and not isinstance(value, dict):
raise TemplateError("$map value must evaluate to an array or object")
@ -145,7 +174,8 @@ def map(template, context):
each_keys = [k for k in template if k.startswith('each(')]
if len(each_keys) != 1:
raise TemplateError("$map requires exactly one other property, each(..)")
raise TemplateError(
"$map requires exactly one other property, each(..)")
each_key = each_keys[0]
each_var = each_key[5:-1]
each_template = template[each_key]
@ -172,9 +202,11 @@ def map(template, context):
@operator('$merge')
def merge(template, context):
checkUndefinedProperties(template, ['\$merge'])
value = renderValue(template['$merge'], context)
if not isinstance(value, list) or not all(isinstance(e, dict) for e in value):
raise TemplateError("$merge value must evaluate to an array of objects")
raise TemplateError(
"$merge value must evaluate to an array of objects")
v = dict()
for e in value:
v.update(e)
@ -183,9 +215,12 @@ def merge(template, context):
@operator('$mergeDeep')
def merge(template, context):
checkUndefinedProperties(template, ['\$mergeDeep'])
value = renderValue(template['$mergeDeep'], context)
if not isinstance(value, list) or not all(isinstance(e, dict) for e in value):
raise TemplateError("$mergeDeep value must evaluate to an array of objects")
raise TemplateError(
"$mergeDeep value must evaluate to an array of objects")
def merge(l, r):
if isinstance(l, list) and isinstance(r, list):
return l + r
@ -205,6 +240,7 @@ def merge(template, context):
@operator('$reverse')
def reverse(template, context):
checkUndefinedProperties(template, ['\$reverse'])
value = renderValue(template['$reverse'], context)
if not isinstance(value, list):
raise TemplateError("$reverse value must evaluate to an array")
@ -213,6 +249,8 @@ def reverse(template, context):
@operator('$sort')
def sort(template, context):
BY_RE = 'by\([a-zA-Z_][a-zA-Z0-9_]*\)'
checkUndefinedProperties(template, ['\$sort', BY_RE])
value = renderValue(template['$sort'], context)
if not isinstance(value, list):
raise TemplateError("$sort value must evaluate to an array")
@ -262,14 +300,18 @@ def renderValue(template, context):
def updated():
for k, v in viewitems(template):
if k.startswith('$$') and k[1:] in operators:
if k.startswith('$$'):
k = k[1:]
elif k.startswith('$') and IDENTIFIER_RE.match(k[1:]):
raise TemplateError(
'$<identifier> is reserved; ues $$<identifier>')
else:
k = interpolate(k, context)
try:
v = renderValue(v, context)
except JSONTemplateError as e:
if re.match('^[a-zA-Z][a-zA-Z0-9]*$', k):
if IDENTIFIER_RE.match(k):
e.add_location('.{}'.format(k))
else:
e.add_location('[{}]'.format(json.dumps(k)))

6
third_party/python/json-e/jsone/shared.py поставляемый
Просмотреть файл

@ -85,8 +85,9 @@ def fromNow(offset, reference):
seconds=seconds,
)
if isinstance(reference, str):
reference = datetime.datetime.strptime(reference, '%Y-%m-%dT%H:%M:%S.%fZ')
if isinstance(reference, string):
reference = datetime.datetime.strptime(
reference, '%Y-%m-%dT%H:%M:%S.%fZ')
elif reference is None:
reference = datetime.datetime.utcnow()
return stringDate(reference + delta if future else reference - delta)
@ -112,6 +113,7 @@ def stringDate(date):
string = datefmt_re.sub(r'\1Z', string)
return string
# the base class for strings, regardless of python version
try:
string = basestring

3
third_party/python/json-e/jsone/six.py поставляемый
Просмотреть файл

@ -2,6 +2,8 @@ import sys
import operator
# https://github.com/benjaminp/six/blob/2c3492a9f16d294cd5e6b43d6110c5a3a2e58b4c/six.py#L818
def with_metaclass(meta, *bases):
"""Create a base class with a metaclass."""
# This requires a bit of explanation: the basic idea is to make a dummy
@ -13,6 +15,7 @@ def with_metaclass(meta, *bases):
return meta(name, bases, d)
return type.__new__(metaclass, 'temporary_class', (), {})
# https://github.com/benjaminp/six/blob/2c3492a9f16d294cd5e6b43d6110c5a3a2e58b4c/six.py#L578
if sys.version_info[0] == 3:
viewitems = operator.methodcaller("items")

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

@ -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]

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

@ -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

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

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

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

@ -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; }

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

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

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

@ -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;

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

@ -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;

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

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

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

@ -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);

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

@ -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;

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

@ -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;

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

@ -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);