Merge mozilla-central to autoland. a=merge CLOSED TREE

This commit is contained in:
Gurzau Raul 2018-10-20 01:09:52 +03:00
Родитель 79e386d9fd 4d53dddc7a
Коммит 8e9ffaaf06
14 изменённых файлов: 78 добавлений и 21 удалений

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

@ -151,6 +151,10 @@ export default class BasicCardForm extends PaymentStateSubscriberMixin(PaymentRe
return;
}
if (!basicCardPage.selectedStateKey) {
throw new Error("A `selectedStateKey` is required");
}
let editing = !!basicCardPage.guid;
this.cancelButton.textContent = this.dataset.cancelButtonLabel;
this.backButton.textContent = this.dataset.backButtonLabel;

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

@ -17,7 +17,7 @@ export let requestStore = new PaymentsStore({
"basic-card-page": {
guid: null,
// preserveFieldValues: true,
selectedStateKey: null,
selectedStateKey: "selectedPaymentCard",
},
"address-page": {
guid: null,

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

@ -167,6 +167,9 @@ var paymentRequest = {
id: "basic-card-page",
onboardingWizard: true,
};
state["basic-card-page"] = {
selectedStateKey: "selectedPaymentCard",
};
}
paymentDialog.setStateFromParent(state);

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

@ -14,9 +14,9 @@ skip-if = os == 'linux' && debug # bug 1465673
[browser_change_shipping.js]
[browser_dropdowns.js]
[browser_host_name.js]
[browser_onboarding_wizard.js]
[browser_openPreferences.js]
[browser_payment_completion.js]
[browser_payments_onboarding_wizard.js]
[browser_profile_storage.js]
[browser_request_serialization.js]
[browser_request_shipping.js]

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

@ -93,6 +93,7 @@ add_task(async function test_backButton() {
id: "basic-card-page",
},
"basic-card-page": {
selectedStateKey: "selectedPaymentCard",
},
});
await form.promiseReady;
@ -369,6 +370,7 @@ add_task(async function test_edit() {
},
"basic-card-page": {
guid: card1.guid,
selectedStateKey: "selectedPaymentCard",
},
savedAddresses: {
[address1.guid]: deepClone(address1),
@ -422,6 +424,7 @@ add_task(async function test_edit() {
},
"basic-card-page": {
guid: minimalCard.guid,
selectedStateKey: "selectedPaymentCard",
},
savedBasicCards: {
[minimalCard.guid]: deepClone(minimalCard),
@ -439,6 +442,7 @@ add_task(async function test_edit() {
},
"basic-card-page": {
guid: null,
selectedStateKey: "selectedPaymentCard",
},
});
await asyncElementRendered();
@ -526,6 +530,7 @@ add_task(async function test_numberCustomValidityReset() {
id: "basic-card-page",
},
"basic-card-page": {
selectedStateKey: "selectedPaymentCard",
},
});
@ -551,6 +556,7 @@ add_task(async function test_noCardNetworkSelected() {
},
"basic-card-page": {
guid: card1.guid,
selectedStateKey: "selectedPaymentCard",
},
savedBasicCards: {
[card1.guid]: deepClone(card1),

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

@ -711,14 +711,6 @@ async function sanitizeSessionPrincipals() {
return;
}
// When PREF_COOKIE_LIFETIME is set to ACCEPT_SESSION, any new cookie will be
// marked as session only. But we don't touch the existing ones. For this
// reason, here we delete any existing cookie, at shutdown.
await new Promise(resolve => {
Services.clearData.deleteData(Ci.nsIClearDataService.CLEAR_COOKIES,
resolve);
});
let principals = await new Promise(resolve => {
quotaManagerService.getUsage(request => {
if (request.resultCode != Cr.NS_OK) {

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

@ -18,6 +18,7 @@ NS_IMPL_RELEASE(MemoryBlobImpl::DataOwnerAdapter)
NS_INTERFACE_MAP_BEGIN(MemoryBlobImpl::DataOwnerAdapter)
NS_INTERFACE_MAP_ENTRY(nsIInputStream)
NS_INTERFACE_MAP_ENTRY(nsISeekableStream)
NS_INTERFACE_MAP_ENTRY(nsITellableStream)
NS_INTERFACE_MAP_ENTRY(nsICloneableInputStream)
NS_INTERFACE_MAP_ENTRY_CONDITIONAL(nsIIPCSerializableInputStream,
mSerializableInputStream)

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

@ -79,9 +79,34 @@ protected:
nsDeviceContext* mContext; // owner
RefPtr<nsAtom> mLocaleLanguage;
// We don't allow this array to grow beyond kMaxCacheEntries,
// so use an autoarray to avoid separate allocation.
AutoTArray<nsFontMetrics*,kMaxCacheEntries> mFontMetrics;
// We may not flush older entries immediately the array reaches
// kMaxCacheEntries length, because this usually happens on a stylo
// thread where we can't safely delete metrics objects. So we allocate an
// oversized autoarray buffer here, so that we're unlikely to overflow
// it and need separate heap allocation before the flush happens on the
// main thread.
AutoTArray<nsFontMetrics*,kMaxCacheEntries*2> mFontMetrics;
bool mFlushPending = false;
class FlushFontMetricsTask : public mozilla::Runnable
{
public:
explicit FlushFontMetricsTask(nsFontCache* aCache)
: mozilla::Runnable("FlushFontMetricsTask")
, mCache(aCache)
{ }
NS_IMETHOD Run() override
{
// Partially flush the cache, leaving the kMaxCacheEntries/2 most
// recent entries.
mCache->Flush(mCache->mFontMetrics.Length() - kMaxCacheEntries / 2);
mCache->mFlushPending = false;
return NS_OK;
}
private:
RefPtr<nsFontCache> mCache;
};
};
NS_IMPL_ISUPPORTS(nsFontCache, nsIObserver)
@ -150,9 +175,16 @@ nsFontCache::GetMetricsFor(const nsFont& aFont,
// It's not in the cache. Get font metrics and then cache them.
// If the cache has reached its size limit, drop the older half of the
// entries.
if (n >= kMaxCacheEntries - 1) {
Flush(kMaxCacheEntries / 2);
// entries; but if we're on a stylo thread (the usual case), we have
// to post a task back to the main thread to do the flush.
if (n >= kMaxCacheEntries - 1 && !mFlushPending) {
if (NS_IsMainThread()) {
Flush(mFontMetrics.Length() - kMaxCacheEntries / 2);
} else {
mFlushPending = true;
nsCOMPtr<nsIRunnable> flushTask = new FlushFontMetricsTask(this);
MOZ_ALWAYS_SUCCEEDS(NS_DispatchToMainThread(flushTask));
}
}
nsFontMetrics::Params params = aParams;

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

@ -12,7 +12,6 @@ transforms:
job-defaults:
name: bouncer-check
description: bouncer check
run-on-projects: [] # to make sure this never runs as part of CI
worker-type: aws-provisioner-v1/gecko-{level}-b-linux
worker:
max-run-time: 1200
@ -23,6 +22,7 @@ job-defaults:
attributes:
build_platform: linux64
build_type: opt
cron: true
treeherder:
symbol: Rel(ckbouncer)
kind: test
@ -34,6 +34,7 @@ jobs:
index:
product: firefox
job-name: firefox-bouncer-check
run-on-projects: [release]
run:
config:
by-project:
@ -59,6 +60,7 @@ jobs:
devedition:
shipping-product: devedition
run-on-projects: [mozilla-beta]
index:
product: devedition
job-name: devedition-bouncer-check

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

@ -238,3 +238,8 @@ In automation, full crashsymbol package generation is normally disabled. For
build kinds where the full crashsymbols should be enabled, set this attribute
to True. The full symbol packages will then be generated and uploaded on
release branches and on try.
cron
====
Indicates that a task is meant to be run via cron tasks, and should not be run
on push.

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

@ -28,6 +28,13 @@ def filter_out_nightly(task, parameters):
return not task.attributes.get('nightly') or parameters.get('include_nightly')
def filter_out_cron(task, parameters):
"""
Filter out tasks that run via cron.
"""
return not task.attributes.get('cron')
def filter_for_project(task, parameters):
"""Filter tasks by project. Optionally enable nightlies."""
run_on_projects = set(task.attributes.get('run_on_projects', []))
@ -91,7 +98,7 @@ def filter_beta_release_tasks(task, parameters, ignore_kinds=None, allow_l10n=Fa
def standard_filter(task, parameters):
return all(
filter_func(task, parameters) for filter_func in
(filter_out_nightly, filter_for_project)
(filter_out_nightly, filter_out_cron, filter_for_project)
)
@ -568,6 +575,8 @@ def target_tasks_bouncer_check(full_task_graph, parameters, graph_config):
"""Select the set of tasks required to perform bouncer version verification.
"""
def filter(task):
if not filter_for_project(task, parameters):
return False
# For now any task in the repo-update kind is ok
return task.kind in ['cron-bouncer-check']
return [l for l, t in full_task_graph.tasks.iteritems() if filter(t)]

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

@ -55,7 +55,7 @@ class AndroidMixin(object):
@property
def device(self):
if not self._device:
if not self._device and self.adb_path:
try:
import mozdevice
self._device = mozdevice.ADBAndroid(adb=self.adb_path,
@ -63,7 +63,7 @@ class AndroidMixin(object):
verbose=True)
self.info("New mozdevice with adb=%s, device=%s" %
(self.adb_path, self.device_serial))
except Exception:
except AttributeError:
# As in adb_path, above.
pass
return self._device

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

@ -287,9 +287,11 @@ public:
// nsISeekableStream
NS_IMETHOD Seek(int32_t, int64_t) override { return NS_ERROR_NOT_IMPLEMENTED; }
NS_IMETHOD Tell(int64_t*) override { return NS_ERROR_NOT_IMPLEMENTED; }
NS_IMETHOD SetEOF() override { return NS_ERROR_NOT_IMPLEMENTED; }
// nsITellableStream
NS_IMETHOD Tell(int64_t*) override { return NS_ERROR_NOT_IMPLEMENTED; }
private:
~QIInputStream() = default;
@ -307,6 +309,7 @@ NS_INTERFACE_MAP_BEGIN(QIInputStream)
NS_INTERFACE_MAP_ENTRY_CONDITIONAL(nsICloneableInputStream, mCloneable)
NS_INTERFACE_MAP_ENTRY_CONDITIONAL(nsIIPCSerializableInputStream, mIPCSerializable)
NS_INTERFACE_MAP_ENTRY_CONDITIONAL(nsISeekableStream, mSeekable)
NS_INTERFACE_MAP_ENTRY_CONDITIONAL(nsITellableStream, mSeekable)
NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIInputStream)
NS_INTERFACE_MAP_END