Merge inbound to mozilla-central. a=merge

This commit is contained in:
shindli 2018-05-04 11:35:37 +03:00
Родитель 6e6ddaaf1f 9f92306824
Коммит 8fad8a2218
61 изменённых файлов: 157 добавлений и 601 удалений

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

@ -148,6 +148,9 @@ endif
ifdef MOZ_CLANG_RT_ASAN_LIB_PATH
DEFINES += -DMOZ_CLANG_RT_ASAN_LIB=$(notdir $(MOZ_CLANG_RT_ASAN_LIB_PATH))
endif
ifdef WIN_DIA_SDK_BIN_DIR
DEFINES += -DWIN_DIA_SDK_BIN_DIR=1
endif
# Builds using the hybrid FasterMake/RecursiveMake backend will
# fail to produce a langpack. See bug 1255096.

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

@ -588,6 +588,10 @@ bin/libfreebl_32int64_3.so
#ifdef LLVM_SYMBOLIZER
@BINPATH@/@LLVM_SYMBOLIZER@
; On Windows, llvm-symbolizer depends on the MS DIA library.
#ifdef WIN_DIA_SDK_BIN_DIR
@BINPATH@/msdia140.dll
#endif
#endif
#ifdef MOZ_CLANG_RT_ASAN_LIB

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

@ -26,3 +26,9 @@ if CONFIG['WIN_UCRT_REDIST_DIR'] and CONFIG['COMPILE_ENVIRONMENT']:
FINAL_TARGET_FILES += [
'%%%s/%s' % (CONFIG['WIN_UCRT_REDIST_DIR'], f)
]
if CONFIG['LLVM_SYMBOLIZER'] and CONFIG['WIN_DIA_SDK_BIN_DIR']:
# On Windows, llvm-symbolizer depends on the MS DIA library.
FINAL_TARGET_FILES += [
'%%%s/msdia140.dll' % CONFIG['WIN_DIA_SDK_BIN_DIR']
]

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

@ -9,8 +9,9 @@ if [ -d "${VSPATH}" ]; then
export WINDOWSSDKDIR="${VSWINPATH}/SDK"
export WIN32_REDIST_DIR="${VSPATH}/VC/redist/x86/Microsoft.VC141.CRT"
export WIN_UCRT_REDIST_DIR="${VSPATH}/SDK/Redist/ucrt/DLLs/x86"
export WIN_DIA_SDK_BIN_DIR="${VSPATH}/DIA SDK/bin"
export PATH="${VSPATH}/VC/bin/Hostx86/x86:${VSPATH}/VC/bin/Hostx64/x86:${VSPATH}/VC/bin/Hostx64/x64:${VSPATH}/SDK/bin/10.0.15063.0/x64:${VSPATH}/DIA SDK/bin:${PATH}"
export PATH="${VSPATH}/VC/bin/Hostx86/x86:${VSPATH}/VC/bin/Hostx64/x86:${VSPATH}/VC/bin/Hostx64/x64:${VSPATH}/SDK/bin/10.0.15063.0/x64:${WIN_DIA_SDK_BIN_DIR}:${PATH}"
export PATH="${VSPATH}/VC/redist/x86/Microsoft.VC141.CRT:${VSPATH}/SDK/Redist/ucrt/DLLs/x86:${PATH}"
export INCLUDE="${VSPATH}/VC/include:${VSPATH}/VC/atlmfc/include:${VSPATH}/SDK/Include/10.0.15063.0/ucrt:${VSPATH}/SDK/Include/10.0.15063.0/shared:${VSPATH}/SDK/Include/10.0.15063.0/um:${VSPATH}/SDK/Include/10.0.15063.0/winrt:${VSPATH}/DIA SDK/include"
@ -25,6 +26,7 @@ fi
mk_export_correct_style WINDOWSSDKDIR
mk_export_correct_style WIN32_REDIST_DIR
mk_export_correct_style WIN_UCRT_REDIST_DIR
mk_export_correct_style WIN_DIA_SDK_BIN_DIR
mk_export_correct_style PATH
mk_export_correct_style INCLUDE
mk_export_correct_style LIB

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

@ -9,8 +9,9 @@ if [ -d "${VSPATH}" ]; then
export WINDOWSSDKDIR="${VSWINPATH}/SDK"
export WIN32_REDIST_DIR=${VSPATH}/VC/redist/x64/Microsoft.VC141.CRT
export WIN_UCRT_REDIST_DIR="${VSPATH}/SDK/Redist/ucrt/DLLs/x64"
export WIN_DIA_SDK_BIN_DIR="${VSPATH}/DIA SDK/bin/amd64"
export PATH="${VSPATH}/VC/bin/Hostx64/x64:${VSPATH}/SDK/bin/10.0.15063.0/x64:${VSPATH}/VC/redist/x64/Microsoft.VC141.CRT:${VSPATH}/SDK/Redist/ucrt/DLLs/x64:${VSPATH}/DIA SDK/bin/amd64:${PATH}"
export PATH="${VSPATH}/VC/bin/Hostx64/x64:${VSPATH}/SDK/bin/10.0.15063.0/x64:${VSPATH}/VC/redist/x64/Microsoft.VC141.CRT:${VSPATH}/SDK/Redist/ucrt/DLLs/x64:${WIN_DIA_SDK_BIN_DIR}:${PATH}"
export INCLUDE="${VSPATH}/VC/include:${VSPATH}/VC/atlmfc/include:${VSPATH}/SDK/Include/10.0.15063.0/ucrt:${VSPATH}/SDK/Include/10.0.15063.0/shared:${VSPATH}/SDK/Include/10.0.15063.0/um:${VSPATH}/SDK/Include/10.0.15063.0/winrt:${VSPATH}/DIA SDK/include"
export LIB="${VSPATH}/VC/lib/x64:${VSPATH}/VC/atlmfc/lib/x64:${VSPATH}/SDK/Lib/10.0.15063.0/ucrt/x64:${VSPATH}/SDK/Lib/10.0.15063.0/um/x64:${VSPATH}/DIA SDK/lib/amd64"
@ -21,6 +22,7 @@ fi
mk_export_correct_style WINDOWSSDKDIR
mk_export_correct_style WIN32_REDIST_DIR
mk_export_correct_style WIN_UCRT_REDIST_DIR
mk_export_correct_style WIN_DIA_SDK_BIN_DIR
mk_export_correct_style PATH
mk_export_correct_style INCLUDE
mk_export_correct_style LIB

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

@ -1,14 +0,0 @@
/* 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 { createEnum } = require("devtools/client/shared/enum");
createEnum([
// Update the entire changes state with the new list of changes.
"UPDATE_CHANGES",
], module.exports);

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

@ -1,9 +0,0 @@
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
# vim: set filetype=python:
# 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/.
DevToolsModules(
'index.js',
)

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

@ -1,50 +0,0 @@
/* 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 { createFactory, createElement } = require("devtools/client/shared/vendor/react");
const { Provider } = require("devtools/client/shared/vendor/react-redux");
const ChangesApp = createFactory(require("./components/ChangesApp"));
const { LocalizationHelper } = require("devtools/shared/l10n");
const INSPECTOR_L10N =
new LocalizationHelper("devtools/client/locales/inspector.properties");
class ChangesView {
constructor(inspector, window) {
this.document = window.document;
this.inspector = inspector;
this.store = inspector.store;
this.init();
}
init() {
if (!this.inspector) {
return;
}
let changesApp = ChangesApp({});
let provider = createElement(Provider, {
id: "changesview",
key: "changesview",
store: this.store,
title: INSPECTOR_L10N.getStr("inspector.sidebar.changesViewTitle")
}, changesApp);
// Expose the provider to let inspector.js use it in setupSidebar.
this.provider = provider;
}
destroy() {
this.document = null;
this.inspector = null;
this.store = null;
}
}
module.exports = ChangesView;

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

@ -1,25 +0,0 @@
/* 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 { PureComponent } = require("devtools/client/shared/vendor/react");
const dom = require("devtools/client/shared/vendor/react-dom-factories");
const { connect } = require("devtools/client/shared/vendor/react-redux");
class ChangesApp extends PureComponent {
static get propTypes() {
return {};
}
render() {
return dom.div(
{
id: "changes-container",
}
);
}
}
module.exports = connect(state => state)(ChangesApp);

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

@ -1,9 +0,0 @@
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
# vim: set filetype=python:
# 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/.
DevToolsModules(
'ChangesApp.js',
)

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

@ -1,15 +0,0 @@
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
# vim: set filetype=python:
# 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/.
DIRS += [
'actions',
'components',
'reducers',
]
DevToolsModules(
'changes.js',
)

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

@ -1,19 +0,0 @@
/* 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 INITIAL_CHANGES = [];
let reducers = {
};
module.exports = function(changes = INITIAL_CHANGES, action) {
let reducer = reducers[action.type];
if (!reducer) {
return changes;
}
return reducer(changes, action);
};

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

@ -1,7 +0,0 @@
/* 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";
exports.changes = require("./changes");

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

@ -1,10 +0,0 @@
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
# vim: set filetype=python:
# 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/.
DevToolsModules(
'changes.js',
'index.js',
)

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

@ -1,14 +0,0 @@
/* 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 { createEnum } = require("devtools/client/shared/enum");
createEnum([
// Update the entire events state with the new list of events.
"UPDATE_EVENTS",
], module.exports);

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

@ -1,9 +0,0 @@
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
# vim: set filetype=python:
# 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/.
DevToolsModules(
'index.js',
)

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

@ -1,25 +0,0 @@
/* 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 { PureComponent } = require("devtools/client/shared/vendor/react");
const dom = require("devtools/client/shared/vendor/react-dom-factories");
const { connect } = require("devtools/client/shared/vendor/react-redux");
class EventsApp extends PureComponent {
static get propTypes() {
return {};
}
render() {
return dom.div(
{
id: "events-container",
}
);
}
}
module.exports = connect(state => state)(EventsApp);

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

@ -1,9 +0,0 @@
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
# vim: set filetype=python:
# 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/.
DevToolsModules(
'EventsApp.js',
)

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

@ -1,50 +0,0 @@
/* 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 { createFactory, createElement } = require("devtools/client/shared/vendor/react");
const { Provider } = require("devtools/client/shared/vendor/react-redux");
const EventsApp = createFactory(require("./components/EventsApp"));
const { LocalizationHelper } = require("devtools/shared/l10n");
const INSPECTOR_L10N =
new LocalizationHelper("devtools/client/locales/inspector.properties");
class EventsView {
constructor(inspector, window) {
this.document = window.document;
this.inspector = inspector;
this.store = inspector.store;
this.init();
}
init() {
if (!this.inspector) {
return;
}
let eventsApp = EventsApp({});
let provider = createElement(Provider, {
id: "eventsview",
key: "eventsview",
store: this.store,
title: INSPECTOR_L10N.getStr("inspector.sidebar.eventsViewTitle")
}, eventsApp);
// Expose the provider to let inspector.js use it in setupSidebar.
this.provider = provider;
}
destroy() {
this.document = null;
this.inspector = null;
this.store = null;
}
}
module.exports = EventsView;

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

@ -1,15 +0,0 @@
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
# vim: set filetype=python:
# 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/.
DIRS += [
'actions',
'components',
'reducers',
]
DevToolsModules(
'events.js',
)

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

@ -1,19 +0,0 @@
/* 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 INITIAL_EVENTS = [];
let reducers = {
};
module.exports = function(events = INITIAL_EVENTS, action) {
let reducer = reducers[action.type];
if (!reducer) {
return events;
}
return reducer(events, action);
};

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

@ -1,7 +0,0 @@
/* 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";
exports.events = require("./events");

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

@ -1,10 +0,0 @@
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
# vim: set filetype=python:
# 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/.
DevToolsModules(
'events.js',
'index.js',
)

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

@ -840,58 +840,6 @@ Inspector.prototype = {
defaultTab == "computedview");
}
if (Services.prefs.getBoolPref("devtools.changesview.enabled")) {
// Inject a lazy loaded react tab by exposing a fake React object
// with a lazy defined Tab thanks to `panel` being a function
let changesId = "changesview";
let changesTitle = INSPECTOR_L10N.getStr("inspector.sidebar.changesViewTitle");
this.sidebar.addTab(
changesId,
changesTitle,
{
props: {
id: changesId,
title: changesTitle
},
panel: () => {
if (!this.changesview) {
const ChangesView =
this.browserRequire("devtools/client/inspector/changes/changes");
this.changesview = new ChangesView(this, this.panelWin);
}
return this.changesview.provider;
}
},
defaultTab == changesId);
}
if (Services.prefs.getBoolPref("devtools.eventsview.enabled")) {
// Inject a lazy loaded react tab by exposing a fake React object
// with a lazy defined Tab thanks to `panel` being a function
let eventsId = "eventsview";
let eventsTitle = INSPECTOR_L10N.getStr("inspector.sidebar.eventsViewTitle");
this.sidebar.addTab(
eventsId,
eventsTitle,
{
props: {
id: eventsId,
title: eventsTitle
},
panel: () => {
if (!this.eventview) {
const EventsView =
this.browserRequire("devtools/client/inspector/events/events");
this.eventsview = new EventsView(this, this.panelWin);
}
return this.eventsview.provider;
}
},
defaultTab == eventsId);
}
if (this.target.form.animationsActor) {
const animationTitle =
INSPECTOR_L10N.getStr("inspector.sidebar.animationInspectorTitle");

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

@ -6,10 +6,8 @@ DIRS += [
'animation',
'animation-old',
'boxmodel',
'changes',
'components',
'computed',
'events',
'extensions',
'flexbox',
'fonts',

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

@ -9,8 +9,6 @@
exports.animations = require("devtools/client/inspector/animation/reducers/animations");
exports.boxModel = require("devtools/client/inspector/boxmodel/reducers/box-model");
exports.changes = require("devtools/client/inspector/changes/reducers/changes");
exports.events = require("devtools/client/inspector/events/reducers/events");
exports.extensionsSidebar = require("devtools/client/inspector/extensions/reducers/sidebar");
exports.flexbox = require("devtools/client/inspector/flexbox/reducers/flexbox");
exports.fontOptions = require("devtools/client/inspector/fonts/reducers/font-options");

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

@ -405,16 +405,6 @@ inspector.sidebar.layoutViewTitle2=Layout
# name. Used to promote new/recent panels such as the layout panel.
inspector.sidebar.newBadge=new!
# LOCALIZATION NOTE (inspector.sidebar.changesViewTitle):
# This is the title shown in a tab in the side panel of the Inspector panel
# that corresponds to the tool displaying CSS changes.
inspector.sidebar.changesViewTitle=Changes
# LOCALIZATION NOTE (inspector.sidebar.eventsViewTitle):
# This is the title shown in a tab in the side panel of the Inspector panel
# that corresponds to the tool displaying the list of event listeners used in the page.
inspector.sidebar.eventsViewTitle=Events
# LOCALIZATION NOTE (inspector.sidebar.animationInspectorTitle):
# This is the title shown in a tab in the side panel of the Inspector panel
# that corresponds to the tool displaying animations defined in the page.

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

@ -75,10 +75,6 @@ pref("devtools.inspector.showAllAnonymousContent", false);
pref("devtools.inspector.flexboxHighlighter.enabled", false);
// Enable the CSS shapes highlighter
pref("devtools.inspector.shapesHighlighter.enabled", true);
// Enable the Changes View
pref("devtools.changesview.enabled", false);
// Enable the Events View
pref("devtools.eventsview.enabled", false);
// Enable the Flexbox Inspector panel
pref("devtools.flexboxinspector.enabled", false);
// Enable the new Animation Inspector in Nightly only

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

@ -6349,7 +6349,6 @@ private:
bool mInvalidated;
bool mActorWasAlive;
bool mActorDestroyed;
bool mMetadataCleanedUp;
#ifdef DEBUG
bool mAllBlobsUnmapped;
#endif
@ -7470,7 +7469,6 @@ protected:
State mState;
bool mEnforcingQuota;
const bool mDeleting;
bool mBlockedDatabaseOpen;
bool mChromeWriteAccessAllowed;
bool mFileHandleDisabled;
@ -7489,9 +7487,20 @@ public:
}
#endif
bool
DatabaseFilePathIsKnown() const
{
AssertIsOnOwningThread();
return !mDatabaseFilePath.IsEmpty();
}
const nsString&
DatabaseFilePath() const
{
AssertIsOnOwningThread();
MOZ_ASSERT(!mDatabaseFilePath.IsEmpty());
return mDatabaseFilePath;
}
@ -7527,6 +7536,9 @@ protected:
void
WaitForTransactions();
void
CleanupMetadata();
void
FinishSendResults();
@ -13687,6 +13699,11 @@ Factory::AllocPBackgroundIDBFactoryRequestParent(
actor = new DeleteDatabaseOp(this, contentParent.forget(), *commonParams);
}
gFactoryOps->AppendElement(actor);
// Balanced in CleanupMetadata() which is/must always called by SendResults().
IncreaseBusyCount();
// Transfer ownership to IPDL.
return actor.forget().take();
}
@ -13868,7 +13885,6 @@ Database::Database(Factory* aFactory,
, mInvalidated(false)
, mActorWasAlive(false)
, mActorDestroyed(false)
, mMetadataCleanedUp(false)
#ifdef DEBUG
, mAllBlobsUnmapped(false)
#endif
@ -13981,8 +13997,6 @@ Database::Invalidate()
}
MOZ_ALWAYS_TRUE(CloseInternal());
CleanupMetadata();
}
nsresult
@ -14248,22 +14262,18 @@ Database::CleanupMetadata()
{
AssertIsOnBackgroundThread();
if (!mMetadataCleanedUp) {
mMetadataCleanedUp = true;
DatabaseActorInfo* info;
MOZ_ALWAYS_TRUE(gLiveDatabaseHashtable->Get(Id(), &info));
MOZ_ALWAYS_TRUE(info->mLiveDatabases.RemoveElement(this));
DatabaseActorInfo* info;
MOZ_ALWAYS_TRUE(gLiveDatabaseHashtable->Get(Id(), &info));
MOZ_ALWAYS_TRUE(info->mLiveDatabases.RemoveElement(this));
if (info->mLiveDatabases.IsEmpty()) {
MOZ_ASSERT(!info->mWaitingFactoryOp ||
!info->mWaitingFactoryOp->HasBlockedDatabases());
gLiveDatabaseHashtable->Remove(Id());
}
// Match the IncreaseBusyCount in OpenDatabaseOp::EnsureDatabaseActor().
DecreaseBusyCount();
if (info->mLiveDatabases.IsEmpty()) {
MOZ_ASSERT(!info->mWaitingFactoryOp ||
!info->mWaitingFactoryOp->HasBlockedDatabases());
gLiveDatabaseHashtable->Remove(Id());
}
// Match the IncreaseBusyCount in OpenDatabaseOp::EnsureDatabaseActor().
DecreaseBusyCount();
}
bool
@ -17888,22 +17898,16 @@ QuotaClient::ShutdownWorkThreads()
mShutdownRequested = true;
// Shutdown maintenance thread pool (this spins the event loop until all
// threads are gone). This should release any maintenance related quota
// objects.
if (mMaintenanceThreadPool) {
mMaintenanceThreadPool->Shutdown();
mMaintenanceThreadPool = nullptr;
}
AbortOperations(VoidCString());
// Let any runnables dispatched from dying maintenance threads to be
// processed. This should release any maintenance related directory locks.
if (mCurrentMaintenance) {
MOZ_ALWAYS_TRUE(SpinEventLoopUntil([&]() {
return !mCurrentMaintenance;
}));
}
// This should release any IDB related quota objects or directory locks.
MOZ_ALWAYS_TRUE(SpinEventLoopUntil([&]() {
return (!gFactoryOps || gFactoryOps->IsEmpty()) &&
(!gLiveDatabaseHashtable || !gLiveDatabaseHashtable->Count()) &&
!mCurrentMaintenance;
}));
// And finally, shutdown all threads.
RefPtr<ConnectionPool> connectionPool = gConnectionPool.get();
if (connectionPool) {
connectionPool->Shutdown();
@ -17918,6 +17922,11 @@ QuotaClient::ShutdownWorkThreads()
gFileHandleThreadPool = nullptr;
}
if (mMaintenanceThreadPool) {
mMaintenanceThreadPool->Shutdown();
mMaintenanceThreadPool = nullptr;
}
}
void
@ -18651,7 +18660,9 @@ Maintenance::BeginDatabaseMaintenance()
for (uint32_t index = gFactoryOps->Length(); index > 0; index--) {
RefPtr<FactoryOp>& existingOp = (*gFactoryOps)[index - 1];
MOZ_ASSERT(!existingOp->DatabaseFilePath().IsEmpty());
if (!existingOp->DatabaseFilePathIsKnown()) {
continue;
}
if (existingOp->DatabaseFilePath() == aDatabasePath) {
return false;
@ -20698,7 +20709,6 @@ FactoryOp::FactoryOp(Factory* aFactory,
, mState(State::Initial)
, mEnforcingQuota(true)
, mDeleting(aDeleting)
, mBlockedDatabaseOpen(false)
, mChromeWriteAccessAllowed(false)
, mFileHandleDisabled(false)
{
@ -20841,18 +20851,20 @@ FactoryOp::DirectoryOpen()
MOZ_ASSERT(mState == State::DirectoryOpenPending);
MOZ_ASSERT(mDirectoryLock);
MOZ_ASSERT(!mDatabaseFilePath.IsEmpty());
// gFactoryOps could be null here if the child process crashed or something
// and that cleaned up the last Factory actor.
if (!gFactoryOps) {
return NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR;
}
MOZ_ASSERT(gFactoryOps);
// See if this FactoryOp needs to wait.
bool delayed = false;
bool foundThis = false;
for (uint32_t index = gFactoryOps->Length(); index > 0; index--) {
RefPtr<FactoryOp>& existingOp = (*gFactoryOps)[index - 1];
if (MustWaitFor(*existingOp)) {
if (existingOp == this) {
foundThis = true;
continue;
}
if (foundThis && MustWaitFor(*existingOp)) {
// Only one op can be delayed.
MOZ_ASSERT(!existingOp->mDelayedOp);
existingOp->mDelayedOp = this;
@ -20861,10 +20873,6 @@ FactoryOp::DirectoryOpen()
}
}
// Adding this to the factory ops list will block any additional ops from
// proceeding until this one is done.
gFactoryOps->AppendElement(this);
if (!delayed) {
QuotaClient* quotaClient = QuotaClient::GetInstance();
MOZ_ASSERT(quotaClient);
@ -20879,11 +20887,6 @@ FactoryOp::DirectoryOpen()
}
}
mBlockedDatabaseOpen = true;
// Balanced in FinishSendResults().
IncreaseBusyCount();
mState = State::DatabaseOpenPending;
if (!delayed) {
nsresult rv = DatabaseOpen();
@ -20938,6 +20941,22 @@ FactoryOp::WaitForTransactions()
helper->WaitForTransactions();
}
void
FactoryOp::CleanupMetadata()
{
AssertIsOnOwningThread();
if (mDelayedOp) {
MOZ_ALWAYS_SUCCEEDS(NS_DispatchToCurrentThread(mDelayedOp.forget()));
}
MOZ_ASSERT(gFactoryOps);
gFactoryOps->RemoveElement(this);
// Match the IncreaseBusyCount in AllocPBackgroundIDBFactoryRequestParent().
DecreaseBusyCount();
}
void
FactoryOp::FinishSendResults()
{
@ -20949,18 +20968,6 @@ FactoryOp::FinishSendResults()
RefPtr<Factory> factory;
mFactory.swap(factory);
if (mBlockedDatabaseOpen) {
if (mDelayedOp) {
MOZ_ALWAYS_SUCCEEDS(NS_DispatchToCurrentThread(mDelayedOp.forget()));
}
MOZ_ASSERT(gFactoryOps);
gFactoryOps->RemoveElement(this);
// Match the IncreaseBusyCount in DirectoryOpen().
DecreaseBusyCount();
}
mState = State::Completed;
}
@ -22442,7 +22449,10 @@ OpenDatabaseOp::SendResults()
// Make sure to release the database on this thread.
mDatabase = nullptr;
CleanupMetadata();
} else if (mDirectoryLock) {
// ConnectionClosedCallback will call CleanupMetadata().
nsCOMPtr<nsIRunnable> callback = NewRunnableMethod(
"dom::indexedDB::OpenDatabaseOp::ConnectionClosedCallback",
this,
@ -22451,6 +22461,8 @@ OpenDatabaseOp::SendResults()
RefPtr<WaitForTransactionsHelper> helper =
new WaitForTransactionsHelper(mDatabaseId, callback);
helper->WaitForTransactions();
} else {
CleanupMetadata();
}
FinishSendResults();
@ -22464,6 +22476,8 @@ OpenDatabaseOp::ConnectionClosedCallback()
MOZ_ASSERT(mDirectoryLock);
mDirectoryLock = nullptr;
CleanupMetadata();
}
void
@ -23117,6 +23131,8 @@ DeleteDatabaseOp::SendResults()
mDirectoryLock = nullptr;
CleanupMetadata();
FinishSendResults();
}

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

@ -84,10 +84,14 @@ function* testSteps()
request.onsuccess = grabEventAndContinueHandler;
event = yield undefined;
is(event.type, "upgradeneeded", "Got correct event type");
db = event.target.result;
db.onerror = errorHandler;
is(event.type, "upgradeneeded", "Got correct event type");
event = yield undefined;
is(event.type, "success", "Got correct event type");
is(db.name, name, "Correct name");
is(db.version, version, "Correct version");

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

@ -258,6 +258,15 @@ public:
*/
bool GetDeviceColor(mozilla::gfx::Color& aColorOut);
/**
* Returns true if color is neither opaque nor transparent (i.e. alpha is not 0
* or 1), and false otherwise. If true, aColorOut is set on output.
*/
bool HasNonOpaqueNonTransparentColor(mozilla::gfx::Color& aColorOut) {
return GetDeviceColor(aColorOut) &&
0.f < aColorOut.a && aColorOut.a < 1.f;
}
/**
* Set a solid color in the sRGB color space to use for drawing.
* If CMS is not enabled, the color is treated as a device-space color

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

@ -2168,16 +2168,18 @@ gfxFont::Draw(const gfxTextRun *aTextRun, uint32_t aStart, uint32_t aEnd,
fontParams.needsOblique = IsSyntheticOblique();
fontParams.haveSVGGlyphs = GetFontEntry()->TryGetSVGData(this);
if (fontParams.haveSVGGlyphs && textDrawer) {
textDrawer->FoundUnsupportedFeature();
return;
}
fontParams.haveColorGlyphs = GetFontEntry()->TryGetColorGlyphs();
fontParams.contextPaint = aRunParams.runContextPaint;
if (textDrawer) {
Color color;
if (fontParams.haveSVGGlyphs ||
(fontParams.haveColorGlyphs &&
aRunParams.context->HasNonOpaqueNonTransparentColor(color))) {
textDrawer->FoundUnsupportedFeature();
return;
}
fontParams.isVerticalFont = aRunParams.isVerticalRun;
} else {
fontParams.isVerticalFont =

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

@ -51,7 +51,7 @@ gfxGDIFont::gfxGDIFont(GDIFontEntry *aFontEntry,
mSpaceGlyph(0),
mScriptCache(nullptr)
{
mNeedsBold = aFontStyle->NeedsSyntheticBold(aFontEntry);
mNeedsSyntheticBold = aFontStyle->NeedsSyntheticBold(aFontEntry);
Initialize();
@ -222,7 +222,7 @@ gfxGDIFont::Initialize()
// (bug 724231) for local user fonts, we don't use GDI's synthetic bold,
// as it could lead to a different, incompatible face being used
// but instead do our own multi-striking
if (mNeedsBold && GetFontEntry()->IsLocalUserFont()) {
if (mNeedsSyntheticBold && GetFontEntry()->IsLocalUserFont()) {
mApplySyntheticBold = true;
}
@ -457,13 +457,13 @@ gfxGDIFont::FillLogFont(LOGFONTW& aLogFont, gfxFloat aSize)
} else {
// avoid GDI synthetic bold which occurs when weight
// specified is >= font data weight + 200
weight = mNeedsBold ? 700 : 200;
weight = mNeedsSyntheticBold ? 700 : 200;
}
} else {
// GDI doesn't support variation fonts, so for system fonts we know
// that the entry has only a single weight, not a range.
MOZ_ASSERT(fe->Weight().IsSingle());
weight = mNeedsBold ? 700 : fe->Weight().Min().ToIntRounded();
weight = mNeedsSyntheticBold ? 700 : fe->Weight().Min().ToIntRounded();
}
fe->FillLogFont(&aLogFont, weight, aSize);

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

@ -98,7 +98,7 @@ protected:
Metrics *mMetrics;
uint32_t mSpaceGlyph;
bool mNeedsBold;
bool mNeedsSyntheticBold;
// cache of glyph IDs (used for non-sfnt fonts only)
mozilla::UniquePtr<nsDataHashtable<nsUint32HashKey,uint32_t> > mGlyphIDs;

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

@ -547,19 +547,6 @@ HasSyntheticBoldOrColor(const gfxTextRun *aRun, gfxTextRun::Range aRange)
return false;
}
// Returns true if color is neither opaque nor transparent (i.e. alpha is not 0
// or 1), and false otherwise. If true, aCurrentColorOut is set on output.
static bool
HasNonOpaqueNonTransparentColor(gfxContext *aContext, Color& aCurrentColorOut)
{
if (aContext->GetDeviceColor(aCurrentColorOut)) {
if (0.f < aCurrentColorOut.a && aCurrentColorOut.a < 1.f) {
return true;
}
}
return false;
}
// helper class for double-buffering drawing with non-opaque color
struct MOZ_STACK_CLASS BufferAlphaColor {
explicit BufferAlphaColor(gfxContext *aContext)
@ -635,7 +622,7 @@ gfxTextRun::Draw(Range aRange, gfx::Point aPt, const DrawParams& aParams) const
bool needToRestore = false;
if (aParams.drawMode & DrawMode::GLYPH_FILL &&
HasNonOpaqueNonTransparentColor(aParams.context, currentColor) &&
aParams.context->HasNonOpaqueNonTransparentColor(currentColor) &&
HasSyntheticBoldOrColor(this, aRange) &&
!aParams.context->GetTextDrawer()) {

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

@ -154,7 +154,7 @@ AddNativeFontHandle(WrFontKey aKey, void* aHandle, uint32_t aIndex) {
if (i == sFontDataTable.end()) {
FontTemplate& font = sFontDataTable[aKey];
#ifdef XP_MACOSX
font.mUnscaledFont = new UnscaledFontMac(reinterpret_cast<CGFontRef>(aHandle), true);
font.mUnscaledFont = new UnscaledFontMac(reinterpret_cast<CGFontRef>(aHandle), false);
#elif defined(XP_WIN)
font.mUnscaledFont = new UnscaledFontDWrite(reinterpret_cast<IDWriteFontFace*>(aHandle), nullptr);
#elif defined(ANDROID)

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

@ -29,7 +29,7 @@ class AccessibleCaretCursorModeTestCase(MarionetteTestCase):
_contenteditable_id = 'contenteditable'
# Test html files.
_cursor_html = 'test_carets_cursor.html'
_cursor_html = 'layout/test_carets_cursor.html'
def setUp(self):
# Code to execute before every test is running.
@ -202,7 +202,7 @@ class AccessibleCaretCursorModeTestCase(MarionetteTestCase):
self.assertNotEqual(non_target_content, sel.content)
def test_drag_caret_from_front_to_end_across_columns(self):
self.open_test_html('test_carets_columns.html')
self.open_test_html('layout/test_carets_columns.html')
el = self.marionette.find_element(By.ID, 'columns-inner')
sel = SelectionManager(el)
content_to_add = '!'

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

@ -40,12 +40,12 @@ class AccessibleCaretSelectionModeTestCase(MarionetteTestCase):
_non_selectable_id = 'non-selectable'
# Test html files.
_selection_html = 'test_carets_selection.html'
_multipleline_html = 'test_carets_multipleline.html'
_multiplerange_html = 'test_carets_multiplerange.html'
_longtext_html = 'test_carets_longtext.html'
_iframe_html = 'test_carets_iframe.html'
_display_none_html = 'test_carets_display_none.html'
_selection_html = 'layout/test_carets_selection.html'
_multipleline_html = 'layout/test_carets_multipleline.html'
_multiplerange_html = 'layout/test_carets_multiplerange.html'
_longtext_html = 'layout/test_carets_longtext.html'
_iframe_html = 'layout/test_carets_iframe.html'
_display_none_html = 'layout/test_carets_display_none.html'
def setUp(self):
# Code to execute before every test is running.

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

@ -23,12 +23,10 @@ ExternalAppService.prototype = {
doContent(mimeType, request, context, forceSave) {
const channel = request.QueryInterface(Ci.nsIChannel);
const mm = context.QueryInterface(Ci.nsIDocShell).tabChild.messageManager;
debug `doContent: uri=${channel.URI.displaySpec}
contentType=${channel.contentType}`;
EventDispatcher.forMessageManager(mm).sendRequest({
GeckoViewUtils.getDispatcherForWindow(context).sendRequest({
type: "GeckoView:ExternalResponse",
uri: channel.URI.displaySpec,
contentType: channel.contentType,

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

@ -2847,7 +2847,7 @@ public class GeckoSession extends LayerSession
id = media.getString("id");
rawId = media.getString("rawId");
name = media.getString("name");
source = getSourceFromString(media.getString("source"));
source = getSourceFromString(media.getString("mediaSource"));
type = getTypeFromString(media.getString("type"));
}
}

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

@ -229,6 +229,13 @@ case "$target" in
WIN_UCRT_REDIST_DIR=`cd "$WIN_UCRT_REDIST_DIR" && pwd -W`
fi
if test -n "$WIN_DIA_SDK_BIN_DIR"; then
if test ! -d "$WIN_DIA_SDK_BIN_DIR"; then
AC_MSG_ERROR([Invalid Windows DIA SDK directory: ${WIN_DIA_SDK_BIN_DIR}])
fi
WIN_DIA_SDK_BIN_DIR=`cd "$WIN_DIA_SDK_BIN_DIR" && pwd -W`
fi
AC_SUBST(MSVC_HAS_DIA_SDK)
AC_SUBST(MSVC_C_RUNTIME_DLL)
AC_SUBST(MSVC_CXX_RUNTIME_DLL)
@ -4407,6 +4414,7 @@ fi
dnl win32 options
AC_SUBST(WIN32_REDIST_DIR)
AC_SUBST(WIN_UCRT_REDIST_DIR)
AC_SUBST(WIN_DIA_SDK_BIN_DIR)
dnl ========================================================
dnl ICU Support

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

@ -699,29 +699,22 @@ nsNSSComponent::MaybeEnableFamilySafetyCompatibility()
if (familySafetyMode > 2) {
familySafetyMode = 0;
}
Telemetry::Accumulate(Telemetry::FAMILY_SAFETY, familySafetyMode);
if (familySafetyMode == 0) {
return;
}
bool familySafetyEnabled;
nsresult rv = AccountHasFamilySafetyEnabled(familySafetyEnabled);
if (NS_FAILED(rv)) {
Telemetry::Accumulate(Telemetry::FAMILY_SAFETY, 3);
return;
}
if (!familySafetyEnabled) {
Telemetry::Accumulate(Telemetry::FAMILY_SAFETY, 4);
return;
}
Telemetry::Accumulate(Telemetry::FAMILY_SAFETY, 5);
if (familySafetyMode == 2) {
rv = LoadFamilySafetyRoot();
if (NS_FAILED(rv)) {
Telemetry::Accumulate(Telemetry::FAMILY_SAFETY, 6);
MOZ_LOG(gPIPNSSLog, LogLevel::Debug,
("failed to load Family Safety root"));
} else {
Telemetry::Accumulate(Telemetry::FAMILY_SAFETY, 7);
}
}
#endif // XP_WIN

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

@ -56,12 +56,6 @@ use style_adjuster::StyleAdjuster;
pub use self::declaration_block::*;
#[cfg(feature = "gecko")]
#[macro_export]
macro_rules! property_name {
($s: tt) => { atom!($s) }
}
<%!
from data import Method, Keyword, to_rust_ident, to_camel_case, SYSTEM_FONT_LONGHANDS
import os.path

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

@ -936,7 +936,9 @@ class AndroidArguments(ArgumentContainer):
f.close()
if not options.robocopApk and build_obj:
options.robocopApk = build_obj.substs.get('GRADLE_ANDROID_APP_ANDROIDTEST_APK')
apk = build_obj.substs.get('GRADLE_ANDROID_APP_ANDROIDTEST_APK')
if apk and os.path.exists(apk):
options.robocopApk = apk
if options.robocopApk != "":
if not os.path.exists(options.robocopApk):

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

@ -7,7 +7,7 @@ Installation
TPS requires several packages to operate properly. To install TPS and
required packages, use the INSTALL.sh script, provided:
./INSTALL.sh /path/to/create/virtualenv
python create_venv.py /path/to/create/virtualenv
This script will create a virtalenv and install TPS into it. TPS can then
be run by activating the virtualenv and executing:

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

@ -38,7 +38,7 @@ See runtps --help for all options
# Link to the folder, which contains the zip archives of virtualenv
URL_VIRTUALENV = 'https://codeload.github.com/pypa/virtualenv/zip/'
VERSION_VIRTUALENV = '1.11.6'
VERSION_VIRTUALENV = '15.0.0'
if sys.platform == 'win32':

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

@ -6,7 +6,7 @@
from setuptools import setup, find_packages
import sys
version = '0.5'
version = '0.6'
deps = ['httplib2 == 0.9.2',
'mozfile == 1.2',
@ -14,8 +14,8 @@ deps = ['httplib2 == 0.9.2',
'mozinfo == 0.10',
'mozinstall == 1.15',
'mozprocess == 0.26',
'mozprofile == 1.0.0',
'mozrunner == 6.15',
'mozprofile == 1.1.0',
'mozrunner == 7.0.1',
'mozversion == 1.5',
]

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

@ -1,31 +0,0 @@
[redirect-mode-worker.html]
[Redirect 301 in follow redirect and cors mode]
expected: FAIL
[Redirect 301 in follow redirect and no-cors mode]
expected: FAIL
[Redirect 302 in follow redirect and cors mode]
expected: FAIL
[Redirect 302 in follow redirect and no-cors mode]
expected: FAIL
[Redirect 303 in follow redirect and cors mode]
expected: FAIL
[Redirect 303 in follow redirect and no-cors mode]
expected: FAIL
[Redirect 307 in follow redirect and cors mode]
expected: FAIL
[Redirect 307 in follow redirect and no-cors mode]
expected: FAIL
[Redirect 308 in follow redirect and cors mode]
expected: FAIL
[Redirect 308 in follow redirect and no-cors mode]
expected: FAIL

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

@ -1,31 +0,0 @@
[redirect-mode.html]
[Redirect 301 in follow redirect and cors mode]
expected: FAIL
[Redirect 301 in follow redirect and no-cors mode]
expected: FAIL
[Redirect 302 in follow redirect and cors mode]
expected: FAIL
[Redirect 302 in follow redirect and no-cors mode]
expected: FAIL
[Redirect 303 in follow redirect and cors mode]
expected: FAIL
[Redirect 303 in follow redirect and no-cors mode]
expected: FAIL
[Redirect 307 in follow redirect and cors mode]
expected: FAIL
[Redirect 307 in follow redirect and no-cors mode]
expected: FAIL
[Redirect 308 in follow redirect and cors mode]
expected: FAIL
[Redirect 308 in follow redirect and no-cors mode]
expected: FAIL

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

@ -1,19 +0,0 @@
[fetch-event-redirect.https.html]
[Non-navigation, manual redirect, no-cors mode Request redirected to same-origin without credentials should fail]
expected: FAIL
[Non-navigation, manual redirect, no-cors mode Request redirected to no-cors without credentials should fail]
expected: FAIL
[Non-navigation, manual redirect, no-cors mode Request redirected to cors without credentials should fail]
expected: FAIL
[Non-navigation, manual redirect, no-cors mode Request redirected to same-origin with credentials should fail]
expected: FAIL
[Non-navigation, manual redirect, no-cors mode Request redirected to no-cors with credentials should fail]
expected: FAIL
[Non-navigation, manual redirect, no-cors mode Request redirected to cors with credentials should fail]
expected: FAIL

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

@ -116,8 +116,6 @@ const MAX_PHASES = 65;
const LOGGER_NAME = "Toolkit.Telemetry";
function limitProperties(name, obj, count, log) {
log.trace("limitProperties");
// If there are too many properties delete all/most of them. We don't
// expect this ever to happen.
let num_properties = Object.keys(obj).length;

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

@ -489,15 +489,6 @@
"n_values": 10,
"description": "GPU Device Reset Reason (ok, hung, removed, reset, internal error, invalid call, out of memory)"
},
"FAMILY_SAFETY": {
"record_in_processes": ["main", "content"],
"alert_emails": ["seceng-telemetry@mozilla.com"],
"expires_in_version": "60",
"kind": "enumerated",
"n_values": 16,
"bug_numbers": [1239166],
"description": "Status of Family Safety detection and remediation. See nsNSSComponent.cpp."
},
"FETCH_IS_MAINTHREAD": {
"record_in_processes": ["main", "content"],
"expires_in_version": "50",

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

@ -78,6 +78,10 @@ endif
ifdef LLVM_SYMBOLIZER
JSSHELL_BINS += $(notdir $(LLVM_SYMBOLIZER))
# On Windows, llvm-symbolizer depends on the MS DIA library.
ifdef WIN_DIA_SDK_BIN_DIR
JSSHELL_BINS += msdia140.dll
endif
endif
ifdef MOZ_CLANG_RT_ASAN_LIB_PATH
JSSHELL_BINS += $(notdir $(MOZ_CLANG_RT_ASAN_LIB_PATH))