зеркало из https://github.com/mozilla/gecko-dev.git
Merge m-c to autoland, a=merge
MozReview-Commit-ID: 1dQBCh5pBY6
This commit is contained in:
Коммит
b17932664d
|
@ -23,9 +23,6 @@ The following accessible states aren't translated, just ignored:
|
|||
This is supported via STATE_MULTISELECTABLE.
|
||||
STATE_PROTECTED: The object is a password-protected edit control.
|
||||
Supported via ATK_ROLE_PASSWORD_TEXT
|
||||
STATE_HASPOPUP: Object displays a pop-up menu or window when invoked.
|
||||
No ATK equivalent. The accessible state is not
|
||||
currently supported.
|
||||
STATE_PINNED: The object is pinned, usually indicating it is fixed in
|
||||
place and has permanence. No ATK equivalent. The
|
||||
accessible state is not currently supported.
|
||||
|
@ -95,7 +92,7 @@ static const AtkStateMap gAtkStateMap[] = { // Cross Platfor
|
|||
{ kNone, kMapDirectly }, // states::ALERT_MEDIUM = 1 << 27
|
||||
{ ATK_STATE_INVALID_ENTRY, kMapDirectly }, // states::INVALID = 1 << 28
|
||||
{ kNone, kMapDirectly }, // states::PROTECTED = 1 << 29
|
||||
{ kNone, kMapDirectly }, // states::HASPOPUP = 1 << 30
|
||||
{ ATK_STATE_HAS_POPUP, kMapDirectly }, // states::HASPOPUP = 1 << 30
|
||||
{ ATK_STATE_SUPPORTS_AUTOCOMPLETION, kMapDirectly }, // states::SUPPORTS_AUTOCOMPLETION = 1 << 31
|
||||
{ ATK_STATE_DEFUNCT, kMapDirectly }, // states::DEFUNCT = 1 << 32
|
||||
{ ATK_STATE_SELECTABLE_TEXT, kMapDirectly }, // states::SELECTABLE_TEXT = 1 << 33
|
||||
|
|
|
@ -123,6 +123,12 @@ RELATIONTYPE(CONTAINING_TAB_PANE,
|
|||
NAVRELATION_CONTAINING_TAB_PANE,
|
||||
IA2_RELATION_CONTAINING_TAB_PANE)
|
||||
|
||||
RELATIONTYPE(CONTAINING_WINDOW,
|
||||
"containing window",
|
||||
ATK_RELATION_NULL,
|
||||
NAVRELATION_CONTAINING_WINDOW,
|
||||
IA2_RELATION_CONTAINING_WINDOW)
|
||||
|
||||
RELATIONTYPE(CONTAINING_APPLICATION,
|
||||
"containing application",
|
||||
ATK_RELATION_NULL,
|
||||
|
@ -131,24 +137,24 @@ RELATIONTYPE(CONTAINING_APPLICATION,
|
|||
|
||||
RELATIONTYPE(DETAILS,
|
||||
"details",
|
||||
ATK_RELATION_NULL,
|
||||
ATK_RELATION_DETAILS,
|
||||
NAVRELATION_DETAILS,
|
||||
IA2_RELATION_DETAILS)
|
||||
|
||||
RELATIONTYPE(DETAILS_FOR,
|
||||
"details for",
|
||||
ATK_RELATION_NULL,
|
||||
ATK_RELATION_DETAILS_FOR,
|
||||
NAVRELATION_DETAILS_FOR,
|
||||
IA2_RELATION_DETAILS_FOR)
|
||||
|
||||
RELATIONTYPE(ERRORMSG,
|
||||
"error",
|
||||
ATK_RELATION_NULL,
|
||||
ATK_RELATION_ERROR_MESSAGE,
|
||||
NAVRELATION_ERROR,
|
||||
IA2_RELATION_ERROR)
|
||||
|
||||
RELATIONTYPE(ERRORMSG_FOR,
|
||||
"error for",
|
||||
ATK_RELATION_NULL,
|
||||
ATK_RELATION_ERROR_FOR,
|
||||
NAVRELATION_ERROR_FOR,
|
||||
IA2_RELATION_ERROR_FOR)
|
||||
|
|
|
@ -119,6 +119,11 @@ interface nsIAccessibleRelation : nsISupports
|
|||
*/
|
||||
const unsigned long RELATION_CONTAINING_TAB_PANE = 0x12;
|
||||
|
||||
/**
|
||||
* The target object is the containing window object.
|
||||
*/
|
||||
const unsigned long RELATION_CONTAINING_WINDOW = 0x13;
|
||||
|
||||
/**
|
||||
* The target object is the containing application object.
|
||||
*/
|
||||
|
|
|
@ -253,6 +253,7 @@ protected:
|
|||
NAVRELATION_NODE_PARENT_OF = 0x1010,
|
||||
NAVRELATION_CONTAINING_DOCUMENT = 0x1011,
|
||||
NAVRELATION_CONTAINING_TAB_PANE = 0x1012,
|
||||
NAVRELATION_CONTAINING_WINDOW = 0x1013,
|
||||
NAVRELATION_CONTAINING_APPLICATION = 0x1014,
|
||||
NAVRELATION_DETAILS = 0x1015,
|
||||
NAVRELATION_DETAILS_FOR = 0x1016,
|
||||
|
|
|
@ -1181,7 +1181,7 @@ BrowserGlue.prototype = {
|
|||
}
|
||||
|
||||
// Let's load the contextual identities.
|
||||
Services.tm.mainThread.idleDispatch(() => {
|
||||
Services.tm.idleDispatchToMainThread(() => {
|
||||
ContextualIdentityService.load();
|
||||
});
|
||||
|
||||
|
|
|
@ -68,9 +68,10 @@ startupRecorder.prototype = {
|
|||
Services.obs.removeObserver(this, topic);
|
||||
|
||||
if (topic == "sessionstore-windows-restored") {
|
||||
// We use idleDispatch here to record the set of loaded scripts after we
|
||||
// are fully done with startup and ready to react to user events.
|
||||
Services.tm.mainThread.idleDispatch(
|
||||
// We use idleDispatchToMainThread here to record the set of
|
||||
// loaded scripts after we are fully done with startup and ready
|
||||
// to react to user events.
|
||||
Services.tm.idleDispatchToMainThread(
|
||||
this.record.bind(this, "before handling user events"));
|
||||
} else {
|
||||
const topicsToNames = {
|
||||
|
|
|
@ -10,13 +10,9 @@
|
|||
height: 100%;
|
||||
}
|
||||
|
||||
.textPanelBox .data {
|
||||
overflow: auto;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.textPanelBox pre {
|
||||
margin: 0;
|
||||
margin: 8px;
|
||||
white-space: pre-wrap;
|
||||
font-family: var(--monospace-font-family);
|
||||
color: var(--theme-content-color1);
|
||||
}
|
||||
|
|
|
@ -10179,16 +10179,18 @@ nsDocShell::InternalLoad(nsIURI* aURI,
|
|||
// do nothing.
|
||||
}
|
||||
|
||||
// Switch to target tab if we're currently focused window.
|
||||
// Take loadDivertedInBackground into account so the behavior would be
|
||||
// the same as how the tab first opened.
|
||||
bool isTargetActive = false;
|
||||
targetDocShell->GetIsActive(&isTargetActive);
|
||||
if (mIsActive && !isTargetActive &&
|
||||
!Preferences::GetBool("browser.tabs.loadDivertedInBackground", false)) {
|
||||
if (NS_FAILED(nsContentUtils::DispatchFocusChromeEvent(
|
||||
targetDocShell->GetWindow()))) {
|
||||
return NS_ERROR_FAILURE;
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
// Switch to target tab if we're currently focused window.
|
||||
// Take loadDivertedInBackground into account so the behavior would be
|
||||
// the same as how the tab first opened.
|
||||
bool isTargetActive = false;
|
||||
targetDocShell->GetIsActive(&isTargetActive);
|
||||
nsCOMPtr<nsPIDOMWindowOuter> domWin = targetDocShell->GetWindow();
|
||||
if (mIsActive && !isTargetActive && domWin &&
|
||||
!Preferences::GetBool("browser.tabs.loadDivertedInBackground", false)) {
|
||||
if (NS_FAILED(nsContentUtils::DispatchFocusChromeEvent(domWin))) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -325,8 +325,8 @@ FetchBodyConsumer<Derived>::Create(nsIGlobalObject* aGlobal,
|
|||
}
|
||||
|
||||
RefPtr<FetchBodyConsumer<Derived>> consumer =
|
||||
new FetchBodyConsumer<Derived>(aMainThreadEventTarget, workerPrivate,
|
||||
aBody, promise, aType);
|
||||
new FetchBodyConsumer<Derived>(aMainThreadEventTarget, aGlobal,
|
||||
workerPrivate, aBody, promise, aType);
|
||||
|
||||
if (!NS_IsMainThread()) {
|
||||
MOZ_ASSERT(workerPrivate);
|
||||
|
@ -334,6 +334,22 @@ FetchBodyConsumer<Derived>::Create(nsIGlobalObject* aGlobal,
|
|||
aRv.Throw(NS_ERROR_FAILURE);
|
||||
return nullptr;
|
||||
}
|
||||
} else {
|
||||
nsCOMPtr<nsIObserverService> os = mozilla::services::GetObserverService();
|
||||
if (NS_WARN_IF(!os)) {
|
||||
aRv.Throw(NS_ERROR_FAILURE);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
aRv = os->AddObserver(consumer, DOM_WINDOW_DESTROYED_TOPIC, true);
|
||||
if (NS_WARN_IF(aRv.Failed())) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
aRv = os->AddObserver(consumer, DOM_WINDOW_FROZEN_TOPIC, true);
|
||||
if (NS_WARN_IF(aRv.Failed())) {
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIRunnable> r = new BeginConsumeBodyRunnable<Derived>(consumer);
|
||||
|
@ -351,12 +367,22 @@ FetchBodyConsumer<Derived>::ReleaseObject()
|
|||
{
|
||||
AssertIsOnTargetThread();
|
||||
|
||||
if (NS_IsMainThread()) {
|
||||
nsCOMPtr<nsIObserverService> os = mozilla::services::GetObserverService();
|
||||
if (os) {
|
||||
os->RemoveObserver(this, DOM_WINDOW_DESTROYED_TOPIC);
|
||||
os->RemoveObserver(this, DOM_WINDOW_FROZEN_TOPIC);
|
||||
}
|
||||
}
|
||||
|
||||
mGlobal = nullptr;
|
||||
mWorkerHolder = nullptr;
|
||||
mBody = nullptr;
|
||||
}
|
||||
|
||||
template <class Derived>
|
||||
FetchBodyConsumer<Derived>::FetchBodyConsumer(nsIEventTarget* aMainThreadEventTarget,
|
||||
nsIGlobalObject* aGlobalObject,
|
||||
WorkerPrivate* aWorkerPrivate,
|
||||
FetchBody<Derived>* aBody,
|
||||
Promise* aPromise,
|
||||
|
@ -364,6 +390,7 @@ FetchBodyConsumer<Derived>::FetchBodyConsumer(nsIEventTarget* aMainThreadEventTa
|
|||
: mTargetThread(NS_GetCurrentThread())
|
||||
, mMainThreadEventTarget(aMainThreadEventTarget)
|
||||
, mBody(aBody)
|
||||
, mGlobal(aGlobalObject)
|
||||
, mWorkerPrivate(aWorkerPrivate)
|
||||
, mConsumeType(aType)
|
||||
, mConsumePromise(aPromise)
|
||||
|
@ -675,5 +702,35 @@ FetchBodyConsumer<Derived>::CancelPump()
|
|||
mConsumeBodyPump->Cancel(NS_BINDING_ABORTED);
|
||||
}
|
||||
|
||||
template <class Derived>
|
||||
NS_IMETHODIMP
|
||||
FetchBodyConsumer<Derived>::Observe(nsISupports* aSubject,
|
||||
const char* aTopic,
|
||||
const char16_t* aData)
|
||||
{
|
||||
AssertIsOnMainThread();
|
||||
|
||||
MOZ_ASSERT((strcmp(aTopic, DOM_WINDOW_FROZEN_TOPIC) == 0) ||
|
||||
(strcmp(aTopic, DOM_WINDOW_DESTROYED_TOPIC) == 0));
|
||||
|
||||
nsCOMPtr<nsPIDOMWindowInner> window = do_QueryInterface(mGlobal);
|
||||
if (SameCOMIdentity(aSubject, window)) {
|
||||
ContinueConsumeBody(NS_BINDING_ABORTED, 0, nullptr);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
template <class Derived>
|
||||
NS_IMPL_ADDREF(FetchBodyConsumer<Derived>)
|
||||
|
||||
template <class Derived>
|
||||
NS_IMPL_RELEASE(FetchBodyConsumer<Derived>)
|
||||
|
||||
template <class Derived>
|
||||
NS_IMPL_QUERY_INTERFACE(FetchBodyConsumer<Derived>,
|
||||
nsIObserver,
|
||||
nsISupportsWeakReference)
|
||||
|
||||
} // namespace dom
|
||||
} // namespace mozilla
|
||||
|
|
|
@ -8,6 +8,8 @@
|
|||
#define mozilla_dom_FetchConsumer_h
|
||||
|
||||
#include "Fetch.h"
|
||||
#include "nsIObserver.h"
|
||||
#include "nsWeakReference.h"
|
||||
|
||||
class nsIThread;
|
||||
|
||||
|
@ -27,10 +29,12 @@ template <class Derived> class FetchBody;
|
|||
// In order to keep it alive all the time, we use a WorkerHolder, if created on
|
||||
// workers, plus a this consumer.
|
||||
template <class Derived>
|
||||
class FetchBodyConsumer final
|
||||
class FetchBodyConsumer final : public nsIObserver
|
||||
, public nsSupportsWeakReference
|
||||
{
|
||||
public:
|
||||
NS_INLINE_DECL_THREADSAFE_REFCOUNTING(FetchBodyConsumer<Derived>)
|
||||
NS_DECL_THREADSAFE_ISUPPORTS
|
||||
NS_DECL_NSIOBSERVER
|
||||
|
||||
static already_AddRefed<Promise>
|
||||
Create(nsIGlobalObject* aGlobal,
|
||||
|
@ -68,6 +72,7 @@ public:
|
|||
|
||||
private:
|
||||
FetchBodyConsumer(nsIEventTarget* aMainThreadEventTarget,
|
||||
nsIGlobalObject* aGlobalObject,
|
||||
workers::WorkerPrivate* aWorkerPrivate,
|
||||
FetchBody<Derived>* aBody,
|
||||
Promise* aPromise,
|
||||
|
@ -90,6 +95,8 @@ private:
|
|||
// This WorkerHolder keeps alive the consumer via a cycle.
|
||||
UniquePtr<workers::WorkerHolder> mWorkerHolder;
|
||||
|
||||
nsCOMPtr<nsIGlobalObject> mGlobal;
|
||||
|
||||
// Always set whenever the FetchBodyConsumer is created on the worker thread.
|
||||
workers::WorkerPrivate* mWorkerPrivate;
|
||||
|
||||
|
|
|
@ -7,6 +7,8 @@
|
|||
#include "IPCBlobInputStreamThread.h"
|
||||
|
||||
#include "mozilla/StaticMutex.h"
|
||||
#include "mozilla/SystemGroup.h"
|
||||
#include "mozilla/TaskCategory.h"
|
||||
#include "mozilla/ipc/BackgroundChild.h"
|
||||
#include "mozilla/ipc/PBackgroundChild.h"
|
||||
#include "nsIIPCBackgroundChildCreateCallback.h"
|
||||
|
@ -120,7 +122,10 @@ void
|
|||
IPCBlobInputStreamThread::Initialize()
|
||||
{
|
||||
if (!NS_IsMainThread()) {
|
||||
NS_DispatchToMainThread(new ThreadInitializeRunnable());
|
||||
RefPtr<Runnable> runnable = new ThreadInitializeRunnable();
|
||||
SystemGroup::Dispatch("IPCBlobInputStreamThread::Initialize",
|
||||
TaskCategory::Other,
|
||||
runnable.forget());
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -2978,17 +2978,36 @@ ContentParent::KillHard(const char* aReason)
|
|||
NS_LITERAL_CSTRING("ipc_channel_error"),
|
||||
reason);
|
||||
|
||||
// Generate the report and insert into the queue for submittal.
|
||||
if (mCrashReporter->GenerateMinidumpAndPair(this,
|
||||
nullptr,
|
||||
NS_LITERAL_CSTRING("browser")))
|
||||
{
|
||||
mCreatedPairedMinidumps = mCrashReporter->FinalizeCrashReport();
|
||||
}
|
||||
|
||||
Telemetry::Accumulate(Telemetry::SUBPROCESS_KILL_HARD, reason, 1);
|
||||
|
||||
RefPtr<ContentParent> self = this;
|
||||
std::function<void(bool)> callback = [self](bool aResult) {
|
||||
self->OnGenerateMinidumpComplete(aResult);
|
||||
};
|
||||
// Generate the report and insert into the queue for submittal.
|
||||
mCrashReporter->GenerateMinidumpAndPair(Process(),
|
||||
nullptr,
|
||||
NS_LITERAL_CSTRING("browser"),
|
||||
Move(callback),
|
||||
true);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
OnGenerateMinidumpComplete(false);
|
||||
}
|
||||
|
||||
void
|
||||
ContentParent::OnGenerateMinidumpComplete(bool aDumpResult)
|
||||
{
|
||||
#if defined(MOZ_CRASHREPORTER) && !defined(MOZ_B2G)
|
||||
if (mCrashReporter && aDumpResult) {
|
||||
// CrashReporterHost::GenerateMinidumpAndPair() is successful.
|
||||
mCreatedPairedMinidumps = mCrashReporter->FinalizeCrashReport();
|
||||
}
|
||||
#endif
|
||||
|
||||
Unused << aDumpResult; // Don't care about result if no minidump was requested.
|
||||
|
||||
ProcessHandle otherProcessHandle;
|
||||
if (!base::OpenProcessHandle(OtherPid(), &otherProcessHandle)) {
|
||||
NS_ERROR("Failed to open child process when attempting kill.");
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
#include "mozilla/dom/nsIContentParent.h"
|
||||
#include "mozilla/gfx/gfxVarReceiver.h"
|
||||
#include "mozilla/gfx/GPUProcessListener.h"
|
||||
#include "mozilla/ipc/CrashReporterHost.h"
|
||||
#include "mozilla/ipc/GeckoChildProcessHost.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "mozilla/FileUtils.h"
|
||||
|
@ -75,7 +76,6 @@ class OptionalURIParams;
|
|||
class PFileDescriptorSetParent;
|
||||
class URIParams;
|
||||
class TestShellParent;
|
||||
class CrashReporterHost;
|
||||
} // namespace ipc
|
||||
|
||||
namespace jsipc {
|
||||
|
@ -813,6 +813,8 @@ private:
|
|||
// Start the force-kill timer on shutdown.
|
||||
void StartForceKillTimer();
|
||||
|
||||
void OnGenerateMinidumpComplete(bool aDumpResult);
|
||||
|
||||
// Ensure that the permissions for the giben Permission key are set in the
|
||||
// content process.
|
||||
//
|
||||
|
|
|
@ -250,6 +250,8 @@ private:
|
|||
void SendHangNotification(const HangData& aHangData,
|
||||
const nsString& aBrowserDumpId,
|
||||
bool aTakeMinidump);
|
||||
void OnTakeFullMinidumpComplete(const HangData& aHangData,
|
||||
const nsString& aDumpId);
|
||||
|
||||
void ClearHangNotification();
|
||||
|
||||
|
@ -673,24 +675,40 @@ HangMonitorParent::SendHangNotification(const HangData& aHangData,
|
|||
// chrome process, main thread
|
||||
MOZ_RELEASE_ASSERT(NS_IsMainThread());
|
||||
|
||||
nsString dumpId;
|
||||
if ((aHangData.type() == HangData::TPluginHangData) && aTakeMinidump) {
|
||||
// We've been handed a partial minidump; complete it with plugin and
|
||||
// content process dumps.
|
||||
const PluginHangData& phd = aHangData.get_PluginHangData();
|
||||
plugins::TakeFullMinidump(phd.pluginId(), phd.contentProcessId(),
|
||||
aBrowserDumpId, dumpId);
|
||||
UpdateMinidump(phd.pluginId(), dumpId);
|
||||
|
||||
std::function<void(nsString)> callback =
|
||||
[this, aHangData](nsString aResult) {
|
||||
this->UpdateMinidump(aHangData.get_PluginHangData().pluginId(),
|
||||
aResult);
|
||||
this->OnTakeFullMinidumpComplete(aHangData, aResult);
|
||||
};
|
||||
|
||||
plugins::TakeFullMinidump(phd.pluginId(),
|
||||
phd.contentProcessId(),
|
||||
aBrowserDumpId,
|
||||
Move(callback),
|
||||
true);
|
||||
} else {
|
||||
// We already have a full minidump; go ahead and use it.
|
||||
dumpId = aBrowserDumpId;
|
||||
OnTakeFullMinidumpComplete(aHangData, aBrowserDumpId);
|
||||
}
|
||||
}
|
||||
|
||||
mProcess->SetHangData(aHangData, dumpId);
|
||||
void
|
||||
HangMonitorParent::OnTakeFullMinidumpComplete(const HangData& aHangData,
|
||||
const nsString& aDumpId)
|
||||
{
|
||||
mProcess->SetHangData(aHangData, aDumpId);
|
||||
|
||||
nsCOMPtr<nsIObserverService> observerService =
|
||||
mozilla::services::GetObserverService();
|
||||
observerService->NotifyObservers(mProcess, "process-hang-report", nullptr);
|
||||
observerService->NotifyObservers(mProcess,
|
||||
"process-hang-report",
|
||||
nullptr);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -994,12 +1012,20 @@ HangMonitoredProcess::TerminatePlugin()
|
|||
// Use the multi-process crash report generated earlier.
|
||||
uint32_t id = mHangData.get_PluginHangData().pluginId();
|
||||
base::ProcessId contentPid = mHangData.get_PluginHangData().contentProcessId();
|
||||
plugins::TerminatePlugin(id, contentPid, NS_LITERAL_CSTRING("HangMonitor"),
|
||||
mDumpId);
|
||||
|
||||
if (mActor) {
|
||||
mActor->CleanupPluginHang(id, false);
|
||||
}
|
||||
RefPtr<HangMonitoredProcess> self{this};
|
||||
std::function<void(bool)> callback =
|
||||
[self, id](bool aResult) {
|
||||
if (self->mActor) {
|
||||
self->mActor->CleanupPluginHang(id, false);
|
||||
}
|
||||
};
|
||||
|
||||
plugins::TerminatePlugin(id,
|
||||
contentPid,
|
||||
NS_LITERAL_CSTRING("HangMonitor"),
|
||||
mDumpId,
|
||||
Move(callback));
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -75,14 +75,34 @@ PaymentRequest::IsValidNumber(const nsAString& aItem,
|
|||
const nsAString& aStr,
|
||||
nsAString& aErrorMsg)
|
||||
{
|
||||
nsAutoString aValue(aStr);
|
||||
nsresult error = NS_OK;
|
||||
aValue.ToFloat(&error);
|
||||
nsresult error = NS_ERROR_FAILURE;
|
||||
|
||||
if (!aStr.IsEmpty()) {
|
||||
nsAutoString aValue(aStr);
|
||||
|
||||
// If the beginning character is '-', we will check the second one.
|
||||
int beginningIndex = (aValue.First() == '-') ? 1 : 0;
|
||||
|
||||
// Ensure
|
||||
// - the beginning character is a digit in [0-9], and
|
||||
// - the last character is not '.'
|
||||
// to follow spec:
|
||||
// https://w3c.github.io/browser-payment-api/#dfn-valid-decimal-monetary-value
|
||||
//
|
||||
// For example, ".1" is not valid for '.' is not in [0-9],
|
||||
// and " 0.1" either for beginning with ' '
|
||||
if (aValue.Last() != '.' &&
|
||||
aValue.CharAt(beginningIndex) >= '0' &&
|
||||
aValue.CharAt(beginningIndex) <= '9') {
|
||||
aValue.ToFloat(&error);
|
||||
}
|
||||
}
|
||||
|
||||
if (NS_FAILED(error)) {
|
||||
aErrorMsg.AssignLiteral("The amount.value of \"");
|
||||
aErrorMsg.Append(aItem);
|
||||
aErrorMsg.AppendLiteral("\"(");
|
||||
aErrorMsg.Append(aValue);
|
||||
aErrorMsg.Append(aStr);
|
||||
aErrorMsg.AppendLiteral(") must be a valid decimal monetary value.");
|
||||
return false;
|
||||
}
|
||||
|
@ -90,19 +110,30 @@ PaymentRequest::IsValidNumber(const nsAString& aItem,
|
|||
}
|
||||
|
||||
bool
|
||||
PaymentRequest::IsPositiveNumber(const nsAString& aItem,
|
||||
const nsAString& aStr,
|
||||
nsAString& aErrorMsg)
|
||||
PaymentRequest::IsNonNegativeNumber(const nsAString& aItem,
|
||||
const nsAString& aStr,
|
||||
nsAString& aErrorMsg)
|
||||
{
|
||||
nsAutoString aValue(aStr);
|
||||
nsresult error = NS_OK;
|
||||
float value = aValue.ToFloat(&error);
|
||||
if (NS_FAILED(error) || value < 0) {
|
||||
nsresult error = NS_ERROR_FAILURE;
|
||||
|
||||
if (!aStr.IsEmpty()) {
|
||||
nsAutoString aValue(aStr);
|
||||
// Ensure
|
||||
// - the beginning character is a digit in [0-9], and
|
||||
// - the last character is not '.'
|
||||
if (aValue.Last() != '.' &&
|
||||
aValue.First() >= '0' &&
|
||||
aValue.First() <= '9') {
|
||||
aValue.ToFloat(&error);
|
||||
}
|
||||
}
|
||||
|
||||
if (NS_FAILED(error)) {
|
||||
aErrorMsg.AssignLiteral("The amount.value of \"");
|
||||
aErrorMsg.Append(aItem);
|
||||
aErrorMsg.AppendLiteral("\"(");
|
||||
aErrorMsg.Append(aValue);
|
||||
aErrorMsg.AppendLiteral(") must be a valid and positive decimal monetary value.");
|
||||
aErrorMsg.Append(aStr);
|
||||
aErrorMsg.AppendLiteral(") must be a valid and non-negative decimal monetaryvalue.");
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
@ -112,8 +143,8 @@ bool
|
|||
PaymentRequest::IsValidDetailsInit(const PaymentDetailsInit& aDetails, nsAString& aErrorMsg)
|
||||
{
|
||||
// Check the amount.value of detail.total
|
||||
if (!IsPositiveNumber(NS_LITERAL_STRING("details.total"),
|
||||
aDetails.mTotal.mAmount.mValue, aErrorMsg)) {
|
||||
if (!IsNonNegativeNumber(NS_LITERAL_STRING("details.total"),
|
||||
aDetails.mTotal.mAmount.mValue, aErrorMsg)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -149,8 +180,8 @@ PaymentRequest::IsValidDetailsBase(const PaymentDetailsBase& aDetails, nsAString
|
|||
if (aDetails.mModifiers.WasPassed()) {
|
||||
const Sequence<PaymentDetailsModifier>& modifiers = aDetails.mModifiers.Value();
|
||||
for (const PaymentDetailsModifier& modifier : modifiers) {
|
||||
if (!IsPositiveNumber(NS_LITERAL_STRING("details.modifiers.total"),
|
||||
modifier.mTotal.mAmount.mValue, aErrorMsg)) {
|
||||
if (!IsNonNegativeNumber(NS_LITERAL_STRING("details.modifiers.total"),
|
||||
modifier.mTotal.mAmount.mValue, aErrorMsg)) {
|
||||
return false;
|
||||
}
|
||||
if (modifier.mAdditionalDisplayItems.WasPassed()) {
|
||||
|
|
|
@ -43,9 +43,9 @@ public:
|
|||
const nsAString& aStr,
|
||||
nsAString& aErrorMsg);
|
||||
static bool
|
||||
IsPositiveNumber(const nsAString& aItem,
|
||||
const nsAString& aStr,
|
||||
nsAString& aErrorMsg);
|
||||
IsNonNegativeNumber(const nsAString& aItem,
|
||||
const nsAString& aStr,
|
||||
nsAString& aErrorMsg);
|
||||
|
||||
static bool
|
||||
IsValidDetailsInit(const PaymentDetailsInit& aDetails,
|
||||
|
|
|
@ -7,3 +7,4 @@ support-files =
|
|||
|
||||
[test_canMakePayment.html]
|
||||
[test_abortPayment.html]
|
||||
[test_validate_decimal_value.html]
|
||||
|
|
|
@ -0,0 +1,154 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<!--
|
||||
https://bugzilla.mozilla.org/show_bug.cgi?id=1367669
|
||||
-->
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Test for Bug 1345367</title>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="application/javascript">
|
||||
|
||||
"use strict";
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
||||
// process total
|
||||
const invalidAmounts = [
|
||||
"-",
|
||||
"notdigits",
|
||||
"ALSONOTDIGITS",
|
||||
"10.",
|
||||
".99",
|
||||
"-10.",
|
||||
"-.99",
|
||||
"10-",
|
||||
"1-0",
|
||||
"1.0.0",
|
||||
"1/3",
|
||||
"",
|
||||
null,
|
||||
" 1.0 ",
|
||||
" 1.0 ",
|
||||
"1.0 ",
|
||||
"USD$1.0",
|
||||
"$1.0",
|
||||
{
|
||||
toString() {
|
||||
return " 1.0";
|
||||
},
|
||||
},
|
||||
];
|
||||
const invalidTotalAmounts = invalidAmounts.concat([
|
||||
"-1",
|
||||
"-1.0",
|
||||
"-1.00",
|
||||
"-1000.000",
|
||||
]);
|
||||
|
||||
|
||||
|
||||
function testInvalidTotalAmounts() {
|
||||
return new Promise((resolve, reject) => {
|
||||
for (const amount of invalidTotalAmounts) {
|
||||
try {
|
||||
new PaymentRequest(
|
||||
[
|
||||
{
|
||||
supportedMethods: ["basic-card"],
|
||||
},
|
||||
],
|
||||
{
|
||||
total: {
|
||||
label: "",
|
||||
amount: {
|
||||
currency: "USD",
|
||||
value: amount,
|
||||
},
|
||||
},
|
||||
}
|
||||
);
|
||||
|
||||
ok(false, "Should throw 'TypeError', but got resolved.");
|
||||
resolve();
|
||||
}
|
||||
catch (err) {
|
||||
is(err.name, "TypeError",
|
||||
"Expected 'TypeError', but got '" + err.name + "'");
|
||||
resolve();
|
||||
};
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function testInvalidAmounts() {
|
||||
return new Promise((resolve, reject) => {
|
||||
for (const amount of invalidAmounts) {
|
||||
try {
|
||||
new PaymentRequest(
|
||||
[
|
||||
{
|
||||
supportedMethods: ["basic-card"],
|
||||
},
|
||||
],
|
||||
{
|
||||
total: {
|
||||
label: "",
|
||||
amount: {
|
||||
currency: "USD",
|
||||
value: "1.00",
|
||||
},
|
||||
},
|
||||
displayItems: [
|
||||
{
|
||||
label: "",
|
||||
amount: {
|
||||
currency: "USD",
|
||||
value: amount,
|
||||
},
|
||||
},
|
||||
],
|
||||
}
|
||||
);
|
||||
ok(false, "Should throw 'TypeError', but got resolved.");
|
||||
resolve();
|
||||
}
|
||||
catch (err) {
|
||||
is(err.name, "TypeError",
|
||||
"Expected 'TypeError', but got '" + err.name + "'");
|
||||
resolve();
|
||||
};
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function runTests() {
|
||||
testInvalidTotalAmounts()
|
||||
.then(testInvalidAmounts)
|
||||
.then(SimpleTest.finish)
|
||||
.catch( e => {
|
||||
ok(false, "Unexpected error: " + e.name);
|
||||
SimpleTest.finish();
|
||||
});
|
||||
}
|
||||
|
||||
window.addEventListener('load', function() {
|
||||
SpecialPowers.pushPrefEnv({
|
||||
'set': [
|
||||
['dom.payments.request.enabled', true],
|
||||
]
|
||||
}, runTests);
|
||||
});
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1367669">Mozilla Bug 1367669</a>
|
||||
<p id="display"></p>
|
||||
<div id="content" style="display: none">
|
||||
|
||||
</div>
|
||||
<pre id="test">
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
|
@ -7,6 +7,8 @@
|
|||
#ifndef mozilla_plugins_PluginBridge_h
|
||||
#define mozilla_plugins_PluginBridge_h
|
||||
|
||||
#include <functional>
|
||||
|
||||
#include "base/process.h"
|
||||
|
||||
namespace mozilla {
|
||||
|
@ -39,14 +41,15 @@ void
|
|||
TakeFullMinidump(uint32_t aPluginId,
|
||||
base::ProcessId aContentProcessId,
|
||||
const nsAString& aBrowserDumpId,
|
||||
nsString& aDumpId);
|
||||
std::function<void(nsString)>&& aCallback,
|
||||
bool aAsync);
|
||||
|
||||
void
|
||||
TerminatePlugin(uint32_t aPluginId,
|
||||
base::ProcessId aContentProcessId,
|
||||
const nsCString& aMonitorDescription,
|
||||
const nsAString& aDumpId);
|
||||
|
||||
const nsAString& aDumpId,
|
||||
std::function<void(bool)>&& aCallback);
|
||||
} // namespace plugins
|
||||
} // namespace mozilla
|
||||
|
||||
|
|
|
@ -355,10 +355,13 @@ PluginHangUIParent::RecvUserResponse(const unsigned int& aResponse)
|
|||
int responseCode;
|
||||
if (aResponse & HANGUI_USER_RESPONSE_STOP) {
|
||||
// User clicked Stop
|
||||
std::function<void(bool)> callback = [](bool aResult) { };
|
||||
mModule->TerminateChildProcess(mMainThreadMessageLoop,
|
||||
mozilla::ipc::kInvalidProcessId,
|
||||
NS_LITERAL_CSTRING("ModalHangUI"),
|
||||
EmptyString());
|
||||
EmptyString(),
|
||||
mModule->DummyCallback<bool>(),
|
||||
/* aAsync = */ false);
|
||||
responseCode = 1;
|
||||
} else if(aResponse & HANGUI_USER_RESPONSE_CONTINUE) {
|
||||
mModule->OnHangUIContinue();
|
||||
|
|
|
@ -375,13 +375,19 @@ void
|
|||
mozilla::plugins::TakeFullMinidump(uint32_t aPluginId,
|
||||
base::ProcessId aContentProcessId,
|
||||
const nsAString& aBrowserDumpId,
|
||||
nsString& aDumpId)
|
||||
std::function<void(nsString)>&& aCallback,
|
||||
bool aAsync)
|
||||
{
|
||||
PluginModuleChromeParent* chromeParent =
|
||||
PluginModuleChromeParentForId(aPluginId);
|
||||
|
||||
if (chromeParent) {
|
||||
chromeParent->TakeFullMinidump(aContentProcessId, aBrowserDumpId, aDumpId);
|
||||
chromeParent->TakeFullMinidump(aContentProcessId,
|
||||
aBrowserDumpId,
|
||||
Move(aCallback),
|
||||
aAsync);
|
||||
} else {
|
||||
aCallback(EmptyString());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -389,7 +395,8 @@ void
|
|||
mozilla::plugins::TerminatePlugin(uint32_t aPluginId,
|
||||
base::ProcessId aContentProcessId,
|
||||
const nsCString& aMonitorDescription,
|
||||
const nsAString& aDumpId)
|
||||
const nsAString& aDumpId,
|
||||
std::function<void(bool)>&& aCallback)
|
||||
{
|
||||
PluginModuleChromeParent* chromeParent =
|
||||
PluginModuleChromeParentForId(aPluginId);
|
||||
|
@ -398,7 +405,11 @@ mozilla::plugins::TerminatePlugin(uint32_t aPluginId,
|
|||
chromeParent->TerminateChildProcess(MessageLoop::current(),
|
||||
aContentProcessId,
|
||||
aMonitorDescription,
|
||||
aDumpId);
|
||||
aDumpId,
|
||||
Move(aCallback),
|
||||
true); // Always runs asynchronously.
|
||||
} else {
|
||||
aCallback(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1156,10 +1167,15 @@ PluginModuleChromeParent::ShouldContinueFromReplyTimeout()
|
|||
// original plugin hang behaviour and kill the plugin container.
|
||||
FinishHangUI();
|
||||
#endif // XP_WIN
|
||||
|
||||
// Terminate the child process synchronously because this function can be
|
||||
// called in sync IPC.
|
||||
TerminateChildProcess(MessageLoop::current(),
|
||||
mozilla::ipc::kInvalidProcessId,
|
||||
NS_LITERAL_CSTRING("ModalHangUI"),
|
||||
EmptyString());
|
||||
EmptyString(),
|
||||
DummyCallback<bool>(),
|
||||
/* aAsync = */ false);
|
||||
GetIPCChannel()->CloseWithTimeout();
|
||||
return false;
|
||||
}
|
||||
|
@ -1184,56 +1200,144 @@ PluginModuleContentParent::OnExitedSyncSend()
|
|||
void
|
||||
PluginModuleChromeParent::TakeFullMinidump(base::ProcessId aContentPid,
|
||||
const nsAString& aBrowserDumpId,
|
||||
nsString& aDumpId)
|
||||
std::function<void(nsString)>&& aCallback,
|
||||
bool aAsync)
|
||||
{
|
||||
#ifdef MOZ_CRASHREPORTER
|
||||
mozilla::MutexAutoLock lock(mCrashReporterMutex);
|
||||
|
||||
if (!mCrashReporter) {
|
||||
if (!mCrashReporter || !mTakeFullMinidumpCallback.IsEmpty()) {
|
||||
aCallback(EmptyString());
|
||||
return;
|
||||
}
|
||||
mTakeFullMinidumpCallback.Init(Move(aCallback), aAsync);
|
||||
|
||||
bool reportsReady = false;
|
||||
nsString browserDumpId{aBrowserDumpId};
|
||||
|
||||
// Check to see if we already have a browser dump id - with e10s plugin
|
||||
// hangs we take this earlier (see ProcessHangMonitor) from a background
|
||||
// thread. We do this before we message the main thread about the hang
|
||||
// since the posted message will trash our browser stack state.
|
||||
nsCOMPtr<nsIFile> browserDumpFile;
|
||||
if (CrashReporter::GetMinidumpForID(aBrowserDumpId,
|
||||
getter_AddRefs(browserDumpFile))) {
|
||||
getter_AddRefs(mBrowserDumpFile))) {
|
||||
|
||||
// Hold a ref to mPlugin to keep *this* alive until the callback runs.
|
||||
RetainPluginRef();
|
||||
std::function<void(bool)> callback =
|
||||
[this, aContentPid, browserDumpId, aAsync](bool aResult) {
|
||||
if (aAsync) {
|
||||
this->mCrashReporterMutex.Lock();
|
||||
}
|
||||
|
||||
this->TakeBrowserAndPluginMinidumps(aResult,
|
||||
aContentPid,
|
||||
browserDumpId,
|
||||
aAsync);
|
||||
if (aAsync) {
|
||||
this->mCrashReporterMutex.Unlock();
|
||||
}
|
||||
|
||||
this->ReleasePluginRef();
|
||||
};
|
||||
// We have a single browser report, generate a new plugin process parent
|
||||
// report and pair it up with the browser report handed in.
|
||||
reportsReady = mCrashReporter->GenerateMinidumpAndPair(
|
||||
this,
|
||||
browserDumpFile,
|
||||
NS_LITERAL_CSTRING("browser"));
|
||||
|
||||
if (!reportsReady) {
|
||||
browserDumpFile = nullptr;
|
||||
CrashReporter::DeleteMinidumpFilesForID(aBrowserDumpId);
|
||||
}
|
||||
mCrashReporter->GenerateMinidumpAndPair(Process(), mBrowserDumpFile,
|
||||
NS_LITERAL_CSTRING("browser"),
|
||||
Move(callback), aAsync);
|
||||
} else {
|
||||
TakeBrowserAndPluginMinidumps(false, aContentPid, browserDumpId, aAsync);
|
||||
}
|
||||
#else // MOZ_CRASHREPORTER
|
||||
aCallback(NS_LITERAL_STRING(""));
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef MOZ_CRASHREPORTER
|
||||
void
|
||||
PluginModuleChromeParent::RetainPluginRef()
|
||||
{
|
||||
if (!mPlugin) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (NS_IsMainThread()) {
|
||||
mPlugin->AddRef();
|
||||
} else {
|
||||
// XXX We can't sync-dispatch to the main thread because doing that
|
||||
// deadlocks when we are called from
|
||||
// PluginHangUIParent::RecvUserResponse().
|
||||
Unused << NS_DispatchToMainThread(
|
||||
NewNonOwningRunnableMethod(mPlugin, &nsNPAPIPlugin::AddRef));
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
PluginModuleChromeParent::ReleasePluginRef()
|
||||
{
|
||||
if (!mPlugin) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (NS_IsMainThread()) {
|
||||
mPlugin->Release();
|
||||
} else {
|
||||
// Async release the reference to mPlugin.
|
||||
Unused << NS_DispatchToMainThread(
|
||||
NewNonOwningRunnableMethod(mPlugin, &nsNPAPIPlugin::Release));
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
PluginModuleChromeParent::TakeBrowserAndPluginMinidumps(bool aReportsReady,
|
||||
base::ProcessId aContentPid,
|
||||
const nsAString& aBrowserDumpId,
|
||||
bool aAsync)
|
||||
{
|
||||
mCrashReporterMutex.AssertCurrentThreadOwns();
|
||||
|
||||
// Generate crash report including plugin and browser process minidumps.
|
||||
// The plugin process is the parent report with additional dumps including
|
||||
// the browser process, content process when running under e10s, and
|
||||
// various flash subprocesses if we're the flash module.
|
||||
if (!reportsReady) {
|
||||
reportsReady = mCrashReporter->GenerateMinidumpAndPair(
|
||||
this,
|
||||
nullptr, // Pair with a dump of this process and thread.
|
||||
NS_LITERAL_CSTRING("browser"));
|
||||
}
|
||||
if (!aReportsReady) {
|
||||
mBrowserDumpFile = nullptr;
|
||||
CrashReporter::DeleteMinidumpFilesForID(aBrowserDumpId);
|
||||
|
||||
if (reportsReady) {
|
||||
aDumpId = mCrashReporter->MinidumpID();
|
||||
nsString browserDumpId{aBrowserDumpId};
|
||||
|
||||
RetainPluginRef();
|
||||
std::function<void(bool)> callback =
|
||||
[this, aContentPid, browserDumpId](bool aResult) {
|
||||
this->OnTakeFullMinidumpComplete(aResult,
|
||||
aContentPid,
|
||||
browserDumpId);
|
||||
this->ReleasePluginRef();
|
||||
};
|
||||
mCrashReporter->GenerateMinidumpAndPair(Process(),
|
||||
nullptr, // Pair with a dump of this process and thread.
|
||||
NS_LITERAL_CSTRING("browser"),
|
||||
Move(callback),
|
||||
aAsync);
|
||||
} else {
|
||||
OnTakeFullMinidumpComplete(aReportsReady, aContentPid, aBrowserDumpId);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
PluginModuleChromeParent::OnTakeFullMinidumpComplete(bool aReportsReady,
|
||||
base::ProcessId aContentPid,
|
||||
const nsAString& aBrowserDumpId)
|
||||
{
|
||||
mCrashReporterMutex.AssertCurrentThreadOwns();
|
||||
|
||||
if (aReportsReady) {
|
||||
nsString dumpId = mCrashReporter->MinidumpID();
|
||||
PLUGIN_LOG_DEBUG(
|
||||
("generated paired browser/plugin minidumps: %s)",
|
||||
NS_ConvertUTF16toUTF8(aDumpId).get()));
|
||||
("generated paired browser/plugin minidumps: %s)",
|
||||
NS_ConvertUTF16toUTF8(dumpId).get()));
|
||||
nsAutoCString additionalDumps("browser");
|
||||
nsCOMPtr<nsIFile> pluginDumpFile;
|
||||
if (GetMinidumpForID(aDumpId, getter_AddRefs(pluginDumpFile))) {
|
||||
if (GetMinidumpForID(dumpId, getter_AddRefs(pluginDumpFile))) {
|
||||
#ifdef MOZ_CRASHREPORTER_INJECTOR
|
||||
// If we have handles to the flash sandbox processes on Windows,
|
||||
// include those minidumps as well.
|
||||
|
@ -1255,34 +1359,74 @@ PluginModuleChromeParent::TakeFullMinidump(base::ProcessId aContentPid,
|
|||
}
|
||||
}
|
||||
}
|
||||
mCrashReporter->AddNote(
|
||||
NS_LITERAL_CSTRING("additional_minidumps"),
|
||||
additionalDumps);
|
||||
mCrashReporter->AddNote(NS_LITERAL_CSTRING("additional_minidumps"),
|
||||
additionalDumps);
|
||||
|
||||
mTakeFullMinidumpCallback.Invoke(mCrashReporter->MinidumpID());
|
||||
} else {
|
||||
mTakeFullMinidumpCallback.Invoke(EmptyString());
|
||||
NS_WARNING("failed to capture paired minidumps from hang");
|
||||
}
|
||||
#endif // MOZ_CRASHREPORTER
|
||||
}
|
||||
|
||||
#endif // MOZ_CRASHREPORTER
|
||||
|
||||
void
|
||||
PluginModuleChromeParent::TerminateChildProcess(MessageLoop* aMsgLoop,
|
||||
base::ProcessId aContentPid,
|
||||
const nsCString& aMonitorDescription,
|
||||
const nsAString& aDumpId)
|
||||
const nsAString& aDumpId,
|
||||
std::function<void(bool)>&& aCallback,
|
||||
bool aAsync)
|
||||
{
|
||||
if (!mTerminateChildProcessCallback.IsEmpty()) {
|
||||
aCallback(false);
|
||||
return;
|
||||
}
|
||||
mTerminateChildProcessCallback.Init(Move(aCallback), aAsync);
|
||||
|
||||
#ifdef MOZ_CRASHREPORTER
|
||||
// Start by taking a full minidump if necessary, this is done early
|
||||
// because it also needs to lock the mCrashReporterMutex and Mutex doesn't
|
||||
// support recursive locking.
|
||||
nsAutoString dumpId;
|
||||
if (aDumpId.IsEmpty()) {
|
||||
TakeFullMinidump(aContentPid, EmptyString(), dumpId);
|
||||
|
||||
RetainPluginRef();
|
||||
std::function<void(nsString)> callback =
|
||||
[this, aMsgLoop, aMonitorDescription, aAsync](nsString aResult) {
|
||||
if (aAsync) {
|
||||
this->mCrashReporterMutex.Lock();
|
||||
}
|
||||
this->TerminateChildProcessOnDumpComplete(aMsgLoop,
|
||||
aMonitorDescription);
|
||||
if (aAsync) {
|
||||
this->mCrashReporterMutex.Unlock();
|
||||
}
|
||||
|
||||
this->ReleasePluginRef();
|
||||
};
|
||||
|
||||
TakeFullMinidump(aContentPid, EmptyString(), Move(callback), aAsync);
|
||||
} else {
|
||||
TerminateChildProcessOnDumpComplete(aMsgLoop, aMonitorDescription);
|
||||
}
|
||||
|
||||
mozilla::MutexAutoLock lock(mCrashReporterMutex);
|
||||
#else
|
||||
TerminateChildProcessOnDumpComplete(aMsgLoop, aMonitorDescription);
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
PluginModuleChromeParent::TerminateChildProcessOnDumpComplete(MessageLoop* aMsgLoop,
|
||||
const nsCString& aMonitorDescription)
|
||||
{
|
||||
#ifdef MOZ_CRASHREPORTER
|
||||
mCrashReporterMutex.AssertCurrentThreadOwns();
|
||||
|
||||
if (!mCrashReporter) {
|
||||
// If mCrashReporter is null then the hang has ended, the plugin module
|
||||
// is shutting down. There's nothing to do here.
|
||||
mTerminateChildProcessCallback.Invoke(true);
|
||||
return;
|
||||
}
|
||||
mCrashReporter->AddNote(NS_LITERAL_CSTRING("PluginHang"),
|
||||
|
@ -1331,7 +1475,7 @@ PluginModuleChromeParent::TerminateChildProcess(MessageLoop* aMsgLoop,
|
|||
if (!GetProcessCpuUsage(processHandles, mPluginCpuUsageOnHang)) {
|
||||
mPluginCpuUsageOnHang.Clear();
|
||||
}
|
||||
#endif
|
||||
#endif // MOZ_CRASHREPORTER
|
||||
|
||||
// this must run before the error notification from the channel,
|
||||
// or not at all
|
||||
|
@ -1343,6 +1487,8 @@ PluginModuleChromeParent::TerminateChildProcess(MessageLoop* aMsgLoop,
|
|||
if (!childOpened || !KillProcess(geckoChildProcess, 1, false)) {
|
||||
NS_WARNING("failed to kill subprocess!");
|
||||
}
|
||||
|
||||
mTerminateChildProcessCallback.Invoke(true);
|
||||
}
|
||||
|
||||
bool
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
#include "mozilla/FileUtils.h"
|
||||
#include "mozilla/HangAnnotations.h"
|
||||
#include "mozilla/PluginLibrary.h"
|
||||
#include "mozilla/ipc/CrashReporterHost.h"
|
||||
#include "mozilla/plugins/PluginProcessParent.h"
|
||||
#include "mozilla/plugins/PPluginModuleParent.h"
|
||||
#include "mozilla/plugins/PluginMessageUtils.h"
|
||||
|
@ -38,9 +39,6 @@ class nsPluginTag;
|
|||
|
||||
namespace mozilla {
|
||||
|
||||
namespace ipc {
|
||||
class CrashReporterHost;
|
||||
} // namespace ipc
|
||||
namespace layers {
|
||||
class TextureClientRecycleAllocator;
|
||||
} // namespace layers
|
||||
|
@ -420,6 +418,10 @@ class PluginModuleChromeParent
|
|||
, public mozilla::HangMonitor::Annotator
|
||||
{
|
||||
friend class mozilla::ipc::CrashReporterHost;
|
||||
using TerminateChildProcessCallback =
|
||||
mozilla::ipc::CrashReporterHost::CallbackWrapper<bool>;
|
||||
using TakeFullMinidumpCallback =
|
||||
mozilla::ipc::CrashReporterHost::CallbackWrapper<nsString>;
|
||||
public:
|
||||
/**
|
||||
* LoadModule
|
||||
|
@ -452,12 +454,16 @@ class PluginModuleChromeParent
|
|||
* provided TakeFullMinidump will use this dump file instead of
|
||||
* generating a new one. If not provided a browser dump will be taken at
|
||||
* the time of this call.
|
||||
* @param aDumpId Returns the ID of the newly generated crash dump. Left
|
||||
* untouched upon failure.
|
||||
* @param aCallback a callback invoked when the operation completes. The ID
|
||||
* of the newly generated crash dump is provided in the callback argument.
|
||||
* An empty string will be provided upon failure.
|
||||
* @param aAsync whether to perform the dump asynchronously.
|
||||
*/
|
||||
void TakeFullMinidump(base::ProcessId aContentPid,
|
||||
const nsAString& aBrowserDumpId,
|
||||
nsString& aDumpId);
|
||||
void
|
||||
TakeFullMinidump(base::ProcessId aContentPid,
|
||||
const nsAString& aBrowserDumpId,
|
||||
std::function<void(nsString)>&& aCallback,
|
||||
bool aAsync);
|
||||
|
||||
/*
|
||||
* Terminates the plugin process associated with this plugin module. Also
|
||||
|
@ -475,11 +481,47 @@ class PluginModuleChromeParent
|
|||
* TerminateChildProcess will use this dump file instead of generating a
|
||||
* multi-process crash report. If not provided a multi-process dump will
|
||||
* be taken at the time of this call.
|
||||
* @param aCallback a callback invoked when the operation completes. The
|
||||
* argument denotes whether the operation succeeded.
|
||||
* @param aAsync whether to perform the operation asynchronously.
|
||||
*/
|
||||
void TerminateChildProcess(MessageLoop* aMsgLoop,
|
||||
base::ProcessId aContentPid,
|
||||
const nsCString& aMonitorDescription,
|
||||
const nsAString& aDumpId);
|
||||
void
|
||||
TerminateChildProcess(MessageLoop* aMsgLoop,
|
||||
base::ProcessId aContentPid,
|
||||
const nsCString& aMonitorDescription,
|
||||
const nsAString& aDumpId,
|
||||
std::function<void(bool)>&& aCallback,
|
||||
bool aAsync);
|
||||
|
||||
/**
|
||||
* Helper for passing a dummy callback in calling the above function if it
|
||||
* is called synchronously and the caller doesn't care about the callback
|
||||
* result.
|
||||
*/
|
||||
template<typename T>
|
||||
static std::function<void(T)> DummyCallback()
|
||||
{
|
||||
return std::function<void(T)>([](T aResult) { });
|
||||
}
|
||||
|
||||
private:
|
||||
#ifdef MOZ_CRASHREPORTER
|
||||
// The following methods are callbacks invoked after calling
|
||||
// TakeFullMinidump(). The methods are invoked in the following order:
|
||||
void TakeBrowserAndPluginMinidumps(bool aReportsReady,
|
||||
base::ProcessId aContentPid,
|
||||
const nsAString& aBrowserDumpId,
|
||||
bool aAsync);
|
||||
void OnTakeFullMinidumpComplete(bool aReportsReady,
|
||||
base::ProcessId aContentPid,
|
||||
const nsAString& aBrowserDumpId);
|
||||
|
||||
#endif
|
||||
// The following method is the callback invoked after calling
|
||||
// TerminateChidlProcess().
|
||||
void TerminateChildProcessOnDumpComplete(MessageLoop* aMsgLoop,
|
||||
const nsCString& aMonitorDescription);
|
||||
public:
|
||||
|
||||
#ifdef XP_WIN
|
||||
/**
|
||||
|
@ -537,6 +579,8 @@ private:
|
|||
#ifdef MOZ_CRASHREPORTER
|
||||
void ProcessFirstMinidump();
|
||||
void WriteExtraDataForMinidump();
|
||||
void RetainPluginRef();
|
||||
void ReleasePluginRef();
|
||||
#endif
|
||||
|
||||
PluginProcessParent* Process() const { return mSubprocess; }
|
||||
|
@ -666,6 +710,12 @@ private:
|
|||
#if defined(XP_WIN) && defined(MOZ_SANDBOX)
|
||||
mozilla::SandboxPermissions mSandboxPermissions;
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_CRASHREPORTER
|
||||
nsCOMPtr<nsIFile> mBrowserDumpFile;
|
||||
TakeFullMinidumpCallback mTakeFullMinidumpCallback;
|
||||
#endif
|
||||
TerminateChildProcessCallback mTerminateChildProcessCallback;
|
||||
};
|
||||
|
||||
} // namespace plugins
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -39,16 +39,8 @@ public:
|
|||
ComparisonResult(nsresult aStatus,
|
||||
bool aInCacheAndEqual,
|
||||
const nsAString& aNewCacheName,
|
||||
const nsACString& aMaxScope) = 0;
|
||||
|
||||
/*
|
||||
* Right before fetching the main script from the network, we check whether
|
||||
* the script expiration timer has expired. Via this method, we can save the
|
||||
* result of the check, and propogate it to the new ServiceWorkerInfo if there
|
||||
* is one, so the imported scripts can be affected by the result as well.
|
||||
*/
|
||||
virtual void
|
||||
SaveLoadFlags(nsLoadFlags aLoadFlags) = 0;
|
||||
const nsACString& aMaxScope,
|
||||
nsLoadFlags aLoadFlags) = 0;
|
||||
|
||||
NS_INLINE_DECL_PURE_VIRTUAL_REFCOUNTING
|
||||
};
|
||||
|
|
|
@ -98,15 +98,14 @@ public:
|
|||
ComparisonResult(nsresult aStatus,
|
||||
bool aInCacheAndEqual,
|
||||
const nsAString& aNewCacheName,
|
||||
const nsACString& aMaxScope) override
|
||||
const nsACString& aMaxScope,
|
||||
nsLoadFlags aLoadFlags) override
|
||||
{
|
||||
mJob->ComparisonResult(aStatus, aInCacheAndEqual, aNewCacheName, aMaxScope);
|
||||
}
|
||||
|
||||
virtual void
|
||||
SaveLoadFlags(nsLoadFlags aLoadFlags) override
|
||||
{
|
||||
mJob->SetLoadFlags(aLoadFlags);
|
||||
mJob->ComparisonResult(aStatus,
|
||||
aInCacheAndEqual,
|
||||
aNewCacheName,
|
||||
aMaxScope,
|
||||
aLoadFlags);
|
||||
}
|
||||
|
||||
NS_INLINE_DECL_REFCOUNTING(ServiceWorkerUpdateJob::CompareCallback, override)
|
||||
|
@ -334,17 +333,12 @@ ServiceWorkerUpdateJob::GetLoadFlags() const
|
|||
return mLoadFlags;
|
||||
}
|
||||
|
||||
void
|
||||
ServiceWorkerUpdateJob::SetLoadFlags(nsLoadFlags aLoadFlags)
|
||||
{
|
||||
mLoadFlags = aLoadFlags;
|
||||
}
|
||||
|
||||
void
|
||||
ServiceWorkerUpdateJob::ComparisonResult(nsresult aStatus,
|
||||
bool aInCacheAndEqual,
|
||||
const nsAString& aNewCacheName,
|
||||
const nsACString& aMaxScope)
|
||||
const nsACString& aMaxScope,
|
||||
nsLoadFlags aLoadFlags)
|
||||
{
|
||||
AssertIsOnMainThread();
|
||||
|
||||
|
@ -387,6 +381,8 @@ ServiceWorkerUpdateJob::ComparisonResult(nsresult aStatus,
|
|||
}
|
||||
}
|
||||
|
||||
mLoadFlags = aLoadFlags;
|
||||
|
||||
nsAutoCString defaultAllowedPrefix;
|
||||
rv = GetRequiredScopeStringPrefix(scriptURI, defaultAllowedPrefix,
|
||||
eUseDirectory);
|
||||
|
|
|
@ -73,9 +73,6 @@ protected:
|
|||
nsLoadFlags
|
||||
GetLoadFlags() const;
|
||||
|
||||
void
|
||||
SetLoadFlags(nsLoadFlags aLoadFlags);
|
||||
|
||||
private:
|
||||
class CompareCallback;
|
||||
class ContinueUpdateRunnable;
|
||||
|
@ -87,7 +84,8 @@ private:
|
|||
ComparisonResult(nsresult aStatus,
|
||||
bool aInCacheAndEqual,
|
||||
const nsAString& aNewCacheName,
|
||||
const nsACString& aMaxScope);
|
||||
const nsACString& aMaxScope,
|
||||
nsLoadFlags aLoadFlags);
|
||||
|
||||
// Utility method called after evaluating the worker script.
|
||||
void
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
/* 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";
|
||||
|
||||
function handleRequest(request, response) {
|
||||
let count = getState("count");
|
||||
if (count === "") {
|
||||
count = "1";
|
||||
}
|
||||
|
||||
// If this is the first request, return the first source.
|
||||
if (count === "1") {
|
||||
response.setHeader("Content-Type", "application/javascript");
|
||||
response.write("// Imported.");
|
||||
setState("count", "2");
|
||||
}
|
||||
// For all subsequent requests, return the second source.
|
||||
else {
|
||||
response.setStatusLine(request.httpVersion, 404, "Not found");
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
/* 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 WORKER_1 = `
|
||||
importScripts("bug1290951_worker_imported.sjs");
|
||||
`;
|
||||
|
||||
const WORKER_2 = `
|
||||
// Remove "importScripts(...)" for testing purpose.
|
||||
`;
|
||||
|
||||
function handleRequest(request, response) {
|
||||
let count = getState("count");
|
||||
if (count === "") {
|
||||
count = "1";
|
||||
}
|
||||
|
||||
// This header is necessary for making this script able to be loaded.
|
||||
response.setHeader("Content-Type", "application/javascript");
|
||||
|
||||
// If this is the first request, return the first source.
|
||||
if (count === "1") {
|
||||
response.write(WORKER_1);
|
||||
setState("count", "2");
|
||||
}
|
||||
// For all subsequent requests, return the second source.
|
||||
else {
|
||||
response.write(WORKER_2);
|
||||
}
|
||||
}
|
||||
|
|
@ -216,6 +216,8 @@ support-files =
|
|||
service_worker.js
|
||||
service_worker_client.html
|
||||
utils.js
|
||||
bug1290951_worker_main.sjs
|
||||
bug1290951_worker_imported.sjs
|
||||
|
||||
[test_bug1151916.html]
|
||||
[test_bug1240436.html]
|
||||
|
@ -315,6 +317,7 @@ tags = openwindow
|
|||
[test_third_party_iframes.html]
|
||||
[test_unregister.html]
|
||||
[test_unresolved_fetch_interception.html]
|
||||
[test_update_missing_imported_script.html]
|
||||
[test_workerUnregister.html]
|
||||
[test_workerUpdate.html]
|
||||
[test_workerupdatefoundevent.html]
|
||||
|
|
|
@ -0,0 +1,87 @@
|
|||
<!--
|
||||
Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/
|
||||
-->
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<title>Bug 1290951 - Test update after a new verion of mainscipt that doesn't need an imported script anymore.</title>
|
||||
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
|
||||
<!--
|
||||
If the principal is not set, accessing self.caches in the worker will crash.
|
||||
-->
|
||||
</head>
|
||||
<body>
|
||||
<p id="display"></p>
|
||||
<div id="content"></div>
|
||||
<pre id="test"></pre>
|
||||
<script class="testbody" type="text/javascript">
|
||||
|
||||
// We have the iframe register for its own scope so that this page is not
|
||||
// holding any references when we GC.
|
||||
function register() {
|
||||
return Promise.resolve()
|
||||
.then(_ => navigator.serviceWorker.register("http://mochi.test:8888/" +
|
||||
"tests/dom/workers/test/" +
|
||||
"serviceworkers/" +
|
||||
"bug1290951_worker_main.sjs"))
|
||||
.then(r => {
|
||||
ok(r, "Should be a registration.");
|
||||
|
||||
// Get the newest worker.
|
||||
var worker = r.installing || r.waiting || r.active;
|
||||
|
||||
// Wait for the worker becoming active.
|
||||
return new Promise(aResolve => {
|
||||
if (worker.state === "activated") {
|
||||
aResolve();
|
||||
return;
|
||||
}
|
||||
|
||||
worker.addEventListener("statechange", _ => {
|
||||
if (worker.state === "activated") {
|
||||
aResolve();
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function update() {
|
||||
return Promise.resolve()
|
||||
.then(_ => navigator.serviceWorker.getRegistration())
|
||||
.then(r => {
|
||||
return new Promise(aResolve => {
|
||||
r.addEventListener("updatefound", aResolve);
|
||||
r.update();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function unregister() {
|
||||
return Promise.resolve()
|
||||
.then(_ => navigator.serviceWorker.getRegistration())
|
||||
.then(r => r.unregister())
|
||||
}
|
||||
|
||||
function runTest() {
|
||||
register()
|
||||
.then(register)
|
||||
.then(update)
|
||||
.then(unregister)
|
||||
|
||||
.catch(e => ok(false, "Some test failed with error " + e))
|
||||
.then(SimpleTest.finish);
|
||||
}
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
SpecialPowers.pushPrefEnv({"set": [
|
||||
["dom.serviceWorkers.enabled", true],
|
||||
["dom.serviceWorkers.testing.enabled", true]
|
||||
]}, runTest);
|
||||
</script>
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -32,7 +32,9 @@ enum class CommandType : int8_t {
|
|||
MASKSURFACE,
|
||||
PUSHCLIP,
|
||||
PUSHCLIPRECT,
|
||||
PUSHLAYER,
|
||||
POPCLIP,
|
||||
POPLAYER,
|
||||
SETTRANSFORM,
|
||||
FLUSH
|
||||
};
|
||||
|
@ -543,6 +545,40 @@ private:
|
|||
Rect mRect;
|
||||
};
|
||||
|
||||
class PushLayerCommand : public DrawingCommand
|
||||
{
|
||||
public:
|
||||
PushLayerCommand(const bool aOpaque,
|
||||
const Float aOpacity,
|
||||
SourceSurface* aMask,
|
||||
const Matrix& aMaskTransform,
|
||||
const IntRect& aBounds,
|
||||
bool aCopyBackground)
|
||||
: DrawingCommand(CommandType::PUSHLAYER)
|
||||
, mOpaque(aOpaque)
|
||||
, mOpacity(aOpacity)
|
||||
, mMask(aMask)
|
||||
, mMaskTransform(aMaskTransform)
|
||||
, mBounds(aBounds)
|
||||
, mCopyBackground(aCopyBackground)
|
||||
{
|
||||
}
|
||||
|
||||
virtual void ExecuteOnDT(DrawTarget* aDT, const Matrix*) const
|
||||
{
|
||||
aDT->PushLayer(mOpaque, mOpacity, mMask,
|
||||
mMaskTransform, mBounds, mCopyBackground);
|
||||
}
|
||||
|
||||
private:
|
||||
bool mOpaque;
|
||||
float mOpacity;
|
||||
RefPtr<SourceSurface> mMask;
|
||||
Matrix mMaskTransform;
|
||||
IntRect mBounds;
|
||||
bool mCopyBackground;
|
||||
};
|
||||
|
||||
class PopClipCommand : public DrawingCommand
|
||||
{
|
||||
public:
|
||||
|
@ -557,6 +593,20 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
class PopLayerCommand : public DrawingCommand
|
||||
{
|
||||
public:
|
||||
PopLayerCommand()
|
||||
: DrawingCommand(CommandType::POPLAYER)
|
||||
{
|
||||
}
|
||||
|
||||
virtual void ExecuteOnDT(DrawTarget* aDT, const Matrix*) const
|
||||
{
|
||||
aDT->PopLayer();
|
||||
}
|
||||
};
|
||||
|
||||
class SetTransformCommand : public DrawingCommand
|
||||
{
|
||||
friend class DrawTargetCaptureImpl;
|
||||
|
|
|
@ -172,6 +172,28 @@ DrawTargetCaptureImpl::PushClipRect(const Rect& aRect)
|
|||
AppendCommand(PushClipRectCommand)(aRect);
|
||||
}
|
||||
|
||||
void
|
||||
DrawTargetCaptureImpl::PushLayer(bool aOpaque,
|
||||
Float aOpacity,
|
||||
SourceSurface* aMask,
|
||||
const Matrix& aMaskTransform,
|
||||
const IntRect& aBounds,
|
||||
bool aCopyBackground)
|
||||
{
|
||||
AppendCommand(PushLayerCommand)(aOpaque,
|
||||
aOpacity,
|
||||
aMask,
|
||||
aMaskTransform,
|
||||
aBounds,
|
||||
aCopyBackground);
|
||||
}
|
||||
|
||||
void
|
||||
DrawTargetCaptureImpl::PopLayer()
|
||||
{
|
||||
AppendCommand(PopLayerCommand)();
|
||||
}
|
||||
|
||||
void
|
||||
DrawTargetCaptureImpl::PopClip()
|
||||
{
|
||||
|
|
|
@ -24,102 +24,104 @@ public:
|
|||
|
||||
bool Init(const IntSize& aSize, DrawTarget* aRefDT);
|
||||
|
||||
virtual BackendType GetBackendType() const { return mRefDT->GetBackendType(); }
|
||||
virtual DrawTargetType GetType() const { return mRefDT->GetType(); }
|
||||
|
||||
virtual bool IsCaptureDT() const { return true; }
|
||||
|
||||
virtual already_AddRefed<SourceSurface> Snapshot();
|
||||
|
||||
virtual void DetachAllSnapshots();
|
||||
|
||||
virtual IntSize GetSize() { return mSize; }
|
||||
|
||||
virtual void Flush() {}
|
||||
virtual BackendType GetBackendType() const override { return mRefDT->GetBackendType(); }
|
||||
virtual DrawTargetType GetType() const override { return mRefDT->GetType(); }
|
||||
virtual bool IsCaptureDT() const override { return true; }
|
||||
virtual already_AddRefed<SourceSurface> Snapshot() override;
|
||||
virtual void DetachAllSnapshots() override;
|
||||
virtual IntSize GetSize() override { return mSize; }
|
||||
virtual void Flush() override {}
|
||||
virtual void DrawSurface(SourceSurface *aSurface,
|
||||
const Rect &aDest,
|
||||
const Rect &aSource,
|
||||
const DrawSurfaceOptions &aSurfOptions,
|
||||
const DrawOptions &aOptions);
|
||||
const DrawOptions &aOptions) override;
|
||||
virtual void DrawFilter(FilterNode *aNode,
|
||||
const Rect &aSourceRect,
|
||||
const Point &aDestPoint,
|
||||
const DrawOptions &aOptions = DrawOptions());
|
||||
const DrawOptions &aOptions = DrawOptions()) override;
|
||||
virtual void DrawSurfaceWithShadow(SourceSurface *aSurface,
|
||||
const Point &aDest,
|
||||
const Color &aColor,
|
||||
const Point &aOffset,
|
||||
Float aSigma,
|
||||
CompositionOp aOperator) { /* Not implemented */ }
|
||||
CompositionOp aOperator) override { /* Not implemented */ }
|
||||
|
||||
virtual void ClearRect(const Rect &aRect);
|
||||
virtual void ClearRect(const Rect &aRect) override;
|
||||
virtual void MaskSurface(const Pattern &aSource,
|
||||
SourceSurface *aMask,
|
||||
Point aOffset,
|
||||
const DrawOptions &aOptions = DrawOptions());
|
||||
|
||||
const DrawOptions &aOptions = DrawOptions()) override;
|
||||
virtual void CopySurface(SourceSurface *aSurface,
|
||||
const IntRect &aSourceRect,
|
||||
const IntPoint &aDestination);
|
||||
const IntPoint &aDestination) override;
|
||||
|
||||
virtual void FillRect(const Rect &aRect,
|
||||
const Pattern &aPattern,
|
||||
const DrawOptions &aOptions = DrawOptions());
|
||||
const DrawOptions &aOptions = DrawOptions()) override;
|
||||
virtual void StrokeRect(const Rect &aRect,
|
||||
const Pattern &aPattern,
|
||||
const StrokeOptions &aStrokeOptions = StrokeOptions(),
|
||||
const DrawOptions &aOptions = DrawOptions());
|
||||
const DrawOptions &aOptions = DrawOptions()) override;
|
||||
virtual void StrokeLine(const Point &aStart,
|
||||
const Point &aEnd,
|
||||
const Pattern &aPattern,
|
||||
const StrokeOptions &aStrokeOptions = StrokeOptions(),
|
||||
const DrawOptions &aOptions = DrawOptions());
|
||||
const DrawOptions &aOptions = DrawOptions()) override;
|
||||
virtual void Stroke(const Path *aPath,
|
||||
const Pattern &aPattern,
|
||||
const StrokeOptions &aStrokeOptions = StrokeOptions(),
|
||||
const DrawOptions &aOptions = DrawOptions());
|
||||
const DrawOptions &aOptions = DrawOptions()) override;
|
||||
virtual void Fill(const Path *aPath,
|
||||
const Pattern &aPattern,
|
||||
const DrawOptions &aOptions = DrawOptions());
|
||||
const DrawOptions &aOptions = DrawOptions()) override;
|
||||
virtual void FillGlyphs(ScaledFont *aFont,
|
||||
const GlyphBuffer &aBuffer,
|
||||
const Pattern &aPattern,
|
||||
const DrawOptions &aOptions = DrawOptions(),
|
||||
const GlyphRenderingOptions *aRenderingOptions = nullptr);
|
||||
const GlyphRenderingOptions *aRenderingOptions = nullptr) override;
|
||||
virtual void Mask(const Pattern &aSource,
|
||||
const Pattern &aMask,
|
||||
const DrawOptions &aOptions = DrawOptions());
|
||||
virtual void PushClip(const Path *aPath);
|
||||
virtual void PushClipRect(const Rect &aRect);
|
||||
virtual void PopClip();
|
||||
const DrawOptions &aOptions = DrawOptions()) override;
|
||||
virtual void PushClip(const Path *aPath) override;
|
||||
virtual void PushClipRect(const Rect &aRect) override;
|
||||
virtual void PopClip() override;
|
||||
virtual void PushLayer(bool aOpaque,
|
||||
Float aOpacity,
|
||||
SourceSurface* aMask,
|
||||
const Matrix& aMaskTransform,
|
||||
const IntRect& aBounds,
|
||||
bool aCopyBackground) override;
|
||||
virtual void PopLayer() override;
|
||||
|
||||
virtual void SetTransform(const Matrix &aTransform);
|
||||
|
||||
virtual void SetTransform(const Matrix &aTransform) override;
|
||||
|
||||
virtual already_AddRefed<SourceSurface> CreateSourceSurfaceFromData(unsigned char *aData,
|
||||
const IntSize &aSize,
|
||||
int32_t aStride,
|
||||
SurfaceFormat aFormat) const
|
||||
SurfaceFormat aFormat) const override
|
||||
{
|
||||
return mRefDT->CreateSourceSurfaceFromData(aData, aSize, aStride, aFormat);
|
||||
}
|
||||
virtual already_AddRefed<SourceSurface> OptimizeSourceSurface(SourceSurface *aSurface) const
|
||||
virtual already_AddRefed<SourceSurface> OptimizeSourceSurface(SourceSurface *aSurface) const override
|
||||
{
|
||||
return mRefDT->OptimizeSourceSurface(aSurface);
|
||||
}
|
||||
|
||||
virtual already_AddRefed<SourceSurface>
|
||||
CreateSourceSurfaceFromNativeSurface(const NativeSurface &aSurface) const
|
||||
CreateSourceSurfaceFromNativeSurface(const NativeSurface &aSurface) const override
|
||||
{
|
||||
return mRefDT->CreateSourceSurfaceFromNativeSurface(aSurface);
|
||||
}
|
||||
|
||||
virtual already_AddRefed<DrawTarget>
|
||||
CreateSimilarDrawTarget(const IntSize &aSize, SurfaceFormat aFormat) const
|
||||
CreateSimilarDrawTarget(const IntSize &aSize, SurfaceFormat aFormat) const override
|
||||
{
|
||||
return mRefDT->CreateSimilarDrawTarget(aSize, aFormat);
|
||||
}
|
||||
|
||||
virtual already_AddRefed<PathBuilder> CreatePathBuilder(FillRule aFillRule = FillRule::FILL_WINDING) const
|
||||
virtual already_AddRefed<PathBuilder> CreatePathBuilder(FillRule aFillRule = FillRule::FILL_WINDING) const override
|
||||
{
|
||||
return mRefDT->CreatePathBuilder(aFillRule);
|
||||
}
|
||||
|
@ -127,18 +129,18 @@ public:
|
|||
virtual already_AddRefed<GradientStops>
|
||||
CreateGradientStops(GradientStop *aStops,
|
||||
uint32_t aNumStops,
|
||||
ExtendMode aExtendMode = ExtendMode::CLAMP) const
|
||||
ExtendMode aExtendMode = ExtendMode::CLAMP) const override
|
||||
{
|
||||
return mRefDT->CreateGradientStops(aStops, aNumStops, aExtendMode);
|
||||
}
|
||||
virtual already_AddRefed<FilterNode> CreateFilter(FilterType aType)
|
||||
virtual already_AddRefed<FilterNode> CreateFilter(FilterType aType) override
|
||||
{
|
||||
return mRefDT->CreateFilter(aType);
|
||||
}
|
||||
|
||||
void ReplayToDrawTarget(DrawTarget* aDT, const Matrix& aTransform);
|
||||
|
||||
bool ContainsOnlyColoredGlyphs(RefPtr<ScaledFont>& aScaledFont, Color& aColor, std::vector<Glyph>& aGlyphs);
|
||||
bool ContainsOnlyColoredGlyphs(RefPtr<ScaledFont>& aScaledFont, Color& aColor, std::vector<Glyph>& aGlyphs) override;
|
||||
|
||||
protected:
|
||||
~DrawTargetCaptureImpl();
|
||||
|
|
|
@ -239,7 +239,7 @@ public:
|
|||
virtual ID3D11ShaderResourceView* GetShaderResourceView() override;
|
||||
|
||||
// Returns nullptr if this texture was created by a DXGI TextureHost.
|
||||
virtual DataTextureSource* AsDataTextureSource() override { return mAllowTextureUploads ? this : false; }
|
||||
virtual DataTextureSource* AsDataTextureSource() override { return mAllowTextureUploads ? this : nullptr; }
|
||||
|
||||
virtual void DeallocateDeviceData() override { mTexture = nullptr; }
|
||||
|
||||
|
|
|
@ -6,10 +6,13 @@
|
|||
|
||||
#include "CrashReporterHost.h"
|
||||
#include "CrashReporterMetadataShmem.h"
|
||||
#include "mozilla/ipc/GeckoChildProcessHost.h"
|
||||
#include "mozilla/Sprintf.h"
|
||||
#include "mozilla/SyncRunnable.h"
|
||||
#include "mozilla/Telemetry.h"
|
||||
#ifdef MOZ_CRASHREPORTER
|
||||
# include "nsExceptionHandler.h"
|
||||
# include "nsIAsyncShutdown.h"
|
||||
# include "nsICrashService.h"
|
||||
#endif
|
||||
|
||||
|
@ -18,7 +21,7 @@ namespace ipc {
|
|||
|
||||
CrashReporterHost::CrashReporterHost(GeckoProcessType aProcessType,
|
||||
const Shmem& aShmem,
|
||||
CrashReporter::ThreadId aThreadId)
|
||||
ThreadId aThreadId)
|
||||
: mProcessType(aProcessType),
|
||||
mShmem(aShmem),
|
||||
mThreadId(aThreadId),
|
||||
|
@ -103,6 +106,120 @@ CrashReporterHost::FinalizeCrashReport()
|
|||
return true;
|
||||
}
|
||||
|
||||
namespace {
|
||||
class GenerateMinidumpShutdownBlocker : public nsIAsyncShutdownBlocker {
|
||||
public:
|
||||
GenerateMinidumpShutdownBlocker() = default;
|
||||
|
||||
NS_IMETHOD BlockShutdown(nsIAsyncShutdownClient* aBarrierClient) override
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHOD GetName(nsAString& aName) override
|
||||
{
|
||||
aName = NS_LITERAL_STRING("Crash Reporter: blocking on minidump"
|
||||
"generation.");
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHOD GetState(nsIPropertyBag**) override
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_DECL_THREADSAFE_ISUPPORTS
|
||||
|
||||
private:
|
||||
virtual ~GenerateMinidumpShutdownBlocker() = default;
|
||||
};
|
||||
|
||||
NS_IMPL_ISUPPORTS(GenerateMinidumpShutdownBlocker, nsIAsyncShutdownBlocker)
|
||||
}
|
||||
|
||||
static nsCOMPtr<nsIAsyncShutdownClient> GetShutdownBarrier()
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
|
||||
nsCOMPtr<nsIAsyncShutdownService> svc = services::GetAsyncShutdown();
|
||||
nsCOMPtr<nsIAsyncShutdownClient> barrier;
|
||||
nsresult rv = svc->GetProfileBeforeChange(getter_AddRefs(barrier));
|
||||
|
||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return barrier.forget();
|
||||
}
|
||||
|
||||
void
|
||||
CrashReporterHost::GenerateMinidumpAndPair(GeckoChildProcessHost* aChildProcess,
|
||||
nsIFile* aMinidumpToPair,
|
||||
const nsACString& aPairName,
|
||||
std::function<void(bool)>&& aCallback,
|
||||
bool aAsync)
|
||||
{
|
||||
base::ProcessHandle childHandle;
|
||||
#ifdef XP_MACOSX
|
||||
childHandle = aChildProcess->GetChildTask();
|
||||
#else
|
||||
childHandle = aChildProcess->GetChildProcessHandle();
|
||||
#endif
|
||||
|
||||
if (!mCreateMinidumpCallback.IsEmpty()) {
|
||||
aCallback(false);
|
||||
return;
|
||||
}
|
||||
mCreateMinidumpCallback.Init(Move(aCallback), aAsync);
|
||||
|
||||
if (!childHandle) {
|
||||
NS_WARNING("Failed to get child process handle.");
|
||||
mCreateMinidumpCallback.Invoke(false);
|
||||
return;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIAsyncShutdownBlocker> shutdownBlocker;
|
||||
if (aAsync && NS_IsMainThread()) {
|
||||
nsCOMPtr<nsIAsyncShutdownClient> barrier = GetShutdownBarrier();
|
||||
if (!barrier) {
|
||||
mCreateMinidumpCallback.Invoke(false);
|
||||
return;
|
||||
}
|
||||
|
||||
shutdownBlocker = new GenerateMinidumpShutdownBlocker();
|
||||
|
||||
nsresult rv = barrier->AddBlocker(shutdownBlocker,
|
||||
NS_LITERAL_STRING(__FILE__), __LINE__,
|
||||
NS_LITERAL_STRING("Minidump generation"));
|
||||
Unused << NS_WARN_IF(NS_FAILED(rv));
|
||||
}
|
||||
|
||||
std::function<void(bool)> callback =
|
||||
[this, shutdownBlocker](bool aResult) {
|
||||
if (aResult &&
|
||||
CrashReporter::GetIDFromMinidump(this->mTargetDump, this->mDumpID)) {
|
||||
this->mCreateMinidumpCallback.Invoke(true);
|
||||
} else {
|
||||
this->mCreateMinidumpCallback.Invoke(false);
|
||||
}
|
||||
|
||||
if (shutdownBlocker) {
|
||||
nsCOMPtr<nsIAsyncShutdownClient> barrier = GetShutdownBarrier();
|
||||
if (barrier) {
|
||||
barrier->RemoveBlocker(shutdownBlocker);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
CrashReporter::CreateMinidumpsAndPair(childHandle,
|
||||
mThreadId,
|
||||
aPairName,
|
||||
aMinidumpToPair,
|
||||
getter_AddRefs(mTargetDump),
|
||||
Move(callback),
|
||||
aAsync);
|
||||
}
|
||||
|
||||
/* static */ void
|
||||
CrashReporterHost::NotifyCrashService(GeckoProcessType aProcessType,
|
||||
const nsString& aChildDumpID,
|
||||
|
|
|
@ -7,14 +7,20 @@
|
|||
#ifndef mozilla_ipc_CrashReporterHost_h
|
||||
#define mozilla_ipc_CrashReporterHost_h
|
||||
|
||||
#include <functional>
|
||||
|
||||
#include "mozilla/UniquePtr.h"
|
||||
#include "mozilla/ipc/Shmem.h"
|
||||
#include "base/process.h"
|
||||
#ifdef MOZ_CRASHREPORTER
|
||||
#include "nsExceptionHandler.h"
|
||||
#endif
|
||||
|
||||
namespace mozilla {
|
||||
namespace ipc {
|
||||
|
||||
class GeckoChildProcessHost;
|
||||
|
||||
// This is the newer replacement for CrashReporterParent. It is created in
|
||||
// response to a InitCrashReporter message on a top-level actor, and simply
|
||||
// holds the metadata shmem alive until the process ends. When the process
|
||||
|
@ -23,12 +29,73 @@ namespace ipc {
|
|||
class CrashReporterHost
|
||||
{
|
||||
typedef mozilla::ipc::Shmem Shmem;
|
||||
#ifdef MOZ_CRASHREPORTER
|
||||
typedef CrashReporter::AnnotationTable AnnotationTable;
|
||||
typedef CrashReporter::ThreadId ThreadId;
|
||||
#else
|
||||
// unused in this case
|
||||
typedef int32_t ThreadId;
|
||||
#endif
|
||||
|
||||
public:
|
||||
|
||||
template <typename T>
|
||||
class CallbackWrapper {
|
||||
public:
|
||||
void Init(std::function<void(T)>&& aCallback, bool aAsync)
|
||||
{
|
||||
mCallback = Move(aCallback);
|
||||
mAsync = aAsync;
|
||||
if (IsAsync()) {
|
||||
// Don't call do_GetCurrentThread() is this is called synchronously
|
||||
// because 1. it's unnecessary, and 2. more importantly, it might create
|
||||
// one if called from a native thread, and the thread will be leaked.
|
||||
mTargetThread = do_GetCurrentThread();
|
||||
}
|
||||
}
|
||||
|
||||
bool IsEmpty()
|
||||
{
|
||||
return !mCallback;
|
||||
}
|
||||
|
||||
bool IsAsync()
|
||||
{
|
||||
return mAsync;
|
||||
}
|
||||
|
||||
void Invoke(T aResult)
|
||||
{
|
||||
if (IsAsync()) {
|
||||
decltype(mCallback) callback = Move(mCallback);
|
||||
mTargetThread->
|
||||
Dispatch(NS_NewRunnableFunction([callback, aResult](){
|
||||
callback(aResult);
|
||||
}), NS_DISPATCH_NORMAL);
|
||||
} else {
|
||||
MOZ_ASSERT(!mTargetThread);
|
||||
mCallback(aResult);
|
||||
}
|
||||
|
||||
Clear();
|
||||
}
|
||||
|
||||
private:
|
||||
void Clear()
|
||||
{
|
||||
mCallback = nullptr;
|
||||
mTargetThread = nullptr;
|
||||
mAsync = false;
|
||||
}
|
||||
|
||||
bool mAsync;
|
||||
std::function<void(T)> mCallback;
|
||||
nsCOMPtr<nsIThread> mTargetThread;
|
||||
};
|
||||
|
||||
CrashReporterHost(GeckoProcessType aProcessType,
|
||||
const Shmem& aShmem,
|
||||
CrashReporter::ThreadId aThreadId);
|
||||
ThreadId aThreadId);
|
||||
|
||||
#ifdef MOZ_CRASHREPORTER
|
||||
// Helper function for generating a crash report for a process that probably
|
||||
|
@ -51,37 +118,15 @@ public:
|
|||
|
||||
// Generate a paired minidump. This does not take the crash report, as
|
||||
// GenerateCrashReport does. After this, FinalizeCrashReport may be called.
|
||||
//
|
||||
// This calls TakeCrashedChildMinidump and FinalizeCrashReport.
|
||||
template <typename Toplevel>
|
||||
bool GenerateMinidumpAndPair(Toplevel* aToplevelProtocol,
|
||||
nsIFile* aMinidumpToPair,
|
||||
const nsACString& aPairName)
|
||||
{
|
||||
ScopedProcessHandle childHandle;
|
||||
#ifdef XP_MACOSX
|
||||
childHandle = aToplevelProtocol->Process()->GetChildTask();
|
||||
#else
|
||||
if (!base::OpenPrivilegedProcessHandle(aToplevelProtocol->OtherPid(),
|
||||
&childHandle.rwget()))
|
||||
{
|
||||
NS_WARNING("Failed to open child process handle.");
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
nsCOMPtr<nsIFile> targetDump;
|
||||
if (!CrashReporter::CreateMinidumpsAndPair(childHandle,
|
||||
mThreadId,
|
||||
aPairName,
|
||||
aMinidumpToPair,
|
||||
getter_AddRefs(targetDump)))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return CrashReporter::GetIDFromMinidump(targetDump, mDumpID);
|
||||
}
|
||||
// Minidump(s) can be generated synchronously or asynchronously, specified in
|
||||
// argument aAsync. When the operation completes, aCallback is invoked, where
|
||||
// the callback argument denotes whether the operation succeeded.
|
||||
void
|
||||
GenerateMinidumpAndPair(GeckoChildProcessHost* aChildProcess,
|
||||
nsIFile* aMinidumpToPair,
|
||||
const nsACString& aPairName,
|
||||
std::function<void(bool)>&& aCallback,
|
||||
bool aAsync);
|
||||
|
||||
// This is a static helper function to notify the crash service that a
|
||||
// crash has occurred. When PCrashReporter is removed, we can make this
|
||||
|
@ -109,13 +154,17 @@ private:
|
|||
const nsString& aChildDumpID);
|
||||
|
||||
private:
|
||||
CallbackWrapper<bool> mCreateMinidumpCallback;
|
||||
GeckoProcessType mProcessType;
|
||||
Shmem mShmem;
|
||||
CrashReporter::ThreadId mThreadId;
|
||||
ThreadId mThreadId;
|
||||
time_t mStartTime;
|
||||
#ifdef MOZ_CRASHREPORTER
|
||||
AnnotationTable mExtraNotes;
|
||||
#endif
|
||||
nsString mDumpID;
|
||||
bool mFinalized;
|
||||
nsCOMPtr<nsIFile> mTargetDump;
|
||||
};
|
||||
|
||||
} // namespace ipc
|
||||
|
|
|
@ -50,6 +50,14 @@ AtomToId(JSAtom* atom)
|
|||
inline bool
|
||||
ValueToIdPure(const Value& v, jsid* id)
|
||||
{
|
||||
if (v.isString()) {
|
||||
if (v.toString()->isAtom()) {
|
||||
*id = AtomToId(&v.toString()->asAtom());
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
int32_t i;
|
||||
if (ValueFitsInInt32(v, &i) && INT_FITS_IN_JSID(i)) {
|
||||
*id = INT_TO_JSID(i);
|
||||
|
@ -61,11 +69,7 @@ ValueToIdPure(const Value& v, jsid* id)
|
|||
return true;
|
||||
}
|
||||
|
||||
if (!v.isString() || !v.toString()->isAtom())
|
||||
return false;
|
||||
|
||||
*id = AtomToId(&v.toString()->asAtom());
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
template <AllowGC allowGC>
|
||||
|
@ -73,15 +77,22 @@ inline bool
|
|||
ValueToId(JSContext* cx, typename MaybeRooted<Value, allowGC>::HandleType v,
|
||||
typename MaybeRooted<jsid, allowGC>::MutableHandleType idp)
|
||||
{
|
||||
int32_t i;
|
||||
if (ValueFitsInInt32(v, &i) && INT_FITS_IN_JSID(i)) {
|
||||
idp.set(INT_TO_JSID(i));
|
||||
return true;
|
||||
}
|
||||
if (v.isString()) {
|
||||
if (v.toString()->isAtom()) {
|
||||
idp.set(AtomToId(&v.toString()->asAtom()));
|
||||
return true;
|
||||
}
|
||||
} else {
|
||||
int32_t i;
|
||||
if (ValueFitsInInt32(v, &i) && INT_FITS_IN_JSID(i)) {
|
||||
idp.set(INT_TO_JSID(i));
|
||||
return true;
|
||||
}
|
||||
|
||||
if (js::IsSymbolOrSymbolWrapper(v)) {
|
||||
idp.set(SYMBOL_TO_JSID(js::ToSymbolPrimitive(v)));
|
||||
return true;
|
||||
if (js::IsSymbolOrSymbolWrapper(v)) {
|
||||
idp.set(SYMBOL_TO_JSID(js::ToSymbolPrimitive(v)));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
JSAtom* atom = ToAtom<allowGC>(cx, v);
|
||||
|
|
|
@ -7182,10 +7182,10 @@ nsIFrame::ListGeneric(nsACString& aTo, const char* aPrefix, uint32_t aFlags) con
|
|||
aTo += nsPrintfCString(" perspective");
|
||||
}
|
||||
if (Extend3DContext()) {
|
||||
aTo += nsPrintfCString(" preserves-3d-children");
|
||||
aTo += nsPrintfCString(" extend-3d");
|
||||
}
|
||||
if (Combines3DTransformWithAncestors()) {
|
||||
aTo += nsPrintfCString(" preserves-3d");
|
||||
aTo += nsPrintfCString(" combines-3d-transform-with-ancestors");
|
||||
}
|
||||
if (mContent) {
|
||||
aTo += nsPrintfCString(" [content=%p]", static_cast<void*>(mContent));
|
||||
|
|
|
@ -36,10 +36,6 @@ android {
|
|||
targetCompatibility JavaVersion.VERSION_1_7
|
||||
}
|
||||
|
||||
aaptOptions {
|
||||
cruncherEnabled = false
|
||||
}
|
||||
|
||||
dexOptions {
|
||||
javaMaxHeapSize "2g"
|
||||
jumboMode = true
|
||||
|
@ -141,12 +137,6 @@ android {
|
|||
srcDir "${topsrcdir}/mobile/android/search/java"
|
||||
srcDir "${topsrcdir}/mobile/android/services/src/main/java"
|
||||
|
||||
// These aren't included in moz.build builds, for reasons unknown.
|
||||
exclude "org/mozilla/gecko/dlc/CleanupAction.java"
|
||||
// This is a marker file for linting. We can probably find
|
||||
// other ways to achieve this once we're Gradle-only.
|
||||
exclude "org/mozilla/gecko/util/UnusedResourcesUtil.java"
|
||||
|
||||
if (mozconfig.substs.MOZ_ANDROID_MLS_STUMBLER) {
|
||||
srcDir "${topsrcdir}/mobile/android/stumbler/java"
|
||||
}
|
||||
|
@ -554,17 +544,3 @@ android.applicationVariants.all { variant ->
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Bug 1355625: strip extra .class files from Gradle builds; modified from
|
||||
// http://stackoverflow.com/a/40705699.
|
||||
android.applicationVariants.all { variant ->
|
||||
variant.javaCompile.doLast {
|
||||
// BuildConfig is not part of release builds, but it is required by the
|
||||
// local unit tests of the android-test job. Since the debug buildType
|
||||
// is overloaded as the release type (see comments above), we have to
|
||||
// keep the BuildConfig for testing.
|
||||
// delete fileTree(dir: "${project.buildDir}", include: '**/org/mozilla/gecko/BuildConfig.class')
|
||||
delete fileTree(dir: "${project.buildDir}", include: '**/org/mozilla/gecko/Manifest.class')
|
||||
delete fileTree(dir: "${project.buildDir}", include: '**/org/mozilla/gecko/Manifest$permission.class')
|
||||
}
|
||||
}
|
||||
|
|
|
@ -449,18 +449,23 @@ ANDROID_AAPT_IGNORE := !.svn:!.git:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*.scc
|
|||
# removes the target file if any recipe command fails.
|
||||
|
||||
define aapt_command
|
||||
$(1): $(topsrcdir)/python/mozbuild/mozbuild/action/aapt_package.py $$(call mkdir_deps,$(filter-out ./,$(dir $(3) $(4) $(5)))) $(2)
|
||||
$(1): $$(call mkdir_deps,$(filter-out ./,$(dir $(3) $(4) $(5)))) $(2)
|
||||
@$$(TOUCH) $$@
|
||||
$$(call py_action,aapt_package,-f \
|
||||
$$(AAPT) package -f -m \
|
||||
-M AndroidManifest.xml \
|
||||
$$(addprefix -A ,$$(ANDROID_ASSETS_DIRS)) \
|
||||
-I $(ANDROID_SDK)/android.jar \
|
||||
$(if $(MOZ_ANDROID_MAX_SDK_VERSION),--max-res-version $(MOZ_ANDROID_MAX_SDK_VERSION),) \
|
||||
--auto-add-overlay \
|
||||
$$(addprefix -S ,$$(ANDROID_RES_DIRS)) \
|
||||
$(if $(ANDROID_EXTRA_RES_DIRS),$$(addprefix -S ,$$(ANDROID_EXTRA_RES_DIRS))) \
|
||||
$$(addprefix -A ,$$(ANDROID_ASSETS_DIRS)) \
|
||||
$(if $(ANDROID_EXTRA_PACKAGES),--extra-packages $$(subst $$(NULL) ,:,$$(strip $$(ANDROID_EXTRA_PACKAGES)))) \
|
||||
$(if $(ANDROID_EXTRA_RES_DIRS),$$(addprefix -S ,$$(ANDROID_EXTRA_RES_DIRS))) \
|
||||
--custom-package org.mozilla.gecko \
|
||||
--no-version-vectors \
|
||||
-F $(3) \
|
||||
-J $(4) \
|
||||
--output-text-symbols $(5) \
|
||||
--verbose)
|
||||
--ignore-assets "$$(ANDROID_AAPT_IGNORE)"
|
||||
endef
|
||||
|
||||
# [Comment 3/3] The first of these rules is used during regular
|
||||
|
|
|
@ -68,11 +68,3 @@ idea {
|
|||
// Bug 1353055 - Strip 'vars' debugging information to agree with moz.build.
|
||||
apply from: "${topsrcdir}/mobile/android/gradle/debug_level.gradle"
|
||||
android.libraryVariants.all configureVariantDebugLevel
|
||||
|
||||
// Bug 1355625: strip extra .class files from Gradle builds; modified from
|
||||
// http://stackoverflow.com/a/40705699.
|
||||
android.libraryVariants.all { variant ->
|
||||
variant.javaCompile.doLast {
|
||||
delete fileTree(dir: "${project.buildDir}", include: "**/org/mozilla/gecko/thirdparty_unused/BuildConfig.class")
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
#include "mozilla/Attributes.h"
|
||||
#include "mozilla/HashFunctions.h"
|
||||
#include "mozilla/ServoStyleSet.h"
|
||||
#include "mozilla/Telemetry.h"
|
||||
#include "mozilla/UniquePtrExtensions.h"
|
||||
|
||||
#include "nsXULAppAPI.h"
|
||||
|
@ -54,6 +55,8 @@
|
|||
#include "nsThreadUtils.h"
|
||||
#include "GeckoProfiler.h"
|
||||
|
||||
using namespace mozilla;
|
||||
|
||||
#ifdef DEBUG
|
||||
#define ENSURE_MAIN_PROCESS(message, pref) do { \
|
||||
if (MOZ_UNLIKELY(!XRE_IsParentProcess())) { \
|
||||
|
@ -91,8 +94,26 @@ static NS_DEFINE_CID(kZipReaderCID, NS_ZIPREADER_CID);
|
|||
void
|
||||
Preferences::DirtyCallback()
|
||||
{
|
||||
if (!XRE_IsParentProcess()) {
|
||||
// TODO: this should really assert because you can't set prefs in a
|
||||
// content process. But so much code currently does this that we just
|
||||
// ignore it for now.
|
||||
return;
|
||||
}
|
||||
if (gHashTable && sPreferences && !sPreferences->mDirty) {
|
||||
sPreferences->mDirty = true;
|
||||
|
||||
NS_WARNING_ASSERTION(!sPreferences->mProfileShutdown,
|
||||
"Setting user pref after profile shutdown.");
|
||||
|
||||
if (sPreferences->AllowOffMainThreadSave()) {
|
||||
static const int MAX_PREF_DELAY_MS = 2000;
|
||||
NS_IdleDispatchToCurrentThread(
|
||||
mozilla::NewRunnableMethod("Preferences::SavePrefFileAsynchronous",
|
||||
sPreferences,
|
||||
&Preferences::SavePrefFileAsynchronous),
|
||||
MAX_PREF_DELAY_MS);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -653,7 +674,6 @@ Preferences::Shutdown()
|
|||
*/
|
||||
|
||||
Preferences::Preferences()
|
||||
: mDirty(false)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -760,7 +780,20 @@ nsresult
|
|||
Preferences::ResetAndReadUserPrefs()
|
||||
{
|
||||
sPreferences->ResetUserPrefs();
|
||||
return sPreferences->ReadUserPrefs(nullptr);
|
||||
|
||||
MOZ_ASSERT(!sPreferences->mCurrentFile, "Should only initialize prefs once");
|
||||
|
||||
nsresult rv = sPreferences->UseDefaultPrefFile();
|
||||
sPreferences->UseUserPrefFile();
|
||||
|
||||
// Migrate the old prerelease telemetry pref
|
||||
if (!Preferences::GetBool(kOldTelemetryPref, true)) {
|
||||
Preferences::SetBool(kTelemetryPref, false);
|
||||
Preferences::ClearUser(kOldTelemetryPref);
|
||||
}
|
||||
|
||||
sPreferences->NotifyServiceObservers(NS_PREFSERVICE_READ_TOPIC_ID);
|
||||
return rv;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
@ -774,11 +807,19 @@ Preferences::Observe(nsISupports *aSubject, const char *aTopic,
|
|||
nsresult rv = NS_OK;
|
||||
|
||||
if (!nsCRT::strcmp(aTopic, "profile-before-change")) {
|
||||
rv = SavePrefFile(nullptr);
|
||||
} else if (!nsCRT::strcmp(aTopic, "profile-before-change-telemetry")) {
|
||||
// Normally prefs aren't written after this point, and so we kick off
|
||||
// an asynchronous pref save so that I/O can be done in parallel with
|
||||
// other shutdown.
|
||||
if (AllowOffMainThreadSave()) {
|
||||
PreferencesWriter::Flush();
|
||||
SavePrefFile(nullptr);
|
||||
}
|
||||
} else if (!nsCRT::strcmp(aTopic, "profile-before-change-telemetry")) {
|
||||
// It's possible that a profile-before-change observer after ours
|
||||
// set a pref. A blocking save here re-saves if necessary and also waits
|
||||
// for any pending saves to complete.
|
||||
SavePrefFileBlocking();
|
||||
MOZ_ASSERT(!mDirty, "Preferences should not be dirty");
|
||||
mProfileShutdown = true;
|
||||
} else if (!strcmp(aTopic, "load-extension-defaults")) {
|
||||
pref_LoadPrefsInDirList(NS_EXT_PREFS_DEFAULTS_DIR_LIST);
|
||||
} else if (!nsCRT::strcmp(aTopic, "reload-default-prefs")) {
|
||||
|
@ -795,39 +836,19 @@ Preferences::Observe(nsISupports *aSubject, const char *aTopic,
|
|||
|
||||
|
||||
NS_IMETHODIMP
|
||||
Preferences::ReadUserPrefs(nsIFile *aFile)
|
||||
Preferences::ReadUserPrefsFromFile(nsIFile *aFile)
|
||||
{
|
||||
if (MOZ_UNLIKELY(!XRE_IsParentProcess())) {
|
||||
NS_ERROR("must load prefs from parent process");
|
||||
return NS_ERROR_NOT_AVAILABLE;
|
||||
}
|
||||
|
||||
nsresult rv;
|
||||
|
||||
if (nullptr == aFile) {
|
||||
// We should not be re-reading the user preferences, but if we
|
||||
// are going to try, make sure there are no outstanding saves
|
||||
if (AllowOffMainThreadSave()) {
|
||||
PreferencesWriter::Flush();
|
||||
}
|
||||
|
||||
rv = UseDefaultPrefFile();
|
||||
// A user pref file is optional.
|
||||
// Ignore all errors related to it, so we retain 'rv' value :-|
|
||||
(void) UseUserPrefFile();
|
||||
|
||||
// Migrate the old prerelease telemetry pref
|
||||
if (!Preferences::GetBool(kOldTelemetryPref, true)) {
|
||||
Preferences::SetBool(kTelemetryPref, false);
|
||||
Preferences::ClearUser(kOldTelemetryPref);
|
||||
}
|
||||
|
||||
NotifyServiceObservers(NS_PREFSERVICE_READ_TOPIC_ID);
|
||||
} else {
|
||||
rv = ReadAndOwnUserPrefFile(aFile);
|
||||
if (!aFile) {
|
||||
NS_ERROR("ReadUserPrefsFromFile requires a parameter");
|
||||
return NS_ERROR_INVALID_ARG;
|
||||
}
|
||||
|
||||
return rv;
|
||||
return openPrefFile(aFile);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
@ -1058,46 +1079,48 @@ Preferences::NotifyServiceObservers(const char *aTopic)
|
|||
nsresult
|
||||
Preferences::UseDefaultPrefFile()
|
||||
{
|
||||
nsCOMPtr<nsIFile> aFile;
|
||||
nsresult rv = NS_GetSpecialDirectory(NS_APP_PREFS_50_FILE, getter_AddRefs(aFile));
|
||||
nsCOMPtr<nsIFile> file;
|
||||
nsresult rv = NS_GetSpecialDirectory(NS_APP_PREFS_50_FILE,
|
||||
getter_AddRefs(file));
|
||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||
return rv;
|
||||
}
|
||||
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
rv = ReadAndOwnUserPrefFile(aFile);
|
||||
// Most likely cause of failure here is that the file didn't
|
||||
// exist, so save a new one. mUserPrefReadFailed will be
|
||||
// used to catch an error in actually reading the file.
|
||||
if (NS_FAILED(rv)) {
|
||||
if (NS_FAILED(SavePrefFileInternal(aFile, SaveMethod::Blocking)))
|
||||
NS_ERROR("Failed to save new shared pref file");
|
||||
else
|
||||
rv = NS_OK;
|
||||
}
|
||||
mCurrentFile = file;
|
||||
|
||||
rv = openPrefFile(file);
|
||||
if (rv == NS_ERROR_FILE_NOT_FOUND) {
|
||||
// this is a normal case for new users
|
||||
Telemetry::ScalarSet(Telemetry::ScalarID::PREFERENCES_CREATED_NEW_USER_PREFS_FILE, true);
|
||||
rv = NS_OK;
|
||||
} else if (NS_FAILED(rv)) {
|
||||
// Save a backup copy of the current (invalid) prefs file, since all prefs
|
||||
// from the error line to the end of the file will be lost (bug 361102).
|
||||
// TODO we should notify the user about it (bug 523725).
|
||||
Telemetry::ScalarSet(Telemetry::ScalarID::PREFERENCES_PREFS_FILE_WAS_INVALID, true);
|
||||
MakeBackupPrefFile(file);
|
||||
}
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
nsresult
|
||||
void
|
||||
Preferences::UseUserPrefFile()
|
||||
{
|
||||
nsresult rv = NS_OK;
|
||||
nsCOMPtr<nsIFile> aFile;
|
||||
nsDependentCString prefsDirProp(NS_APP_PREFS_50_DIR);
|
||||
|
||||
rv = NS_GetSpecialDirectory(prefsDirProp.get(), getter_AddRefs(aFile));
|
||||
if (NS_SUCCEEDED(rv) && aFile) {
|
||||
rv = aFile->AppendNative(NS_LITERAL_CSTRING("user.js"));
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
bool exists = false;
|
||||
aFile->Exists(&exists);
|
||||
if (exists) {
|
||||
rv = openPrefFile(aFile);
|
||||
} else {
|
||||
rv = NS_ERROR_FILE_NOT_FOUND;
|
||||
}
|
||||
}
|
||||
nsresult rv = NS_GetSpecialDirectory(NS_APP_PREFS_50_DIR,
|
||||
getter_AddRefs(aFile));
|
||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||
return;
|
||||
}
|
||||
|
||||
aFile->AppendNative(NS_LITERAL_CSTRING("user.js"));
|
||||
rv = openPrefFile(aFile);
|
||||
if (rv != NS_ERROR_FILE_NOT_FOUND) {
|
||||
// If the file exists and was at least partially read, record that
|
||||
// in telemetry as it may be a sign of pref injection.
|
||||
Telemetry::ScalarSet(Telemetry::ScalarID::PREFERENCES_READ_USER_JS, true);
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
||||
nsresult
|
||||
|
@ -1125,40 +1148,6 @@ Preferences::MakeBackupPrefFile(nsIFile *aFile)
|
|||
return rv;
|
||||
}
|
||||
|
||||
nsresult
|
||||
Preferences::ReadAndOwnUserPrefFile(nsIFile *aFile)
|
||||
{
|
||||
NS_ENSURE_ARG(aFile);
|
||||
|
||||
if (mCurrentFile == aFile)
|
||||
return NS_OK;
|
||||
|
||||
// Since we're changing the pref file, we may have to make
|
||||
// sure the outstanding writes are handled first.
|
||||
if (AllowOffMainThreadSave()) {
|
||||
PreferencesWriter::Flush();
|
||||
}
|
||||
|
||||
mCurrentFile = aFile;
|
||||
|
||||
nsresult rv = NS_OK;
|
||||
bool exists = false;
|
||||
mCurrentFile->Exists(&exists);
|
||||
if (exists) {
|
||||
rv = openPrefFile(mCurrentFile);
|
||||
if (NS_FAILED(rv)) {
|
||||
// Save a backup copy of the current (invalid) prefs file, since all prefs
|
||||
// from the error line to the end of the file will be lost (bug 361102).
|
||||
// TODO we should notify the user about it (bug 523725).
|
||||
MakeBackupPrefFile(mCurrentFile);
|
||||
}
|
||||
} else {
|
||||
rv = NS_ERROR_FILE_NOT_FOUND;
|
||||
}
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
nsresult
|
||||
Preferences::SavePrefFileInternal(nsIFile *aFile, SaveMethod aSaveMethod)
|
||||
{
|
||||
|
@ -1184,6 +1173,13 @@ Preferences::SavePrefFileInternal(nsIFile *aFile, SaveMethod aSaveMethod)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
// check for profile shutdown after mDirty because the runnables from
|
||||
// DirtyCallback can still be pending
|
||||
if (mProfileShutdown) {
|
||||
NS_WARNING("Cannot save pref file after profile shutdown.");
|
||||
return NS_ERROR_ILLEGAL_DURING_SHUTDOWN;
|
||||
}
|
||||
|
||||
// It's possible that we never got a prefs file.
|
||||
nsresult rv = NS_OK;
|
||||
if (mCurrentFile) {
|
||||
|
|
|
@ -442,9 +442,7 @@ protected:
|
|||
* or the error code related to the read attempt.
|
||||
*/
|
||||
nsresult UseDefaultPrefFile();
|
||||
nsresult UseUserPrefFile();
|
||||
nsresult ReadAndOwnUserPrefFile(nsIFile *aFile);
|
||||
nsresult ReadAndOwnSharedUserPrefFile(nsIFile *aFile);
|
||||
void UseUserPrefFile();
|
||||
nsresult MakeBackupPrefFile(nsIFile *aFile);
|
||||
|
||||
// Default pref file save can be blocking or not.
|
||||
|
@ -487,7 +485,8 @@ protected:
|
|||
|
||||
private:
|
||||
nsCOMPtr<nsIFile> mCurrentFile;
|
||||
bool mDirty;
|
||||
bool mDirty = false;
|
||||
bool mProfileShutdown = false;
|
||||
|
||||
static Preferences* sPreferences;
|
||||
static nsIPrefBranch* sRootBranch;
|
||||
|
|
|
@ -30,22 +30,6 @@ interface nsIFile;
|
|||
[scriptable, uuid(1f84fd56-3956-40df-b86a-1ea01402ee96)]
|
||||
interface nsIPrefService : nsISupports
|
||||
{
|
||||
/**
|
||||
* Called to read in the preferences specified in a user preference file.
|
||||
*
|
||||
* @param aFile The file to be read.
|
||||
*
|
||||
* @note
|
||||
* If nullptr is passed in for the aFile parameter the default preferences
|
||||
* file(s) [prefs.js, user.js] will be read and processed.
|
||||
*
|
||||
* @throws Error File failed to read or contained invalid data.
|
||||
*
|
||||
* @see savePrefFile
|
||||
* @see nsIFile
|
||||
*/
|
||||
void readUserPrefs(in nsIFile aFile);
|
||||
|
||||
/**
|
||||
* Called to completely flush and re-initialize the preferences system.
|
||||
*
|
||||
|
@ -125,6 +109,17 @@ interface nsIPrefService : nsISupports
|
|||
* that have not been written to disk
|
||||
*/
|
||||
readonly attribute boolean dirty;
|
||||
|
||||
/**
|
||||
* Read in the preferences specified in a user preference file. This method
|
||||
* does not clear user preferences that were already set.
|
||||
*
|
||||
* @param aFile The file to be read.
|
||||
*
|
||||
* @throws Error File failed to read or contained invalid data.
|
||||
* @note This method is intended for internal unit testing only!
|
||||
*/
|
||||
void readUserPrefsFromFile(in nsIFile aFile);
|
||||
};
|
||||
|
||||
%{C++
|
||||
|
|
|
@ -17,11 +17,10 @@ function do_check_throws(f, result, stack)
|
|||
try {
|
||||
f();
|
||||
} catch (exc) {
|
||||
if (exc.result == result)
|
||||
return;
|
||||
do_throw("expected result " + result + ", caught " + exc, stack);
|
||||
equal(exc.result, result, "Correct exception was thrown");
|
||||
return;
|
||||
}
|
||||
do_throw("expected result " + result + ", none thrown", stack);
|
||||
ok(false, "expected result " + result + ", none thrown");
|
||||
}
|
||||
|
||||
var dirSvc = Cc["@mozilla.org/file/directory_service;1"].getService(Ci.nsIProperties);
|
||||
|
|
|
@ -22,7 +22,7 @@ function run_test() {
|
|||
|
||||
prefs.unlockPref(PREF_NAME);
|
||||
prefs.setCharPref(PREF_NAME, "test1");
|
||||
ps.readUserPrefs(file);
|
||||
ps.readUserPrefsFromFile(file);
|
||||
|
||||
do_check_eq("test1", userprefs.getCharPref(PREF_NAME));
|
||||
do_check_eq(false, userprefs.prefHasUserValue(PREF_NAME));
|
||||
|
|
|
@ -20,17 +20,6 @@ function run_test() {
|
|||
let prefFile = do_get_profile();
|
||||
prefFile.append("prefs.js");
|
||||
|
||||
// dirty flag only applies to the default pref file save, not all of them,
|
||||
// so we need to set the default pref file first. Chances are, the file
|
||||
// does not exist, but we don't need it to - we just want to set the
|
||||
// name/location to match
|
||||
//
|
||||
try {
|
||||
ps.readUserPrefs(prefFile);
|
||||
} catch (e) {
|
||||
// we're fine if the file isn't there
|
||||
}
|
||||
|
||||
//**************************************************************************//
|
||||
// prefs are not dirty after a write
|
||||
ps.savePrefFile(null);
|
||||
|
|
|
@ -50,7 +50,7 @@ function run_test() {
|
|||
ps.getBoolPref("testPref.bool1");
|
||||
}, Cr.NS_ERROR_UNEXPECTED);
|
||||
|
||||
ps.readUserPrefs(prefFile);
|
||||
ps.readUserPrefsFromFile(prefFile);
|
||||
|
||||
do_check_true(ps.getBoolPref("testPref.bool1"));
|
||||
ps.setBoolPref("testPref.bool1", false);
|
||||
|
|
|
@ -309,6 +309,7 @@ function run_test() {
|
|||
let savePrefFile = do_get_cwd();
|
||||
savePrefFile.append("data");
|
||||
savePrefFile.append("savePref.js");
|
||||
|
||||
if (savePrefFile.exists())
|
||||
savePrefFile.remove(false);
|
||||
savePrefFile.create(Ci.nsIFile.NORMAL_FILE_TYPE, 0o666);
|
||||
|
@ -317,7 +318,7 @@ function run_test() {
|
|||
|
||||
// load a preexisting pref file
|
||||
let prefFile = do_get_file("data/testPref.js");
|
||||
ps.readUserPrefs(prefFile);
|
||||
ps.readUserPrefsFromFile(prefFile);
|
||||
|
||||
// former prefs should have been replaced/lost
|
||||
do_check_throws(function() {
|
||||
|
@ -337,7 +338,12 @@ function run_test() {
|
|||
do_check_eq(pb.getCharPref("char2"), "älskar");
|
||||
|
||||
// loading our former savePrefFile should allow us to read former prefs
|
||||
ps.readUserPrefs(savePrefFile);
|
||||
|
||||
// Hack alert: on Windows nsLocalFile caches the size of savePrefFile from
|
||||
// the .create() call above as 0. We call .exists() to reset the cache.
|
||||
savePrefFile.exists();
|
||||
|
||||
ps.readUserPrefsFromFile(savePrefFile);
|
||||
// cleanup the file now we don't need it
|
||||
savePrefFile.remove(false);
|
||||
do_check_eq(ps.getBoolPref("ReadPref.bool"), true);
|
||||
|
|
|
@ -18,7 +18,7 @@ do_register_cleanup(saveAndReload);
|
|||
function resetAndLoad(filenames) {
|
||||
ps.resetPrefs();
|
||||
for (let filename of filenames) {
|
||||
ps.readUserPrefs(do_get_file(filename));
|
||||
ps.readUserPrefsFromFile(do_get_file(filename));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -33,7 +33,12 @@ function saveAndReload() {
|
|||
|
||||
// Now reset the pref service and re-read what we saved.
|
||||
ps.resetPrefs();
|
||||
ps.readUserPrefs(file);
|
||||
|
||||
// Hack alert: on Windows nsLocalFile caches the size of savePrefFile from
|
||||
// the .create() call above as 0. We call .exists() to reset the cache.
|
||||
file.exists();
|
||||
|
||||
ps.readUserPrefsFromFile(file);
|
||||
}
|
||||
|
||||
function run_test() {
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
#include "nsICacheEntry.h"
|
||||
#include "nsICachingChannel.h"
|
||||
#include "nsIChannel.h"
|
||||
#include "nsIClassOfService.h"
|
||||
#include "nsIDocShell.h"
|
||||
#include "nsIDocument.h"
|
||||
#include "nsIDOMDocument.h"
|
||||
|
@ -207,6 +208,17 @@ LowerPriorityHelper(nsIChannel* aChannel)
|
|||
}
|
||||
}
|
||||
|
||||
static void
|
||||
SetThrottleableHelper(nsIChannel* aChannel)
|
||||
{
|
||||
MOZ_ASSERT(aChannel);
|
||||
|
||||
nsCOMPtr<nsIClassOfService> cos(do_QueryInterface(aChannel));
|
||||
if (cos) {
|
||||
cos->AddClassFlags(nsIClassOfService::Throttleable);
|
||||
}
|
||||
}
|
||||
|
||||
NS_IMPL_ISUPPORTS(nsChannelClassifier,
|
||||
nsIURIClassifierCallback,
|
||||
nsIObserver)
|
||||
|
@ -1003,6 +1015,7 @@ IsTrackerBlacklistedCallback::OnClassifyComplete(nsresult aErrorCode,
|
|||
if (CachedPrefs::GetInstance()->IsLowerNetworkPriority()) {
|
||||
LowerPriorityHelper(channel);
|
||||
}
|
||||
SetThrottleableHelper(channel);
|
||||
|
||||
// We don't want to disable speculative connection when tracking protection
|
||||
// is disabled. So, change the status to NS_OK.
|
||||
|
@ -1049,6 +1062,7 @@ IsTrackerBlacklistedCallback::OnClassifyCompleteInternal(nsresult aErrorCode,
|
|||
if (CachedPrefs::GetInstance()->IsLowerNetworkPriority()) {
|
||||
LowerPriorityHelper(channel);
|
||||
}
|
||||
SetThrottleableHelper(channel);
|
||||
|
||||
return mChannelCallback->OnClassifyComplete(
|
||||
NS_OK, aLists, aProvider, aPrefix);
|
||||
|
|
|
@ -7188,6 +7188,8 @@ nsHttpChannel::OnStopRequest(nsIRequest *request, nsISupports *ctxt, nsresult st
|
|||
conv->GetDecodedDataLength(&mDecodedBodySize);
|
||||
}
|
||||
|
||||
bool isFromNet = request == mTransactionPump;
|
||||
|
||||
if (mTransaction) {
|
||||
// determine if we should call DoAuthRetry
|
||||
bool authRetry = mAuthRetryPending && NS_SUCCEEDED(status);
|
||||
|
@ -7404,7 +7406,7 @@ nsHttpChannel::OnStopRequest(nsIRequest *request, nsISupports *ctxt, nsresult st
|
|||
}
|
||||
}
|
||||
|
||||
ReportRcwnStats(request);
|
||||
ReportRcwnStats(request, isFromNet);
|
||||
|
||||
// Register entry to the Performance resource timing
|
||||
mozilla::dom::Performance* documentPerformance = GetPerformance();
|
||||
|
@ -8934,7 +8936,7 @@ nsHttpChannel::SetDoNotTrack()
|
|||
}
|
||||
|
||||
void
|
||||
nsHttpChannel::ReportRcwnStats(nsIRequest* firstResponseRequest)
|
||||
nsHttpChannel::ReportRcwnStats(nsIRequest* firstResponseRequest, bool isFromNet)
|
||||
{
|
||||
if (!sRCWNEnabled) {
|
||||
return;
|
||||
|
@ -8954,7 +8956,7 @@ nsHttpChannel::ReportRcwnStats(nsIRequest* firstResponseRequest)
|
|||
};
|
||||
|
||||
RaceCacheAndNetStatus rcwnStatus = kDidNotRaceUsedNetwork;
|
||||
if (firstResponseRequest == mTransactionPump) {
|
||||
if (isFromNet) {
|
||||
rcwnStatus = mRaceCacheWithNetwork ? kRaceUsedNetwork : kDidNotRaceUsedNetwork;
|
||||
} else if (firstResponseRequest == mCachePump) {
|
||||
rcwnStatus = mRaceCacheWithNetwork ? kRaceUsedCache : kDidNotRaceUsedCache;
|
||||
|
|
|
@ -479,7 +479,7 @@ private:
|
|||
int64_t ComputeTelemetryBucketNumber(int64_t difftime_ms);
|
||||
|
||||
// Report telemetry and stats to about:networking
|
||||
void ReportRcwnStats(nsIRequest* firstResponseRequest);
|
||||
void ReportRcwnStats(nsIRequest* firstResponseRequest, bool isFromNet);
|
||||
|
||||
// Create a aggregate set of the current notification callbacks
|
||||
// and ensure the transaction is updated to use it.
|
||||
|
|
|
@ -39,6 +39,10 @@ listener.prototype = {
|
|||
this._tracking);
|
||||
do_check_eq(request.QueryInterface(Ci.nsISupportsPriority).priority,
|
||||
this._priority);
|
||||
if (runtime.processType == runtime.PROCESS_TYPE_DEFAULT && this._tracking) {
|
||||
do_check_true(request.QueryInterface(Ci.nsIClassOfService).classFlags &
|
||||
Ci.nsIClassOfService.Throttleable);
|
||||
}
|
||||
request.cancel(Components.results.NS_ERROR_ABORT);
|
||||
this._nextTest();
|
||||
},
|
||||
|
|
|
@ -45,13 +45,41 @@ G_BEGIN_DECLS
|
|||
*@ATK_RELATION_EMBEDS: Indicates that the object visually embeds
|
||||
* another object's content, i.e. this object's content flows around
|
||||
* another's content.
|
||||
*@ATK_RELATION_EMBEDDED_BY: Inverse of %ATK_RELATION_EMBEDS, indicates that
|
||||
*@ATK_RELATION_EMBEDDED_BY: Reciprocal of %ATK_RELATION_EMBEDS, indicates that
|
||||
* this object's content is visualy embedded in another object.
|
||||
*@ATK_RELATION_POPUP_FOR: Indicates that an object is a popup for another object.
|
||||
*@ATK_RELATION_PARENT_WINDOW_OF: Indicates that an object is a parent window of another object.
|
||||
*@ATK_RELATION_DESCRIBED_BY: Indicates that another object provides descriptive information about this object; more verbose than ATK_RELATION_LABELLED_BY.
|
||||
*@ATK_RELATION_DESCRIPTION_FOR: Indicates that an object provides descriptive information about another object; more verbose than ATK_RELATION_LABEL_FOR.
|
||||
*@ATK_RELATION_DESCRIBED_BY: Reciprocal of %ATK_RELATION_DESCRIPTION_FOR. Indicates that one
|
||||
* or more target objects provide descriptive information about this object. This relation
|
||||
* type is most appropriate for information that is not essential as its presentation may
|
||||
* be user-configurable and/or limited to an on-demand mechanism such as an assistive
|
||||
* technology command. For brief, essential information such as can be found in a widget's
|
||||
* on-screen label, use %ATK_RELATION_LABELLED_BY. For an on-screen error message, use
|
||||
* %ATK_RELATION_ERROR_MESSAGE. For lengthy extended descriptive information contained in
|
||||
* an on-screen object, consider using %ATK_RELATION_DETAILS as assistive technologies may
|
||||
* provide a means for the user to navigate to objects containing detailed descriptions so
|
||||
* that their content can be more closely reviewed.
|
||||
*@ATK_RELATION_DESCRIPTION_FOR: Reciprocal of %ATK_RELATION_DESCRIBED_BY. Indicates that this
|
||||
* object provides descriptive information about the target object(s). See also
|
||||
* %ATK_RELATION_DETAILS_FOR and %ATK_RELATION_ERROR_FOR.
|
||||
*@ATK_RELATION_NODE_PARENT_OF: Indicates an object is a cell in a treetable and is expanded to display other cells in the same column.
|
||||
*@ATK_RELATION_DETAILS: Reciprocal of %ATK_RELATION_DETAILS_FOR. Indicates that this object
|
||||
* has a detailed or extended description, the contents of which can be found in the target
|
||||
* object(s). This relation type is most appropriate for information that is sufficiently
|
||||
* lengthy as to make navigation to the container of that information desirable. For less
|
||||
* verbose information suitable for announcement only, see %ATK_RELATION_DESCRIBED_BY. If
|
||||
* the detailed information describes an error condition, %ATK_RELATION_ERROR_FOR should be
|
||||
* used instead. @Since: ATK-2.26.
|
||||
*@ATK_RELATION_DETAILS_FOR: Reciprocal of %ATK_RELATION_DETAILS. Indicates that this object
|
||||
* provides a detailed or extended description about the target object(s). See also
|
||||
* %ATK_RELATION_DESCRIPTION_FOR and %ATK_RELATION_ERROR_FOR. @Since: ATK-2.26.
|
||||
*@ATK_RELATION_ERROR_MESSAGE: Reciprocal of %ATK_RELATION_ERROR_FOR. Indicates that this object
|
||||
* has one or more errors, the nature of which is described in the contents of the target
|
||||
* object(s). Objects that have this relation type should also contain %ATK_STATE_INVALID_ENTRY
|
||||
* in their #AtkStateSet. @Since: ATK-2.26.
|
||||
*@ATK_RELATION_ERROR_FOR: Reciprocal of %ATK_RELATION_ERROR_MESSAGE. Indicates that this object
|
||||
* contains an error message describing an invalid condition in the target object(s). @Since:
|
||||
* ATK_2.26.
|
||||
*@ATK_RELATION_LAST_DEFINED: Not used, this value indicates the end of the enumeration.
|
||||
*
|
||||
*Describes the type of the relation
|
||||
|
@ -75,6 +103,10 @@ typedef enum
|
|||
ATK_RELATION_DESCRIBED_BY,
|
||||
ATK_RELATION_DESCRIPTION_FOR,
|
||||
ATK_RELATION_NODE_PARENT_OF,
|
||||
ATK_RELATION_DETAILS,
|
||||
ATK_RELATION_DETAILS_FOR,
|
||||
ATK_RELATION_ERROR_MESSAGE,
|
||||
ATK_RELATION_ERROR_FOR,
|
||||
ATK_RELATION_LAST_DEFINED
|
||||
} AtkRelationType;
|
||||
|
||||
|
|
|
@ -1,129 +0,0 @@
|
|||
#!/bin/python
|
||||
|
||||
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
|
||||
# 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/.
|
||||
|
||||
'''
|
||||
Invoke Android `aapt package`.
|
||||
|
||||
Right now, this passes arguments through. Eventually it will
|
||||
implement a much restricted version of the Gradle build system's
|
||||
resource merging algorithm before invoking aapt.
|
||||
'''
|
||||
|
||||
from __future__ import (
|
||||
print_function,
|
||||
unicode_literals,
|
||||
)
|
||||
|
||||
import argparse
|
||||
import os
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
import buildconfig
|
||||
import mozpack.path as mozpath
|
||||
|
||||
import merge_resources
|
||||
|
||||
|
||||
def uniqify(iterable):
|
||||
"""Remove duplicates from iterable, preserving order."""
|
||||
# Cribbed from
|
||||
# https://thingspython.wordpress.com/2011/03/09/snippet-uniquify-a-sequence-preserving-order/.
|
||||
seen = set()
|
||||
return [item for item in iterable if not (item in seen or seen.add(item))]
|
||||
|
||||
|
||||
def main(*argv):
|
||||
parser = argparse.ArgumentParser(
|
||||
description='Invoke Android `aapt package`.')
|
||||
|
||||
# These serve to order build targets; they're otherwise ignored.
|
||||
parser.add_argument('ignored_inputs', nargs='*')
|
||||
parser.add_argument('-f', action='store_true', default=False,
|
||||
help='force overwrite of existing files')
|
||||
parser.add_argument('-F', required=True,
|
||||
help='specify the apk file to output')
|
||||
parser.add_argument('-M', required=True,
|
||||
help='specify full path to AndroidManifest.xml to include in zip')
|
||||
parser.add_argument('-J', required=True,
|
||||
help='specify where to output R.java resource constant definitions')
|
||||
parser.add_argument('-S', action='append', dest='res_dirs',
|
||||
default=[],
|
||||
help='directory in which to find resources. ' +
|
||||
'Multiple directories will be scanned and the first ' +
|
||||
'match found (left to right) will take precedence.')
|
||||
parser.add_argument('-A', action='append', dest='assets_dirs',
|
||||
default=[],
|
||||
help='additional directory in which to find raw asset files')
|
||||
parser.add_argument('--extra-packages', action='append',
|
||||
default=[],
|
||||
help='generate R.java for libraries')
|
||||
parser.add_argument('--output-text-symbols', required=True,
|
||||
help='Generates a text file containing the resource ' +
|
||||
'symbols of the R class in the specified folder.')
|
||||
parser.add_argument('--verbose', action='store_true', default=False,
|
||||
help='provide verbose output')
|
||||
|
||||
args = parser.parse_args(argv)
|
||||
|
||||
args.res_dirs = uniqify(args.res_dirs)
|
||||
args.assets_dirs = uniqify(args.assets_dirs)
|
||||
args.extra_packages = uniqify(args.extra_packages)
|
||||
|
||||
import itertools
|
||||
|
||||
debug = False
|
||||
if (not buildconfig.substs['MOZILLA_OFFICIAL']) or \
|
||||
(buildconfig.substs['NIGHTLY_BUILD'] and buildconfig.substs['MOZ_DEBUG']):
|
||||
debug = True
|
||||
|
||||
merge_resources.main('merged', True, *args.res_dirs)
|
||||
|
||||
cmd = [
|
||||
buildconfig.substs['AAPT'],
|
||||
'package',
|
||||
] + \
|
||||
(['-f'] if args.f else []) + \
|
||||
[
|
||||
'-m',
|
||||
'-M', args.M,
|
||||
'-I', mozpath.join(buildconfig.substs['ANDROID_SDK'], 'android.jar'),
|
||||
'--auto-add-overlay',
|
||||
] + \
|
||||
list(itertools.chain(*(('-A', x) for x in args.assets_dirs))) + \
|
||||
['-S', os.path.abspath('merged')] + \
|
||||
(['--extra-packages', ':'.join(args.extra_packages)] if args.extra_packages else []) + \
|
||||
['--custom-package', 'org.mozilla.gecko'] + \
|
||||
['--no-version-vectors'] + \
|
||||
(['--debug-mode'] if debug else []) + \
|
||||
[
|
||||
'-F',
|
||||
args.F,
|
||||
'-J',
|
||||
args.J,
|
||||
'--output-text-symbols',
|
||||
args.output_text_symbols,
|
||||
'--ignore-assets',
|
||||
'!.svn:!.git:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*.scc:*~:#*:*.rej:*.orig',
|
||||
]
|
||||
|
||||
# We run aapt to produce gecko.ap_ and gecko-nodeps.ap_; it's
|
||||
# helpful to tag logs with the file being produced.
|
||||
logtag = os.path.basename(args.F)
|
||||
|
||||
if args.verbose:
|
||||
print('[aapt {}] {}'.format(logtag, ' '.join(cmd)))
|
||||
|
||||
try:
|
||||
subprocess.check_output(cmd, stderr=subprocess.STDOUT)
|
||||
except subprocess.CalledProcessError as e:
|
||||
print('\n'.join(['[aapt {}] {}'.format(logtag, line) for line in e.output.splitlines()]))
|
||||
return 1
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
sys.exit(main(*sys.argv[1:]))
|
|
@ -1,301 +0,0 @@
|
|||
#!/bin/python
|
||||
|
||||
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
|
||||
# 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/.
|
||||
|
||||
'''
|
||||
A hacked together clone of the Android Gradle plugin's resource
|
||||
merging algorithm. To be abandoned in favour of --with-gradle as soon
|
||||
as possible!
|
||||
'''
|
||||
|
||||
from __future__ import (
|
||||
print_function,
|
||||
unicode_literals,
|
||||
)
|
||||
|
||||
from collections import defaultdict
|
||||
import re
|
||||
import os
|
||||
import sys
|
||||
|
||||
from mozbuild.util import ensureParentDir
|
||||
from mozpack.copier import (
|
||||
FileCopier,
|
||||
)
|
||||
from mozpack.manifests import (
|
||||
InstallManifest,
|
||||
)
|
||||
import mozpack.path as mozpath
|
||||
from mozpack.files import (
|
||||
FileFinder,
|
||||
)
|
||||
|
||||
import xml.etree.cElementTree as ET
|
||||
|
||||
|
||||
# From https://github.com/miracle2k/android-platform_sdk/blob/master/common/src/com/android/resources/ResourceType.java.
|
||||
# TODO: find a more authoritative source!
|
||||
resource_type = {
|
||||
"anim": 0,
|
||||
"animator": 1,
|
||||
# The only interesting ones.
|
||||
"string-array": 2,
|
||||
"integer-array": 2,
|
||||
"attr": 3,
|
||||
"bool": 4,
|
||||
"color": 5,
|
||||
"declare-styleable": 6,
|
||||
"dimen": 7,
|
||||
"drawable": 8,
|
||||
"fraction": 9,
|
||||
"id": 10,
|
||||
"integer": 11,
|
||||
"interpolator": 12,
|
||||
"layout": 13,
|
||||
"menu": 14,
|
||||
"mipmap": 15,
|
||||
"plurals": 16,
|
||||
"raw": 17,
|
||||
"string": 18,
|
||||
"style": 19,
|
||||
"styleable": 20,
|
||||
"xml": 21,
|
||||
# "public": 0,
|
||||
}
|
||||
|
||||
|
||||
def uniqify(iterable):
|
||||
"""Remove duplicates from iterable, preserving order."""
|
||||
# Cribbed from https://thingspython.wordpress.com/2011/03/09/snippet-uniquify-a-sequence-preserving-order/.
|
||||
seen = set()
|
||||
return [item for item in iterable if not (item in seen or seen.add(item))]
|
||||
|
||||
|
||||
# Exclusions, arising in appcompat-v7-23.4.0.
|
||||
MANIFEST_EXCLUSIONS = (
|
||||
'color/abc_background_cache_hint_selector_material_dark.xml',
|
||||
'color/abc_background_cache_hint_selector_material_light.xml',
|
||||
)
|
||||
|
||||
SMALLEST_SCREEN_WIDTH_QUALIFIER_RE = re.compile(r"(^|-)w(\d+)dp($|-)")
|
||||
SCREEN_WIDTH_QUALIFIER_RE = re.compile(r"(^|-)sw(\d+)dp($|-)")
|
||||
# Different densities were introduced in different Android versions.
|
||||
# However, earlier versions of aapt (like the one we are building
|
||||
# with) don't have fine-grained versions; they're all lumped into v4.
|
||||
DENSITIES = [
|
||||
(re.compile(r"(^|-)xxxhdpi($|-)"), 18),
|
||||
(re.compile(r"(^|-)560dpi($|-)"), 1),
|
||||
(re.compile(r"(^|-)xxhdpi($|-)"), 16),
|
||||
(re.compile(r"(^|-)400dpi($|-)"), 1),
|
||||
(re.compile(r"(^|-)360dpi($|-)"), 23),
|
||||
(re.compile(r"(^|-)xhdpi($|-)"), 8),
|
||||
(re.compile(r"(^|-)280dpi($|-)"), 22),
|
||||
(re.compile(r"(^|-)hdpi($|-)"), 4),
|
||||
(re.compile(r"(^|-)tvdpi($|-)"), 13),
|
||||
(re.compile(r"(^|-)mdpi($|-)"), 4),
|
||||
(re.compile(r"(^|-)ldpi($|-)"), 4),
|
||||
(re.compile(r"(^|-)anydpi($|-)"), 21),
|
||||
(re.compile(r"(^|-)nodpi($|-)"), 4),
|
||||
]
|
||||
SCREEN_SIZE_RE = re.compile(r"(^|-)(small|normal|large|xlarge)($|-)")
|
||||
|
||||
def with_version(dir):
|
||||
"""Resources directories without versions (like values-large) that
|
||||
correspond to resource filters added to Android in vN (like large,
|
||||
which was added in v4) automatically get a -vN added (so values-large
|
||||
becomes values-large-v4, since Android versions before v4 will not
|
||||
recognize values-large)."""
|
||||
# Order matters! We need to check for later features before
|
||||
# earlier features, so that "ldrtl-sw-large" will be v17, not v13
|
||||
# or v4.
|
||||
if '-ldrtl' in dir and '-v' not in dir:
|
||||
return '{}-v17'.format(dir)
|
||||
|
||||
if re.search(SMALLEST_SCREEN_WIDTH_QUALIFIER_RE, dir) and '-v' not in dir:
|
||||
return '{}-v13'.format(dir)
|
||||
|
||||
if re.search(SCREEN_WIDTH_QUALIFIER_RE, dir) and '-v' not in dir:
|
||||
return '{}-v13'.format(dir)
|
||||
|
||||
for (density, _since) in DENSITIES:
|
||||
if re.search(density, dir) and '-v' not in dir:
|
||||
return '{}-v{}'.format(dir, 4)
|
||||
|
||||
if re.search(SCREEN_SIZE_RE, dir) and '-v' not in dir:
|
||||
return '{}-v4'.format(dir)
|
||||
|
||||
return dir
|
||||
|
||||
|
||||
def classify(path):
|
||||
"""Return `(resource, version)` for a given path.
|
||||
|
||||
`resource` is of the form `unversioned/name` where `unversionsed` is a resource
|
||||
type (like "drawable" or "strings"), and `version` is an
|
||||
integer version number or `None`."""
|
||||
dir, name = path.split('/')
|
||||
segments = dir.split('-')
|
||||
version = None
|
||||
for segment in segments[1:]:
|
||||
if segment.startswith('v'):
|
||||
version = int(segment[1:])
|
||||
break
|
||||
segments = [segment for segment in segments if not segment.startswith('v')]
|
||||
resource = '{}/{}'.format('-'.join(segments), name)
|
||||
return (resource, version)
|
||||
|
||||
|
||||
def main(output_dirname, verbose, *input_dirs):
|
||||
# Map directories to source paths, like
|
||||
# `{'values-large-v11': ['/path/to/values-large-v11/strings.xml',
|
||||
# '/path/to/values-large-v11/colors.xml', ...], ...}`.
|
||||
values = defaultdict(list)
|
||||
# Map unversioned resource names to maps from versions to source paths, like:
|
||||
# `{'drawable-large/icon.png':
|
||||
# {None: '/path/to/drawable-large/icon.png',
|
||||
# 11: '/path/to/drawable-large-v11/icon.png', ...}, ...}`.
|
||||
resources = defaultdict(dict)
|
||||
|
||||
manifest = InstallManifest()
|
||||
|
||||
for p in uniqify(input_dirs):
|
||||
finder = FileFinder(p, find_executables=False)
|
||||
|
||||
values_pattern = 'values*/*.xml'
|
||||
for path, _ in finder.find('*/*'):
|
||||
if path in MANIFEST_EXCLUSIONS:
|
||||
continue
|
||||
|
||||
source_path = mozpath.join(finder.base, path)
|
||||
|
||||
if mozpath.match(path, values_pattern):
|
||||
dir, _name = path.split('/')
|
||||
dir = with_version(dir)
|
||||
values[dir].append(source_path)
|
||||
continue
|
||||
|
||||
(resource, version) = classify(path)
|
||||
|
||||
# Earlier paths are taken in preference to later paths.
|
||||
# This agrees with aapt.
|
||||
if version not in resources:
|
||||
resources[resource][version] = source_path
|
||||
|
||||
# Step 1: merge all XML values into one single, sorted
|
||||
# per-configuration values.xml file. This apes what the Android
|
||||
# Gradle resource merging algorithm does.
|
||||
merged_values = defaultdict(list)
|
||||
|
||||
for dir, files in values.items():
|
||||
for file in files:
|
||||
values = ET.ElementTree(file=file).getroot()
|
||||
merged_values[dir].extend(values)
|
||||
|
||||
values = ET.Element('resources')
|
||||
# Sort by <type> tag, and then by name. Note that <item
|
||||
# type="type"> is equivalent to <type>.
|
||||
key = lambda x: (resource_type.get(x.get('type', x.tag)), x.get('name'))
|
||||
values[:] = sorted(merged_values[dir], key=key)
|
||||
|
||||
for value in values:
|
||||
if value.get('name') == 'TextAppearance.Design.Snackbar.Message':
|
||||
if value.get('{http://schemas.android.com/tools}override', False):
|
||||
values.remove(value)
|
||||
break
|
||||
|
||||
merged_values[dir] = values
|
||||
|
||||
for dir, values in merged_values.items():
|
||||
o = mozpath.join(output_dirname, dir, '{}.xml'.format(dir))
|
||||
ensureParentDir(o)
|
||||
ET.ElementTree(values).write(o)
|
||||
|
||||
manifest.add_required_exists(mozpath.join(dir, '{}.xml'.format(dir)))
|
||||
|
||||
# Step 2a: add version numbers for unversioned features
|
||||
# corresponding to when the feature was introduced. Resource
|
||||
# qualifiers will never be recognized by Android versions before
|
||||
# they were introduced. For example, density qualifiers are
|
||||
# supported only in Android v4 and above. Therefore
|
||||
# "drawable-hdpi" is implicitly "drawable-hdpi-v4". We version
|
||||
# such unversioned resources here.
|
||||
for (resource, versions) in resources.items():
|
||||
if None in versions:
|
||||
dir, name = resource.split('/')
|
||||
new_dir = with_version(dir)
|
||||
(new_resource, new_version) = classify('{}/{}'.format(new_dir, name))
|
||||
if new_resource != resource:
|
||||
raise ValueError('this is bad')
|
||||
|
||||
# `new_version` might be None: for example, `dir` might be "drawable".
|
||||
source_path = versions.pop(None)
|
||||
versions[new_version] = source_path
|
||||
|
||||
if verbose:
|
||||
if new_version:
|
||||
print("Versioning unversioned resource {} as {}-v{}/{}".format(source_path, dir, new_version, name))
|
||||
|
||||
# TODO: make this a command line argument that takes MOZ_ANDROID_MIN_SDK_VERSION.
|
||||
min_sdk = 15
|
||||
retained = defaultdict(dict)
|
||||
|
||||
# Step 2b: drop resource directories that will never be used by
|
||||
# Android on device. This depends on the minimum supported
|
||||
# Android SDK version. Suppose the minimum SDK is 15 and we have
|
||||
# drawable-v4/icon.png and drawable-v11/icon.png. The v4 version
|
||||
# will never be chosen, since v15 is always greater than v11.
|
||||
for (resource, versions) in resources.items():
|
||||
def key(v):
|
||||
return 0 if v is None else v
|
||||
# Versions in descending order.
|
||||
version_list = sorted(versions.keys(), key=key, reverse=True)
|
||||
for version in version_list:
|
||||
retained[resource][version] = versions[version]
|
||||
if version is not None and version <= min_sdk:
|
||||
break
|
||||
|
||||
if set(retained.keys()) != set(resources.keys()):
|
||||
raise ValueError('Something terrible has happened; retained '
|
||||
'resource names do not match input resources '
|
||||
'names')
|
||||
|
||||
if verbose:
|
||||
for resource in resources:
|
||||
if resources[resource] != retained[resource]:
|
||||
for version in sorted(resources[resource].keys(), reverse=True):
|
||||
if version in retained[resource]:
|
||||
print("Keeping reachable resource {}".format(resources[resource][version]))
|
||||
else:
|
||||
print("Dropping unreachable resource {}".format(resources[resource][version]))
|
||||
|
||||
# Populate manifest.
|
||||
for (resource, versions) in retained.items():
|
||||
for version in sorted(versions.keys(), reverse=True):
|
||||
path = resource
|
||||
if version:
|
||||
dir, name = resource.split('/')
|
||||
path = '{}-v{}/{}'.format(dir, version, name)
|
||||
manifest.add_copy(versions[version], path)
|
||||
|
||||
|
||||
copier = FileCopier()
|
||||
manifest.populate_registry(copier)
|
||||
print('mr', os.getcwd())
|
||||
result = copier.copy(output_dirname,
|
||||
remove_unaccounted=True,
|
||||
remove_all_directory_symlinks=False,
|
||||
remove_empty_directories=True)
|
||||
|
||||
if verbose:
|
||||
print('Updated:', result.updated_files_count)
|
||||
print('Removed:', result.removed_files_count + result.removed_directories_count)
|
||||
print('Existed:', result.existing_files_count)
|
||||
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
sys.exit(main(*sys.argv[1:]))
|
|
@ -275,9 +275,10 @@ license file's hash.
|
|||
)
|
||||
for (lib, crate_root) in crates_and_roots:
|
||||
path = mozpath.join(self.topsrcdir, crate_root)
|
||||
# We use check_call instead of mozprocess to ensure errors are displayed.
|
||||
# We do an |update -p| here to regenerate the Cargo.lock file with minimal changes. See bug 1324462
|
||||
self._run_command_in_srcdir(args=[cargo, 'update', '--manifest-path', mozpath.join(path, 'Cargo.toml'), '-p', lib])
|
||||
self._run_command_in_srcdir(args=[cargo, 'vendor', '--no-delete', '--sync', mozpath.join(path, 'Cargo.lock'), vendor_dir])
|
||||
subprocess.check_call([cargo, 'update', '--manifest-path', mozpath.join(path, 'Cargo.toml'), '-p', lib], cwd=self.topsrcdir)
|
||||
subprocess.check_call([cargo, 'vendor', '--quiet', '--no-delete', '--sync', mozpath.join(path, 'Cargo.lock'), vendor_dir], cwd=self.topsrcdir)
|
||||
|
||||
if not self._check_licenses(vendor_dir):
|
||||
self.log(logging.ERROR, 'license_check_failed', {},
|
||||
|
|
|
@ -1161,4 +1161,4 @@ static const TransportSecurityPreload kPublicKeyPinningPreloadList[] = {
|
|||
|
||||
static const int32_t kUnknownId = -1;
|
||||
|
||||
static const PRTime kPreloadPKPinsExpirationTime = INT64_C(1506526677458000);
|
||||
static const PRTime kPreloadPKPinsExpirationTime = INT64_C(1506614775590000);
|
||||
|
|
|
@ -25,7 +25,6 @@
|
|||
12vpnchina.com: could not connect to host
|
||||
163pwd.com: could not connect to host
|
||||
16packets.com: could not connect to host
|
||||
173vpn.cn: could not connect to host
|
||||
188betwarriors.co.uk: could not connect to host
|
||||
188trafalgar.ca: did not receive HSTS header
|
||||
1a-jva.de: could not connect to host
|
||||
|
@ -37,8 +36,6 @@
|
|||
1stcapital.com.sg: did not receive HSTS header
|
||||
1xcess.com: did not receive HSTS header
|
||||
1years.cc: could not connect to host
|
||||
2048-spiel.de: could not connect to host
|
||||
2048game.co.uk: could not connect to host
|
||||
206rc.net: max-age too low: 2592000
|
||||
21lg.co: could not connect to host
|
||||
247loan.com: max-age too low: 0
|
||||
|
@ -72,6 +69,7 @@
|
|||
404404.info: could not connect to host
|
||||
420dongstorm.com: could not connect to host
|
||||
42ms.org: could not connect to host
|
||||
441jj.com: did not receive HSTS header
|
||||
4455software.com: did not receive HSTS header
|
||||
4679.space: could not connect to host
|
||||
4azino777.ru: did not receive HSTS header
|
||||
|
@ -124,10 +122,10 @@ aboutmedia.nl: did not receive HSTS header
|
|||
aboutmyip.info: did not receive HSTS header
|
||||
aboutyou-deals.de: did not receive HSTS header
|
||||
abt.de: did not receive HSTS header
|
||||
abthorpe.org: could not connect to host
|
||||
abtom.de: did not receive HSTS header
|
||||
abury.fr: did not receive HSTS header
|
||||
abury.me: did not receive HSTS header
|
||||
ac-epmservices.com: could not connect to host
|
||||
accelerole.com: did not receive HSTS header
|
||||
accelight.co.jp: did not receive HSTS header
|
||||
access-sofia.org: did not receive HSTS header
|
||||
|
@ -152,7 +150,6 @@ actu-medias.com: did not receive HSTS header
|
|||
acuve.jp: could not connect to host
|
||||
ada.is: max-age too low: 2592000
|
||||
adajwells.me: could not connect to host
|
||||
adamgold.net: could not connect to host
|
||||
adams.net: max-age too low: 0
|
||||
adamwk.com: did not receive HSTS header
|
||||
adboos.com: did not receive HSTS header
|
||||
|
@ -173,6 +170,7 @@ adquisitio.es: could not connect to host
|
|||
adquisitio.fr: could not connect to host
|
||||
adquisitio.it: could not connect to host
|
||||
adrianseo.ro: did not receive HSTS header
|
||||
adrienkohlbecker.com: could not connect to host
|
||||
adrinet.tk: could not connect to host
|
||||
adrl.ca: could not connect to host
|
||||
adsfund.org: could not connect to host
|
||||
|
@ -196,6 +194,7 @@ agalaxyfarfaraway.co.uk: could not connect to host
|
|||
agate.pw: did not receive HSTS header
|
||||
agatheetraphael.fr: could not connect to host
|
||||
agbremen.de: did not receive HSTS header
|
||||
agdalieso.com.ba: did not receive HSTS header
|
||||
agentseeker.ca: did not receive HSTS header
|
||||
agevio.com: could not connect to host
|
||||
agrimap.com: did not receive HSTS header
|
||||
|
@ -206,7 +205,6 @@ ahoynetwork.com: did not receive HSTS header
|
|||
ahri.ovh: could not connect to host
|
||||
aidanwoods.com: did not receive HSTS header
|
||||
aids.gov: did not receive HSTS header
|
||||
aigcev.org: could not connect to host
|
||||
aircomms.com: did not receive HSTS header
|
||||
airlea.com: could not connect to host
|
||||
airlinecheckins.com: did not receive HSTS header
|
||||
|
@ -240,7 +238,6 @@ alenan.org: could not connect to host
|
|||
alessandro.pw: did not receive HSTS header
|
||||
alethearose.com: did not receive HSTS header
|
||||
alexandre.sh: did not receive HSTS header
|
||||
alexpavel.com: could not connect to host
|
||||
alfa24.pro: could not connect to host
|
||||
alicialab.org: could not connect to host
|
||||
alittlebitcheeky.com: did not receive HSTS header
|
||||
|
@ -297,6 +294,7 @@ anderslind.dk: could not connect to host
|
|||
andreasbreitenlohner.de: did not receive HSTS header
|
||||
andreasfritz-fotografie.de: could not connect to host
|
||||
andreastoneman.com: could not connect to host
|
||||
andrehansen.de: did not receive HSTS header
|
||||
andreigec.net: did not receive HSTS header
|
||||
andrew.london: did not receive HSTS header
|
||||
andrewbroekman.com: could not connect to host
|
||||
|
@ -304,6 +302,7 @@ andrewmichaud.beer: could not connect to host
|
|||
andrewmichaud.com: could not connect to host
|
||||
andrewmichaud.me: could not connect to host
|
||||
andrewregan.me: could not connect to host
|
||||
andrewyg.net: did not receive HSTS header
|
||||
andreypopp.com: could not connect to host
|
||||
androidprosmart.com: could not connect to host
|
||||
androoz.se: did not receive HSTS header
|
||||
|
@ -314,7 +313,7 @@ anghami.com: did not receive HSTS header
|
|||
animeday.ml: could not connect to host
|
||||
animesfusion.com.br: could not connect to host
|
||||
animesharp.com: could not connect to host
|
||||
animurecs.com: did not receive HSTS header
|
||||
animurecs.com: could not connect to host
|
||||
aniplus.cf: could not connect to host
|
||||
aniplus.gq: could not connect to host
|
||||
aniplus.ml: could not connect to host
|
||||
|
@ -391,7 +390,6 @@ armory.supplies: could not connect to host
|
|||
armsday.com: could not connect to host
|
||||
armytricka.cz: did not receive HSTS header
|
||||
arocloud.de: did not receive HSTS header
|
||||
arod.tk: could not connect to host
|
||||
aroundme.org: did not receive HSTS header
|
||||
arpa.ph: could not connect to host
|
||||
arpr.co: did not receive HSTS header
|
||||
|
@ -424,7 +422,7 @@ ass.org.au: could not connect to host
|
|||
assekuranzjobs.de: could not connect to host
|
||||
asset-alive.com: did not receive HSTS header
|
||||
asset-alive.net: did not receive HSTS header
|
||||
astrath.net: did not receive HSTS header
|
||||
astrath.net: could not connect to host
|
||||
astrolpost.com: could not connect to host
|
||||
astromelody.com: did not receive HSTS header
|
||||
asuhe.cc: did not receive HSTS header
|
||||
|
@ -442,7 +440,6 @@ atomik.pro: could not connect to host
|
|||
atop.io: could not connect to host
|
||||
attic118.com: could not connect to host
|
||||
attimidesigns.com: did not receive HSTS header
|
||||
attorney.org.il: could not connect to host
|
||||
au.search.yahoo.com: max-age too low: 172800
|
||||
aubiosales.com: could not connect to host
|
||||
aucubin.moe: could not connect to host
|
||||
|
@ -490,7 +487,6 @@ axeny.com: did not receive HSTS header
|
|||
ayuru.info: could not connect to host
|
||||
az.search.yahoo.com: did not receive HSTS header
|
||||
azino777.ru: did not receive HSTS header
|
||||
azort.com: did not receive HSTS header
|
||||
azprep.us: could not connect to host
|
||||
b-landia.net: could not connect to host
|
||||
b303.me: did not receive HSTS header
|
||||
|
@ -511,12 +507,14 @@ badkamergigant.com: could not connect to host
|
|||
badlink.org: could not connect to host
|
||||
baff.lu: did not receive HSTS header
|
||||
baiduaccount.com: could not connect to host
|
||||
baitulongbaycruises.com: could not connect to host
|
||||
bakingstone.com: could not connect to host
|
||||
bakkerdesignandbuild.com: did not receive HSTS header
|
||||
balcan-underground.net: could not connect to host
|
||||
baldwinkoo.com: could not connect to host
|
||||
baleares.party: could not connect to host
|
||||
balloonphp.com: could not connect to host
|
||||
balnearionaturaspa.com: did not receive HSTS header
|
||||
bananabandy.com: could not connect to host
|
||||
banbanchs.com: could not connect to host
|
||||
bandb.xyz: could not connect to host
|
||||
|
@ -599,6 +597,7 @@ bestcellular.com: did not receive HSTS header
|
|||
besthost.cz: did not receive HSTS header
|
||||
bestlashesandbrows.com: did not receive HSTS header
|
||||
betaclean.fr: did not receive HSTS header
|
||||
betafive.net: could not connect to host
|
||||
betcafearena.ro: could not connect to host
|
||||
bethditto.com: did not receive HSTS header
|
||||
betnet.fr: could not connect to host
|
||||
|
@ -624,6 +623,7 @@ biblerhymes.com: did not receive HSTS header
|
|||
bidon.ca: did not receive HSTS header
|
||||
bieberium.de: could not connect to host
|
||||
bienenblog.cc: could not connect to host
|
||||
bierbringer.at: could not connect to host
|
||||
big-black.de: did not receive HSTS header
|
||||
bigbbqbrush.bid: could not connect to host
|
||||
bigbrownpromotions.com.au: could not connect to host
|
||||
|
@ -672,6 +672,7 @@ black-armada.pl: could not connect to host
|
|||
black-octopus.ru: did not receive HSTS header
|
||||
blackburn.link: could not connect to host
|
||||
blackdragoninc.org: could not connect to host
|
||||
blackhelicopters.net: could not connect to host
|
||||
blacklane.com: did not receive HSTS header
|
||||
blackly.uk: max-age too low: 0
|
||||
blackpayment.ru: could not connect to host
|
||||
|
@ -754,6 +755,7 @@ bravz.de: could not connect to host
|
|||
bregnedalsystems.dk: did not receive HSTS header
|
||||
brettabel.com: did not receive HSTS header
|
||||
brickoo.com: could not connect to host
|
||||
brickyardbuffalo.com: did not receive HSTS header
|
||||
bridholm.se: could not connect to host
|
||||
brightstarkids.com.au: did not receive HSTS header
|
||||
britzer-toner.de: did not receive HSTS header
|
||||
|
@ -811,6 +813,7 @@ bustimes.org: could not connect to host
|
|||
butchersworkshop.com: did not receive HSTS header
|
||||
buttercoin.com: could not connect to host
|
||||
butterfieldstraining.com: did not receive HSTS header
|
||||
buyaccessible.gov: did not receive HSTS header
|
||||
buybaby.eu: did not receive HSTS header
|
||||
buyfox.de: did not receive HSTS header
|
||||
bw81.xyz: could not connect to host
|
||||
|
@ -864,6 +867,7 @@ calgaryconstructionjobs.com: did not receive HSTS header
|
|||
calix.com: max-age too low: 0
|
||||
callaction.co: max-age too low: 2628000
|
||||
calltrackingreports.com: could not connect to host
|
||||
calomel.org: max-age too low: 2764800
|
||||
caltonnutrition.com: did not receive HSTS header
|
||||
calvin.me: max-age too low: 2592000
|
||||
calvinallen.net: could not connect to host
|
||||
|
@ -890,6 +894,8 @@ captivatedbytabrett.com: could not connect to host
|
|||
car-navi.ph: did not receive HSTS header
|
||||
carano-service.de: did not receive HSTS header
|
||||
caraudio69.cz: could not connect to host
|
||||
carck.co.uk: could not connect to host
|
||||
carck.uk: could not connect to host
|
||||
cardoni.net: did not receive HSTS header
|
||||
cardstream.com: did not receive HSTS header
|
||||
cardurl.com: did not receive HSTS header
|
||||
|
@ -931,7 +937,7 @@ celeirorural.com.br: did not receive HSTS header
|
|||
celina-reads.de: did not receive HSTS header
|
||||
cellsites.nz: could not connect to host
|
||||
centillien.com: did not receive HSTS header
|
||||
centos.pub: did not receive HSTS header
|
||||
centos.pub: could not connect to host
|
||||
centrallead.net: could not connect to host
|
||||
centralpoint.be: did not receive HSTS header
|
||||
centralpoint.nl: did not receive HSTS header
|
||||
|
@ -956,7 +962,6 @@ champserver.net: could not connect to host
|
|||
chandlerredding.com: did not receive HSTS header
|
||||
changetip.com: did not receive HSTS header
|
||||
chaos.fail: did not receive HSTS header
|
||||
chaosfield.at: did not receive HSTS header
|
||||
chaoswebs.net: did not receive HSTS header
|
||||
charityclear.com: did not receive HSTS header
|
||||
charitystreet.co.uk: could not connect to host
|
||||
|
@ -975,13 +980,11 @@ checkout.google.com: did not receive HSTS header (error ignored - included regar
|
|||
cheerflow.com: could not connect to host
|
||||
cheesetart.my: could not connect to host
|
||||
cheetah85.de: could not connect to host
|
||||
cheetahwerx.com: could not connect to host
|
||||
chejianer.cn: did not receive HSTS header
|
||||
chensir.net: could not connect to host
|
||||
chepaofen.com: did not receive HSTS header
|
||||
cherekerry.com: could not connect to host
|
||||
cherysunzhang.com: did not receive HSTS header
|
||||
chestnut.cf: did not receive HSTS header
|
||||
chez-janine.de: could not connect to host
|
||||
chib.chat: could not connect to host
|
||||
chicolawfirm.com: did not receive HSTS header
|
||||
|
@ -1008,11 +1011,11 @@ christianhoffmann.info: could not connect to host
|
|||
christophercolumbusfoundation.gov: could not connect to host
|
||||
christophersole.com: could not connect to host
|
||||
christophheich.me: could not connect to host
|
||||
chrisu3050.at: could not connect to host
|
||||
chrisupjohn.com: could not connect to host
|
||||
chrome-devtools-frontend.appspot.com: did not receive HSTS header (error ignored - included regardless)
|
||||
chrome.google.com: did not receive HSTS header (error ignored - included regardless)
|
||||
chua.cf: could not connect to host
|
||||
chua.family: could not connect to host
|
||||
chulado.com: did not receive HSTS header
|
||||
cidr.ml: could not connect to host
|
||||
cieslar.io: could not connect to host
|
||||
|
@ -1024,11 +1027,13 @@ cimalando.eu: could not connect to host
|
|||
cintdirect.com: could not connect to host
|
||||
ciplanutrition.com: did not receive HSTS header
|
||||
ciscommerce.net: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 118" data: no]
|
||||
cisy.me: could not connect to host
|
||||
citiagent.cz: could not connect to host
|
||||
cityoflaurel.org: did not receive HSTS header
|
||||
ciuciucadou.ro: could not connect to host
|
||||
cium.ru: could not connect to host
|
||||
cjcaron.org: could not connect to host
|
||||
cjey.me: could not connect to host
|
||||
clara-baumert.de: could not connect to host
|
||||
claralabs.com: did not receive HSTS header
|
||||
classicsandexotics.com: did not receive HSTS header
|
||||
|
@ -1069,7 +1074,6 @@ cloudstrike.co: could not connect to host
|
|||
cloudwalk.io: did not receive HSTS header
|
||||
cloverleaf.net: max-age too low: 0
|
||||
clowde.in: could not connect to host
|
||||
cloxy.com: did not receive HSTS header
|
||||
clubmix.co.kr: could not connect to host
|
||||
cluster.id: could not connect to host
|
||||
clustermaze.net: could not connect to host
|
||||
|
@ -1199,6 +1203,7 @@ craftmain.eu: could not connect to host
|
|||
craftmine.cz: did not receive HSTS header
|
||||
crandall.io: could not connect to host
|
||||
cranems.com.ua: did not receive HSTS header
|
||||
cranioschule.com: did not receive HSTS header
|
||||
crate.io: did not receive HSTS header
|
||||
cravelyrics.com: could not connect to host
|
||||
crazifyngers.com: could not connect to host
|
||||
|
@ -1229,6 +1234,7 @@ cruzr.xyz: could not connect to host
|
|||
crypt.guru: could not connect to host
|
||||
crypticshell.co.uk: could not connect to host
|
||||
cryptify.eu: could not connect to host
|
||||
crypto.is: could not connect to host
|
||||
cryptobin.org: could not connect to host
|
||||
cryptojar.io: did not receive HSTS header
|
||||
cryptolab.pro: could not connect to host
|
||||
|
@ -1319,6 +1325,7 @@ danijobs.com: could not connect to host
|
|||
danishenanigans.com: could not connect to host
|
||||
dannycrichton.com: did not receive HSTS header
|
||||
danrl.de: could not connect to host
|
||||
danw.io: could not connect to host
|
||||
danwillenberg.com: did not receive HSTS header
|
||||
daolerp.xyz: could not connect to host
|
||||
daplie.com: did not receive HSTS header
|
||||
|
@ -1339,9 +1346,11 @@ dash-board.jp: did not receive HSTS header
|
|||
dashburst.com: did not receive HSTS header
|
||||
dashnimorad.com: did not receive HSTS header
|
||||
data-abundance.com: could not connect to host
|
||||
data.qld.gov.au: did not receive HSTS header
|
||||
datahove.no: did not receive HSTS header
|
||||
datarank.com: max-age too low: 0
|
||||
dataretention.solutions: could not connect to host
|
||||
datasnitch.co.uk: could not connect to host
|
||||
datatekniikka.com: could not connect to host
|
||||
datenkeks.de: did not receive HSTS header
|
||||
dateno1.com: max-age too low: 0
|
||||
|
@ -1439,7 +1448,6 @@ dianlujitao.com: did not receive HSTS header
|
|||
diarbag.us: max-age too low: 0
|
||||
dicando.com: max-age too low: 2592000
|
||||
dicionariofinanceiro.com: did not receive HSTS header
|
||||
die-sinlosen.de: could not connect to host
|
||||
diedrich.co: max-age too low: 0
|
||||
dienstplan.one: could not connect to host
|
||||
dierenkruiden.nl: could not connect to host
|
||||
|
@ -1457,6 +1465,8 @@ dim.lighting: could not connect to host
|
|||
dinamoelektrik.com: could not connect to host
|
||||
dingcc.me: could not connect to host
|
||||
dinkum.online: could not connect to host
|
||||
dino.li: could not connect to host
|
||||
dinotv.at: could not connect to host
|
||||
directhskincream.com: could not connect to host
|
||||
directorinegocis.cat: could not connect to host
|
||||
discovery.lookout.com: did not receive HSTS header
|
||||
|
@ -1485,6 +1495,7 @@ dmcibulldog.com: did not receive HSTS header
|
|||
dmix.ca: could not connect to host
|
||||
dmtry.me: did not receive HSTS header
|
||||
dmz.ninja: could not connect to host
|
||||
dne.lu: could not connect to host
|
||||
dns.google.com: did not receive HSTS header (error ignored - included regardless)
|
||||
dnsknowledge.com: did not receive HSTS header
|
||||
do-do.tk: could not connect to host
|
||||
|
@ -1514,7 +1525,6 @@ dolphincorp.co.uk: could not connect to host
|
|||
domaine-aigoual-cevennes.com: did not receive HSTS header
|
||||
domaris.de: could not connect to host
|
||||
domenicocatelli.com: could not connect to host
|
||||
dominicpratt.de: did not receive HSTS header
|
||||
dominioanimal.com: could not connect to host
|
||||
dominique-mueller.de: did not receive HSTS header
|
||||
donmez.uk: could not connect to host
|
||||
|
@ -1531,7 +1541,7 @@ doridian.org: could not connect to host
|
|||
dot42.no: could not connect to host
|
||||
dotacni-parazit.cz: did not receive HSTS header
|
||||
dotadata.me: could not connect to host
|
||||
dotspaperie.com: did not receive HSTS header
|
||||
dotspaperie.com: could not connect to host
|
||||
dovecotadmin.org: could not connect to host
|
||||
dovetailnow.com: could not connect to host
|
||||
download.jitsi.org: did not receive HSTS header
|
||||
|
@ -1556,7 +1566,7 @@ dredgepress.com: could not connect to host
|
|||
dreid.org: did not receive HSTS header
|
||||
drewgle.net: could not connect to host
|
||||
drhopeson.com: could not connect to host
|
||||
drinkvabeer.com: could not connect to host
|
||||
drinknaturespower.com: could not connect to host
|
||||
drishti.guru: could not connect to host
|
||||
droidboss.com: did not receive HSTS header
|
||||
droncentrum.pl: did not receive HSTS header
|
||||
|
@ -1692,7 +1702,6 @@ encrypted.google.com: did not receive HSTS header (error ignored - included rega
|
|||
encryptio.com: could not connect to host
|
||||
end.pp.ua: could not connect to host
|
||||
endlessdark.net: max-age too low: 600
|
||||
endlesshorizon.net: could not connect to host
|
||||
endlesstone.com: did not receive HSTS header
|
||||
enefan.jp: could not connect to host
|
||||
engelwerbung.com: did not receive HSTS header
|
||||
|
@ -1703,6 +1712,7 @@ enigmacpt.com: did not receive HSTS header
|
|||
enigmail.net: did not receive HSTS header
|
||||
enjoy-nepal.de: max-age too low: 0
|
||||
enjoymayfield.com: max-age too low: 0
|
||||
enlightenment.org: did not receive HSTS header
|
||||
enskat.de: could not connect to host
|
||||
enskatson-sippe.de: could not connect to host
|
||||
enteente.club: could not connect to host
|
||||
|
@ -1785,6 +1795,7 @@ euroshop24.net: could not connect to host
|
|||
evafojtova.cz: did not receive HSTS header
|
||||
evdenevenakliyatankara.pw: did not receive HSTS header
|
||||
events12.com: did not receive HSTS header
|
||||
everling.lu: could not connect to host
|
||||
everybooks.com: max-age too low: 60
|
||||
everylab.org: could not connect to host
|
||||
everything.place: could not connect to host
|
||||
|
@ -1899,6 +1910,7 @@ filmipop.com: max-age too low: 0
|
|||
finalgear.com: did not receive HSTS header
|
||||
financieringsportaal.nl: did not receive HSTS header
|
||||
finanzkontor.net: could not connect to host
|
||||
findingmyname.com: could not connect to host
|
||||
findtutorsnearme.com: did not receive HSTS header
|
||||
finfev.de: could not connect to host
|
||||
finiteheap.com: did not receive HSTS header
|
||||
|
@ -1923,7 +1935,6 @@ fitsw.com: did not receive HSTS header
|
|||
five.vn: did not receive HSTS header
|
||||
fivestarsitters.com: did not receive HSTS header
|
||||
fivezerocreative.com: did not receive HSTS header
|
||||
fiws.net: could not connect to host
|
||||
fixatom.com: did not receive HSTS header
|
||||
fixingdns.com: did not receive HSTS header
|
||||
fixtectools.co.za: could not connect to host
|
||||
|
@ -1934,7 +1945,6 @@ flags.ninja: could not connect to host
|
|||
flamewall.net: could not connect to host
|
||||
flareon.net: could not connect to host
|
||||
flawcheck.com: did not receive HSTS header
|
||||
flazznetworks.com: did not receive HSTS header
|
||||
fliexer.com: could not connect to host
|
||||
flirchi.com: did not receive HSTS header
|
||||
floless.co.uk: did not receive HSTS header
|
||||
|
@ -1955,8 +1965,8 @@ flukethoughts.com: could not connect to host
|
|||
flurrybridge.com: did not receive HSTS header
|
||||
flushstudios.com: did not receive HSTS header
|
||||
flyaces.com: did not receive HSTS header
|
||||
flyss.net: could not connect to host
|
||||
fm83.nl: could not connect to host
|
||||
fmi.gov: did not receive HSTS header
|
||||
fndout.com: did not receive HSTS header
|
||||
fnvsecurity.com: could not connect to host
|
||||
fojtova.cz: did not receive HSTS header
|
||||
|
@ -1978,6 +1988,7 @@ forex-dan.com: did not receive HSTS header
|
|||
forgix.com: could not connect to host
|
||||
formazioneopen.it: could not connect to host
|
||||
formula.cf: could not connect to host
|
||||
forty8creates.com: did not receive HSTS header
|
||||
fotiu.com: could not connect to host
|
||||
fotm.net: max-age too low: 30000
|
||||
fotocerita.net: could not connect to host
|
||||
|
@ -2019,10 +2030,10 @@ frenzel.dk: could not connect to host
|
|||
freqlabs.com: did not receive HSTS header
|
||||
freshfind.xyz: could not connect to host
|
||||
freshlymind.com: did not receive HSTS header
|
||||
frezbo.com: could not connect to host
|
||||
frforms.com: did not receive HSTS header
|
||||
friendica.ch: could not connect to host
|
||||
friendlyfiregameshow.com: could not connect to host
|
||||
friendship-quotes.co.uk: could not connect to host
|
||||
frimons.com: could not connect to host
|
||||
froggstack.de: could not connect to host
|
||||
frontisme.nl: could not connect to host
|
||||
|
@ -2030,13 +2041,14 @@ frontmin.com: did not receive HSTS header
|
|||
frost-ci.xyz: could not connect to host
|
||||
fruitusers.com: could not connect to host
|
||||
frusky.net: did not receive HSTS header
|
||||
fsinf.at: did not receive HSTS header
|
||||
fspphoto.com: could not connect to host
|
||||
fstfy.de: could not connect to host
|
||||
ftctele.com: could not connect to host
|
||||
fuckgfw233.org: could not connect to host
|
||||
fukushima-web.com: did not receive HSTS header
|
||||
fulilingyu.info: could not connect to host
|
||||
fullyint.com: could not connect to host
|
||||
fullyint.com: did not receive HSTS header
|
||||
fullytrained.co.uk: did not receive HSTS header
|
||||
fumo.se: max-age too low: 0
|
||||
fun-stamps.de: max-age too low: 86400
|
||||
|
@ -2116,7 +2128,6 @@ gatapro.net: could not connect to host
|
|||
gatorsa.es: did not receive HSTS header
|
||||
gdegem.org: did not receive HSTS header
|
||||
gdpventure.com: max-age too low: 0
|
||||
gdz.tv: did not receive HSTS header
|
||||
gebn.co.uk: did not receive HSTS header
|
||||
gedankenbude.info: could not connect to host
|
||||
geekcast.co.uk: did not receive HSTS header
|
||||
|
@ -2124,6 +2135,7 @@ geeky.software: could not connect to host
|
|||
geemo.top: could not connect to host
|
||||
geeq.ch: could not connect to host
|
||||
geli-graphics.com: did not receive HSTS header
|
||||
gem-indonesia.net: max-age too low: 0
|
||||
genuu.com: could not connect to host
|
||||
genuxation.com: could not connect to host
|
||||
genyaa.com: could not connect to host
|
||||
|
@ -2159,6 +2171,7 @@ getlittleapps.com: did not receive HSTS header
|
|||
getlolaccount.com: could not connect to host
|
||||
getmassage.com.ng: could not connect to host
|
||||
getpake.com: could not connect to host
|
||||
getpuck.com: could not connect to host
|
||||
getremembrall.com: could not connect to host
|
||||
getsello.com: could not connect to host
|
||||
getwarden.net: could not connect to host
|
||||
|
@ -2229,7 +2242,6 @@ goldendata.io: could not connect to host
|
|||
goldminer.ga: could not connect to host
|
||||
goldpros.com: did not receive HSTS header
|
||||
golocal-media.de: could not connect to host
|
||||
gong8.win: could not connect to host
|
||||
gonzalosanchez.mx: did not receive HSTS header
|
||||
goodenough.nz: did not receive HSTS header
|
||||
goodmengroup.de: could not connect to host
|
||||
|
@ -2323,7 +2335,6 @@ gunnarhafdal.com: did not receive HSTS header
|
|||
gunnaro.com: could not connect to host
|
||||
guntbert.net: could not connect to host
|
||||
guoqiang.info: could not connect to host
|
||||
gurochan.ch: could not connect to host
|
||||
gurom.lv: could not connect to host
|
||||
gurusupe.com: could not connect to host
|
||||
guso.gq: could not connect to host
|
||||
|
@ -2427,7 +2438,7 @@ hdrboundless.com: could not connect to host
|
|||
hdsmigrationtool.com: could not connect to host
|
||||
hduin.xyz: could not connect to host
|
||||
hdwallpapers.net: did not receive HSTS header
|
||||
healtious.com: did not receive HSTS header
|
||||
healtious.com: could not connect to host
|
||||
heart.ge: did not receive HSTS header
|
||||
heartlandrentals.com: did not receive HSTS header
|
||||
hearty.space: could not connect to host
|
||||
|
@ -2471,6 +2482,7 @@ hilinemerchandising.com: did not receive HSTS header
|
|||
hillcity.org.nz: did not receive HSTS header
|
||||
hilnu.tk: could not connect to host
|
||||
hintergedanken.com: could not connect to host
|
||||
hintermeier-rae.at: could not connect to host
|
||||
hipercultura.com: did not receive HSTS header
|
||||
hiphopconvention.nl: could not connect to host
|
||||
hitoy.org: did not receive HSTS header
|
||||
|
@ -2491,7 +2503,6 @@ homa.website: could not connect to host
|
|||
homeclouding.de: could not connect to host
|
||||
homedna.com: did not receive HSTS header
|
||||
hometownmall.com: did not receive HSTS header
|
||||
homezhi.com.tw: did not receive HSTS header
|
||||
hongzhaxiaofendui.com: could not connect to host
|
||||
honoo.com: could not connect to host
|
||||
hookandloom.com: did not receive HSTS header
|
||||
|
@ -2590,7 +2601,6 @@ idecode.net: could not connect to host
|
|||
idedr.com: could not connect to host
|
||||
identitylabs.uk: could not connect to host
|
||||
idgsupply.com: could not connect to host
|
||||
idinby.dk: did not receive HSTS header
|
||||
idisplay.es: did not receive HSTS header
|
||||
idlekernel.com: could not connect to host
|
||||
idontexist.me: did not receive HSTS header
|
||||
|
@ -2603,6 +2613,7 @@ ifad.org: did not receive HSTS header
|
|||
ifastuniversity.com: did not receive HSTS header
|
||||
ifleurs.com: could not connect to host
|
||||
ifx.ee: could not connect to host
|
||||
igiftcards.nl: did not receive HSTS header
|
||||
ignatisd.gr: did not receive HSTS header
|
||||
igule.net: could not connect to host
|
||||
ihrlotto.de: could not connect to host
|
||||
|
@ -2686,8 +2697,7 @@ innophate-security.nl: could not connect to host
|
|||
ins1gn1a.com: did not receive HSTS header
|
||||
insane-bullets.com: could not connect to host
|
||||
insane.zone: could not connect to host
|
||||
insite-feedback.com: could not connect to host
|
||||
inspirationalquotesuk.co.uk: could not connect to host
|
||||
insite-feedback.com: did not receive HSTS header
|
||||
inspire-av.com: did not receive HSTS header
|
||||
inspiroinc.com: could not connect to host
|
||||
inspy.me: max-age too low: 0
|
||||
|
@ -2703,7 +2713,6 @@ interhosts.co.za: could not connect to host
|
|||
interim-cto.de: could not connect to host
|
||||
interleucina.org: did not receive HSTS header
|
||||
interlun.com: could not connect to host
|
||||
internect.co.za: did not receive HSTS header
|
||||
internetcasinos.de: could not connect to host
|
||||
internetcensus.org: could not connect to host
|
||||
interserved.com: did not receive HSTS header
|
||||
|
@ -2783,7 +2792,7 @@ itshost.ru: could not connect to host
|
|||
ivi-fertility.com: max-age too low: 0
|
||||
ivi.es: max-age too low: 0
|
||||
ivk.website: could not connect to host
|
||||
iwannarefill.com: did not receive HSTS header
|
||||
iwannarefill.com: could not connect to host
|
||||
ixec2.tk: could not connect to host
|
||||
izdiwho.com: could not connect to host
|
||||
izolight.ch: could not connect to host
|
||||
|
@ -2896,12 +2905,11 @@ jkbuster.com: could not connect to host
|
|||
jko.works: could not connect to host
|
||||
jmdekker.it: could not connect to host
|
||||
joakimalgroy.com: could not connect to host
|
||||
jobmedic.com: did not receive HSTS header
|
||||
jobmedic.com: could not connect to host
|
||||
jobshq.com: did not receive HSTS header
|
||||
jobss.co.uk: did not receive HSTS header
|
||||
joedavison.me: could not connect to host
|
||||
johannes-sprink.de: could not connect to host
|
||||
johannes.io: could not connect to host
|
||||
johnbrownphotography.ch: did not receive HSTS header
|
||||
johners.me: could not connect to host
|
||||
johnhgaunt.com: did not receive HSTS header
|
||||
|
@ -3094,6 +3102,7 @@ kotonehoko.net: could not connect to host
|
|||
kotovstyle.ru: could not connect to host
|
||||
koukni.cz: could not connect to host
|
||||
kourpe.online: could not connect to host
|
||||
kpebetka.net: could not connect to host
|
||||
kprog.net: could not connect to host
|
||||
kr.search.yahoo.com: did not receive HSTS header
|
||||
kralik.xyz: could not connect to host
|
||||
|
@ -3123,6 +3132,7 @@ kupelne-ptacek.sk: did not receive HSTS header
|
|||
kuppingercole.com: did not receive HSTS header
|
||||
kura.io: could not connect to host
|
||||
kurehun.org: could not connect to host
|
||||
kuro346.moe: could not connect to host
|
||||
kurrietv.nl: did not receive HSTS header
|
||||
kurtmclester.com: did not receive HSTS header
|
||||
kurz.pw: could not connect to host
|
||||
|
@ -3201,6 +3211,7 @@ leermotorrijden.nl: max-age too low: 300
|
|||
lefebvristes.com: could not connect to host
|
||||
lefebvristes.fr: could not connect to host
|
||||
legarage.org: did not receive HSTS header
|
||||
legit.nz: could not connect to host
|
||||
leinir.dk: did not receive HSTS header
|
||||
leitner.com.au: did not receive HSTS header
|
||||
leiyun.me: did not receive HSTS header
|
||||
|
@ -3260,7 +3271,6 @@ lifecoach.tw: did not receive HSTS header
|
|||
lifecoachproviders.com: did not receive HSTS header
|
||||
lifeguard.aecom.com: did not receive HSTS header
|
||||
lifeinitsownway.com: could not connect to host
|
||||
lifequotes-uk.co.uk: could not connect to host
|
||||
lifeskillsdirect.com: did not receive HSTS header
|
||||
lifestylehunter.co.uk: did not receive HSTS header
|
||||
lifetimemoneymachine.com: did not receive HSTS header
|
||||
|
@ -3295,7 +3305,6 @@ linuxforyou.com: could not connect to host
|
|||
linuxgeek.ro: could not connect to host
|
||||
linuxmint.cz: did not receive HSTS header
|
||||
linuxmonitoring.net: did not receive HSTS header
|
||||
liquidcomm.net: could not connect to host
|
||||
liquorsanthe.in: could not connect to host
|
||||
lisaco.de: could not connect to host
|
||||
listafirmelor.com: could not connect to host
|
||||
|
@ -3416,7 +3425,6 @@ maderwin.com: did not receive HSTS header
|
|||
mae-berlinistanbul.com: could not connect to host
|
||||
mafamane.com: could not connect to host
|
||||
mafiareturns.com: max-age too low: 2592000
|
||||
mafiasi.de: did not receive HSTS header
|
||||
magenx.com: did not receive HSTS header
|
||||
magia360.com: did not receive HSTS header
|
||||
magilio.com: could not connect to host
|
||||
|
@ -3445,7 +3453,7 @@ mamaxi.org: did not receive HSTS header
|
|||
mammothmail.com: could not connect to host
|
||||
mammothmail.net: could not connect to host
|
||||
mammothmail.org: could not connect to host
|
||||
manaboutahor.se: did not receive HSTS header
|
||||
manaboutahor.se: could not connect to host
|
||||
manage.zenpayroll.com: did not receive HSTS header
|
||||
managemynetsuite.com: did not receive HSTS header
|
||||
maniadeprazer.com.br: could not connect to host
|
||||
|
@ -3531,7 +3539,6 @@ mcga.media: could not connect to host
|
|||
mclab.su: could not connect to host
|
||||
mclist.it: could not connect to host
|
||||
mdfnet.se: did not receive HSTS header
|
||||
mdkr.nl: did not receive HSTS header
|
||||
mdscomp.net: did not receive HSTS header
|
||||
meamod.com: max-age too low: 0
|
||||
mechmk1.me: did not receive HSTS header
|
||||
|
@ -3603,8 +3610,6 @@ michaeldemuth.com: could not connect to host
|
|||
michaelfitzpatrickruth.com: did not receive HSTS header
|
||||
michaelmorpurgo.com: did not receive HSTS header
|
||||
michaelscrivo.com: did not receive HSTS header
|
||||
michaelsulzer.com: could not connect to host
|
||||
michaelsulzer.eu: could not connect to host
|
||||
michaelwaite.org: could not connect to host
|
||||
michal-kral.cz: could not connect to host
|
||||
michalborka.cz: could not connect to host
|
||||
|
@ -3789,7 +3794,6 @@ murrayrun.com: could not connect to host
|
|||
museminder2.com: could not connect to host
|
||||
musewearflipflops.com: could not connect to host
|
||||
mushroomandfern.com: could not connect to host
|
||||
musicchris.de: did not receive HSTS header
|
||||
musikkfondene.no: did not receive HSTS header
|
||||
mustika.cf: could not connect to host
|
||||
mutamatic.com: could not connect to host
|
||||
|
@ -3828,6 +3832,7 @@ mypagella.it: could not connect to host
|
|||
mypension.ca: could not connect to host
|
||||
myphonebox.de: could not connect to host
|
||||
myrig.io: could not connect to host
|
||||
myrig.net: could not connect to host
|
||||
mysecretrewards.com: did not receive HSTS header
|
||||
mystery-science-theater-3000.de: did not receive HSTS header
|
||||
mythlogic.com: did not receive HSTS header
|
||||
|
@ -3861,7 +3866,6 @@ nansay.cn: could not connect to host
|
|||
nanto.eu: could not connect to host
|
||||
naphex.rocks: could not connect to host
|
||||
narada.com.ua: could not connect to host
|
||||
narrativasdigitais.pt: could not connect to host
|
||||
nashira.cz: did not receive HSTS header
|
||||
nasreddine.xyz: could not connect to host
|
||||
natalia-fadeeva.ru: could not connect to host
|
||||
|
@ -3872,6 +3876,7 @@ nathanmfarrugia.com: did not receive HSTS header
|
|||
nationwidevehiclecontracts.co.uk: did not receive HSTS header
|
||||
natural-progesterone.net: could not connect to host
|
||||
naturecoaster.com: did not receive HSTS header
|
||||
naturesorganichaven.com: could not connect to host
|
||||
naturesystems.cz: max-age too low: 0
|
||||
natuurbehangnederland.nl: could not connect to host
|
||||
nauck.org: could not connect to host
|
||||
|
@ -3903,6 +3908,7 @@ neonnuke.tech: could not connect to host
|
|||
neosolution.ca: did not receive HSTS header
|
||||
nephos.xyz: did not receive HSTS header
|
||||
nepustil.net: did not receive HSTS header
|
||||
neris.io: could not connect to host
|
||||
nestedquotes.ca: could not connect to host
|
||||
net-navi.cc: max-age too low: 0
|
||||
netbox.cc: could not connect to host
|
||||
|
@ -3915,7 +3921,7 @@ netresourcedesign.com: did not receive HSTS header
|
|||
nettefoundation.com: could not connect to host
|
||||
networx-online.de: could not connect to host
|
||||
netzbit.de: could not connect to host
|
||||
netzpolitik.org: did not receive HSTS header
|
||||
netzpolitik.org: max-age too low: 2592000
|
||||
netztest.at: did not receive HSTS header
|
||||
netzvieh.de: could not connect to host
|
||||
netzzwerg4u.de: could not connect to host
|
||||
|
@ -3952,7 +3958,6 @@ ngt-service.ru: did not receive HSTS header
|
|||
ni.search.yahoo.com: did not receive HSTS header
|
||||
nibiisclaim.com: could not connect to host
|
||||
nicestresser.fr: could not connect to host
|
||||
nichteinschalten.de: did not receive HSTS header
|
||||
nicky.io: did not receive HSTS header
|
||||
nicoborghuis.nl: could not connect to host
|
||||
nicolasbettag.me: did not receive HSTS header
|
||||
|
@ -4038,6 +4043,7 @@ numero-di-telefono.it: could not connect to host
|
|||
numista.com: did not receive HSTS header
|
||||
nurserybook.co: did not receive HSTS header
|
||||
nusatrip-api.com: did not receive HSTS header
|
||||
nutikell.com: could not connect to host
|
||||
nutritionculture.com: could not connect to host
|
||||
nutsandboltsmedia.com: did not receive HSTS header
|
||||
nwa.xyz: could not connect to host
|
||||
|
@ -4076,6 +4082,7 @@ ogogoshop.com: could not connect to host
|
|||
oiepoie.nl: could not connect to host
|
||||
oishioffice.com: did not receive HSTS header
|
||||
okane.love: could not connect to host
|
||||
oklahomatickets.com: max-age too low: 0
|
||||
okok-rent.com: could not connect to host
|
||||
okok.rent: could not connect to host
|
||||
okutama.in.th: could not connect to host
|
||||
|
@ -4173,8 +4180,7 @@ orionrebellion.com: could not connect to host
|
|||
orleika.ml: could not connect to host
|
||||
orthodoxy.lt: did not receive HSTS header
|
||||
osaiyuwu.com: could not connect to host
|
||||
osborneinn.com: did not receive HSTS header
|
||||
osereso.tn: could not connect to host
|
||||
oscloud.com: could not connect to host
|
||||
oslfoundation.org: could not connect to host
|
||||
osmanlitorunu.com: could not connect to host
|
||||
osp.cx: could not connect to host
|
||||
|
@ -4189,7 +4195,6 @@ othercode.nl: could not connect to host
|
|||
othermedia.cc: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 118" data: no]
|
||||
otherstuff.nl: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 118" data: no]
|
||||
otichi.com: did not receive HSTS header
|
||||
otorrino.pt: could not connect to host
|
||||
ottospora.nl: could not connect to host
|
||||
ourbank.com: did not receive HSTS header
|
||||
outdoorproducts.com: did not receive HSTS header
|
||||
|
@ -4339,7 +4344,7 @@ peytonfarrar.com: did not receive HSTS header
|
|||
pgpm.io: could not connect to host
|
||||
phalconist.com: did not receive HSTS header
|
||||
pharmgkb.org: could not connect to host
|
||||
phillmoore.com: could not connect to host
|
||||
phillmoore.com: did not receive HSTS header
|
||||
phillprice.com: could not connect to host
|
||||
philpropertygroup.com: could not connect to host
|
||||
phoebe.co.nz: did not receive HSTS header
|
||||
|
@ -4394,7 +4399,6 @@ play.google.com: did not receive HSTS header (error ignored - included regardles
|
|||
playerhunter.com: did not receive HSTS header
|
||||
playflick.com: did not receive HSTS header
|
||||
playmaker.io: could not connect to host
|
||||
playmyplay.com: did not receive HSTS header
|
||||
playnation.io: could not connect to host
|
||||
playsharp.com: could not connect to host
|
||||
pleier-it.de: did not receive HSTS header
|
||||
|
@ -4532,6 +4536,7 @@ psw.academy: did not receive HSTS header
|
|||
psw.consulting: did not receive HSTS header
|
||||
ptn.moscow: could not connect to host
|
||||
pubkey.is: could not connect to host
|
||||
publications.qld.gov.au: did not receive HSTS header
|
||||
pugliese.fr: could not connect to host
|
||||
puiterwijk.org: could not connect to host
|
||||
pumpgames.net: could not connect to host
|
||||
|
@ -4553,7 +4558,7 @@ q2.si: did not receive HSTS header
|
|||
qbik.de: did not receive HSTS header
|
||||
qccqld.org.au: could not connect to host
|
||||
qingpat.com: could not connect to host
|
||||
qingxuan.info: max-age too low: 864000
|
||||
qingxuan.info: could not connect to host
|
||||
qinxi1992.com: could not connect to host
|
||||
qionglu.pw: could not connect to host
|
||||
qirinus.com: could not connect to host
|
||||
|
@ -4627,6 +4632,7 @@ rawstorieslondon.com: could not connect to host
|
|||
raydan.space: could not connect to host
|
||||
raydobe.me: could not connect to host
|
||||
razlaw.name: did not receive HSTS header
|
||||
rbensch.com: could not connect to host
|
||||
rbhighinc.org: could not connect to host
|
||||
rbose.org: could not connect to host
|
||||
rbti.me: could not connect to host
|
||||
|
@ -4646,7 +4652,6 @@ realmofespionage.com: could not connect to host
|
|||
reaper.rip: could not connect to host
|
||||
reardenporn.com: could not connect to host
|
||||
rebekaesgabor.online: could not connect to host
|
||||
receitas-de-bolos.pt: could not connect to host
|
||||
receitasdebacalhau.pt: could not connect to host
|
||||
recommended.reviews: could not connect to host
|
||||
redable.hosting: could not connect to host
|
||||
|
@ -4671,10 +4676,10 @@ rehabthailand.nl: could not connect to host
|
|||
reic.me: could not connect to host
|
||||
reikiqueen.uk: could not connect to host
|
||||
reinaldudras.ee: did not receive HSTS header
|
||||
reisyukaku.org: did not receive HSTS header
|
||||
reisyukaku.org: could not connect to host
|
||||
reithguard-it.de: did not receive HSTS header
|
||||
rejo.in: could not connect to host
|
||||
rejuvemedspa.com: could not connect to host
|
||||
rejuvemedspa.com: did not receive HSTS header
|
||||
relaxhavefun.com: did not receive HSTS header
|
||||
relayawards.com: could not connect to host
|
||||
reliable-mail.de: did not receive HSTS header
|
||||
|
@ -4704,6 +4709,7 @@ resama.eu: did not receive HSTS header
|
|||
research.facebook.com: did not receive HSTS header
|
||||
reserve-online.net: did not receive HSTS header
|
||||
residentsinsurance.co.uk: did not receive HSTS header
|
||||
resl20.servehttp.com: could not connect to host
|
||||
respice.xyz: could not connect to host
|
||||
respostas.com.br: did not receive HSTS header
|
||||
restchart.com: did not receive HSTS header
|
||||
|
@ -4749,7 +4755,6 @@ rk6.cz: could not connect to host
|
|||
rkkhok.hu: did not receive HSTS header
|
||||
rkmantpur.org: did not receive HSTS header
|
||||
rme.li: did not receive HSTS header
|
||||
rmstudio.tw: could not connect to host
|
||||
rngmeme.com: could not connect to host
|
||||
roadfeast.com: could not connect to host
|
||||
roan24.pl: did not receive HSTS header
|
||||
|
@ -4775,7 +4780,6 @@ rolemaster.net: could not connect to host
|
|||
rolroer.co.za: could not connect to host
|
||||
romab.com: did not receive HSTS header
|
||||
romans-place.me.uk: could not connect to host
|
||||
romantic-quotes.co.uk: could not connect to host
|
||||
romeoferraris.com: did not receive HSTS header
|
||||
romulusapp.com: could not connect to host
|
||||
ron2k.za.net: could not connect to host
|
||||
|
@ -4883,7 +4887,6 @@ savannahtasteexperience.com: did not receive HSTS header
|
|||
saveyour.biz: did not receive HSTS header
|
||||
sawamura-rental.com: did not receive HSTS header
|
||||
sazima.ru: did not receive HSTS header
|
||||
sazuz.cz: did not receive HSTS header
|
||||
sbiewald.de: could not connect to host
|
||||
sbox-archives.com: could not connect to host
|
||||
sby.de: did not receive HSTS header
|
||||
|
@ -4929,7 +4932,6 @@ scriptict.nl: could not connect to host
|
|||
sdmoscow.ru: could not connect to host
|
||||
sdrobs.com: did not receive HSTS header
|
||||
sdsl-speedtest.de: could not connect to host
|
||||
sealbaker.com: could not connect to host
|
||||
search-one.de: did not receive HSTS header
|
||||
sebastian-lutsch.de: could not connect to host
|
||||
sebster.com: did not receive HSTS header
|
||||
|
@ -4945,6 +4947,7 @@ secondarysurvivorportal.help: could not connect to host
|
|||
secondbyte.nl: could not connect to host
|
||||
secondspace.ca: could not connect to host
|
||||
sectia22.ro: did not receive HSTS header
|
||||
section508.gov: did not receive HSTS header
|
||||
sectun.com: did not receive HSTS header
|
||||
secure-games.us: could not connect to host
|
||||
secure.link: did not receive HSTS header
|
||||
|
@ -5128,7 +5131,6 @@ sloancom.com: did not receive HSTS header
|
|||
slope.haus: could not connect to host
|
||||
slovakiana.sk: did not receive HSTS header
|
||||
slovoice.org: could not connect to host
|
||||
slowfood.es: could not connect to host
|
||||
slycurity.de: did not receive HSTS header
|
||||
smallcdn.rocks: could not connect to host
|
||||
smart-mirror.de: did not receive HSTS header
|
||||
|
@ -5177,6 +5179,7 @@ socomponents.co.uk: did not receive HSTS header
|
|||
sodacore.com: could not connect to host
|
||||
software.rocks: could not connect to host
|
||||
sogeek.me: did not receive HSTS header
|
||||
sogutma.com.tr: did not receive HSTS header
|
||||
sokolka.tv: did not receive HSTS header
|
||||
sol-3.de: did not receive HSTS header
|
||||
solidfuelappliancespares.co.uk: did not receive HSTS header
|
||||
|
@ -5190,8 +5193,8 @@ sonic.network: did not receive HSTS header
|
|||
sonicrainboom.rocks: did not receive HSTS header
|
||||
soobi.org: did not receive HSTS header
|
||||
soondy.com: did not receive HSTS header
|
||||
soph.us: could not connect to host
|
||||
sosaka.ml: could not connect to host
|
||||
sosiolog.com: did not receive HSTS header
|
||||
sotiran.com: did not receive HSTS header
|
||||
sotor.de: did not receive HSTS header
|
||||
soucorneteiro.com.br: could not connect to host
|
||||
|
@ -5221,7 +5224,6 @@ speculor.net: could not connect to host
|
|||
speed-mailer.com: could not connect to host
|
||||
speedcounter.net: did not receive HSTS header
|
||||
speedmann.de: could not connect to host
|
||||
speeds.vip: did not receive HSTS header
|
||||
speedy.lt: max-age too low: 0
|
||||
speedyprep.com: did not receive HSTS header
|
||||
speidel.com.tr: did not receive HSTS header
|
||||
|
@ -5248,6 +5250,7 @@ spreadsheets.google.com: did not receive HSTS header (error ignored - included r
|
|||
sproutconnections.com: did not receive HSTS header
|
||||
sprutech.de: did not receive HSTS header
|
||||
sprybear.com: max-age too low: 0
|
||||
squaddraft.com: did not receive HSTS header
|
||||
square.gs: could not connect to host
|
||||
squatldf.org: did not receive HSTS header
|
||||
sqzryang.com: did not receive HSTS header
|
||||
|
@ -5275,7 +5278,6 @@ staffjoystaging.com: did not receive HSTS header
|
|||
stahl.xyz: could not connect to host
|
||||
stalkerhispano.com: max-age too low: 0
|
||||
stalschermer.nl: could not connect to host
|
||||
stamonicatourandtravel.com: could not connect to host
|
||||
standardssuck.org: did not receive HSTS header
|
||||
standingmist.com: did not receive HSTS header
|
||||
starandshield.com: did not receive HSTS header
|
||||
|
@ -5283,6 +5285,7 @@ stargatepartners.com: did not receive HSTS header
|
|||
starmusic.ga: did not receive HSTS header
|
||||
starttraffic.com: did not receive HSTS header
|
||||
startuponcloud.com: max-age too low: 2678400
|
||||
startuppeople.co.uk: could not connect to host
|
||||
stash.ai: did not receive HSTS header
|
||||
state-sponsored-actors.net: could not connect to host
|
||||
statementinsertsforless.com: did not receive HSTS header
|
||||
|
@ -5318,6 +5321,7 @@ stn.me.uk: did not receive HSTS header
|
|||
stockseyeserum.com: could not connect to host
|
||||
stocktrade.de: could not connect to host
|
||||
stoffe-monster.de: did not receive HSTS header
|
||||
stoick.me: could not connect to host
|
||||
stole-my.bike: could not connect to host
|
||||
stole-my.tv: could not connect to host
|
||||
stopwoodfin.org: could not connect to host
|
||||
|
@ -5401,7 +5405,9 @@ sv.search.yahoo.com: did not receive HSTS header
|
|||
svarovani.tk: could not connect to host
|
||||
svatba-frantovi.cz: could not connect to host
|
||||
svenluijten.com: did not receive HSTS header
|
||||
sviz.pro: could not connect to host
|
||||
swdatlantico.pt: could not connect to host
|
||||
sweetll.me: could not connect to host
|
||||
sweetstreats.ca: could not connect to host
|
||||
swehack.org: could not connect to host
|
||||
swimbee.nl: did not receive HSTS header
|
||||
|
@ -5443,6 +5449,7 @@ t0dd.eu: could not connect to host
|
|||
t4c-rebirth.com: could not connect to host
|
||||
t4x.org: did not receive HSTS header
|
||||
taabe.xyz: could not connect to host
|
||||
tacklog.com: could not connect to host
|
||||
tacomafia.net: did not receive HSTS header
|
||||
tadigitalstore.com: could not connect to host
|
||||
tafoma.com: did not receive HSTS header
|
||||
|
@ -5458,6 +5465,7 @@ talktwincities.com: could not connect to host
|
|||
tallr.se: could not connect to host
|
||||
tallshoe.com: could not connect to host
|
||||
tamex.xyz: could not connect to host
|
||||
tanak3n.xyz: did not receive HSTS header
|
||||
tandarts-haarlem.nl: did not receive HSTS header
|
||||
tangel.me: could not connect to host
|
||||
tangibilizing.com: could not connect to host
|
||||
|
@ -5468,10 +5476,11 @@ taozj.org: did not receive HSTS header
|
|||
tapfinder.ca: could not connect to host
|
||||
tapka.cz: did not receive HSTS header
|
||||
tappublisher.com: did not receive HSTS header
|
||||
taravancil.com: did not receive HSTS header
|
||||
taravancil.com: could not connect to host
|
||||
tarhauskielto.fi: did not receive HSTS header
|
||||
tartaneagle.org.uk: could not connect to host
|
||||
tartaros.fi: could not connect to host
|
||||
taskotron.fedoraproject.org: could not connect to host
|
||||
taskstats.com: could not connect to host
|
||||
taskulu.ir: could not connect to host
|
||||
tasmansecurity.com: could not connect to host
|
||||
|
@ -5579,7 +5588,6 @@ thecoffeehouse.xyz: could not connect to host
|
|||
theelitebuzz.com: did not receive HSTS header
|
||||
theendofzion.com: did not receive HSTS header
|
||||
theescapistswiki.com: could not connect to host
|
||||
theeyeopener.com: did not receive HSTS header
|
||||
thefarbeyond.com: could not connect to host
|
||||
theflowerbasketonline.com: could not connect to host
|
||||
thefootballanalyst.com: did not receive HSTS header
|
||||
|
@ -5595,6 +5603,7 @@ thehistory.me: could not connect to host
|
|||
thehonorguard.org: did not receive HSTS header
|
||||
thehoopsarchive.com: could not connect to host
|
||||
theinvisibletrailer.com: could not connect to host
|
||||
theitsage.com: could not connect to host
|
||||
thejserver.de: could not connect to host
|
||||
themarble.co: could not connect to host
|
||||
themicrocapital.com: could not connect to host
|
||||
|
@ -5654,7 +5663,9 @@ tiliaze.be: could not connect to host
|
|||
tiliaze.biz: could not connect to host
|
||||
tiliaze.eu: did not receive HSTS header
|
||||
tiliaze.info: could not connect to host
|
||||
tiliaze.net: could not connect to host
|
||||
tilkah.com.au: could not connect to host
|
||||
tillcraft.com: could not connect to host
|
||||
timbeilby.com: could not connect to host
|
||||
timbuktutimber.com: did not receive HSTS header
|
||||
timcamara.com: did not receive HSTS header
|
||||
|
@ -5681,6 +5692,7 @@ tittarpuls.se: could not connect to host
|
|||
titties.ml: could not connect to host
|
||||
tjc.wiki: could not connect to host
|
||||
tkappertjedemetamorfose.nl: could not connect to host
|
||||
tlach.cz: did not receive HSTS header
|
||||
tlcdn.net: could not connect to host
|
||||
tlo.hosting: could not connect to host
|
||||
tlo.link: did not receive HSTS header
|
||||
|
@ -5703,6 +5715,7 @@ todo.is: did not receive HSTS header
|
|||
todobazar.es: could not connect to host
|
||||
tofu.im: could not connect to host
|
||||
togelonlinecommunity.com: did not receive HSTS header
|
||||
tojeto.eu: could not connect to host
|
||||
tokenloan.com: could not connect to host
|
||||
tokoone.com: did not receive HSTS header
|
||||
tollmanz.com: did not receive HSTS header
|
||||
|
@ -5722,6 +5735,7 @@ topmarine.se: could not connect to host
|
|||
topnewstoday.org: could not connect to host
|
||||
topshelfguild.com: could not connect to host
|
||||
torahanytime.com: did not receive HSTS header
|
||||
torchl.it: could not connect to host
|
||||
torlock.download: could not connect to host
|
||||
torproject.org.uk: could not connect to host
|
||||
torrentdownloads.bid: could not connect to host
|
||||
|
@ -6017,6 +6031,7 @@ visitbroadstairs.com: could not connect to host
|
|||
vissanum.com: did not receive HSTS header
|
||||
vistaalmar.es: could not connect to host
|
||||
vistarait.com: did not receive HSTS header
|
||||
visualvotes.co.uk: could not connect to host
|
||||
vitagenda.nl: could not connect to host
|
||||
vitalita.cz: did not receive HSTS header
|
||||
vitalorange.com: did not receive HSTS header
|
||||
|
@ -6073,7 +6088,6 @@ walnutgaming.co.uk: could not connect to host
|
|||
walterlynnmosley.com: did not receive HSTS header
|
||||
wan.pp.ua: could not connect to host
|
||||
wanban.io: could not connect to host
|
||||
wangjiatun.com.tw: did not receive HSTS header
|
||||
wangjun.me: did not receive HSTS header
|
||||
wangqiliang.xn--fiqs8s: could not connect to host
|
||||
wangzuan168.cc: did not receive HSTS header
|
||||
|
@ -6161,6 +6175,7 @@ whats.io: could not connect to host
|
|||
whatsstalk.me: could not connect to host
|
||||
whatsyouroffer.co.uk: did not receive HSTS header
|
||||
when-release.com: did not receive HSTS header
|
||||
wheresben.today: could not connect to host
|
||||
whisker.network: could not connect to host
|
||||
whitehat.id: could not connect to host
|
||||
whiterabbit.org: did not receive HSTS header
|
||||
|
@ -6186,6 +6201,7 @@ willosagiede.com: did not receive HSTS header
|
|||
winaes.com: did not receive HSTS header
|
||||
winclient.cn: could not connect to host
|
||||
windowsphoneblog.it: max-age too low: 0
|
||||
winebid.com: could not connect to host
|
||||
winecodeavocado.com: could not connect to host
|
||||
winged.io: could not connect to host
|
||||
wingumd.net: could not connect to host
|
||||
|
@ -6278,6 +6294,7 @@ wxukang.cn: could not connect to host
|
|||
wybmabiity.com: could not connect to host
|
||||
x-power-detox.com: could not connect to host
|
||||
x-ripped-hd.com: could not connect to host
|
||||
x1616.tk: could not connect to host
|
||||
x2w.io: could not connect to host
|
||||
x3led.com: could not connect to host
|
||||
x509.pub: could not connect to host
|
||||
|
@ -6406,6 +6423,7 @@ yourcomputer.expert: did not receive HSTS header
|
|||
yoursecondphone.co: could not connect to host
|
||||
yourstrongbox.com: could not connect to host
|
||||
yoyoost.duckdns.org: could not connect to host
|
||||
ypid.de: could not connect to host
|
||||
ypiresia.fr: could not connect to host
|
||||
ytcuber.xyz: could not connect to host
|
||||
yu.gg: did not receive HSTS header
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -25,15 +25,7 @@ function makePersona(id) {
|
|||
function run_test() {
|
||||
_("Test fixtures.");
|
||||
// read our custom prefs file before doing anything.
|
||||
Services.prefs.readUserPrefs(do_get_file("prefs_test_prefs_store.js"));
|
||||
// Now we've read from this file, any writes the pref service makes will be
|
||||
// back to this prefs_test_prefs_store.js directly in the obj dir. This
|
||||
// upsets things in confusing ways :) We avoid this by explicitly telling the
|
||||
// pref service to use a file in our profile dir.
|
||||
let prefFile = do_get_profile();
|
||||
prefFile.append("prefs.js");
|
||||
Services.prefs.savePrefFile(prefFile);
|
||||
Services.prefs.readUserPrefs(prefFile);
|
||||
Services.prefs.readUserPrefsFromFile(do_get_file("prefs_test_prefs_store.js"));
|
||||
|
||||
let store = Service.engineManager.get("prefs")._store;
|
||||
let prefs = new Preferences();
|
||||
|
|
|
@ -53,9 +53,3 @@ if (json.substs.MOZ_ANDROID_PACKAGE_INSTALL_BOUNCER) {
|
|||
// tries to configure the project even once, and as a side benefit
|
||||
// saves invoking |mach environment| multiple times.
|
||||
gradle.ext.mozconfig = json
|
||||
|
||||
if (!gradle.ext.mozconfig.substs.COMPILE_ENVIRONMENT) {
|
||||
// These should really come from the included binaries, but that's not easy.
|
||||
gradle.ext.mozconfig.substs.TARGET_XPCOM_ABI = 'arm-eabi-gcc3'
|
||||
}
|
||||
gradle.ext.mozconfig.substs.MOZ_APP_ABI = gradle.ext.mozconfig.substs.TARGET_XPCOM_ABI
|
||||
|
|
|
@ -67,6 +67,7 @@ linux64-devedition/opt:
|
|||
- opt-only-tests
|
||||
- desktop-screenshot-capture
|
||||
- headless
|
||||
- talos
|
||||
|
||||
# TODO: use 'pgo' and 'asan' labels here, instead of -pgo/opt
|
||||
linux64-pgo/opt:
|
||||
|
|
|
@ -41,7 +41,7 @@ PER_PROJECT_PARAMETERS = {
|
|||
'optimize_target_tasks': True,
|
||||
# By default, the `try_option_syntax` `target_task_method` ignores this
|
||||
# parameter, and enables/disables nightlies depending whether
|
||||
# `--include-nightly` is specified in the commmit message.
|
||||
# `--include-nightly` is specified in the commit message.
|
||||
# We're setting the `include_nightly` parameter to True here for when
|
||||
# we submit decision tasks against Try that use other
|
||||
# `target_task_method`s, like `nightly_fennec` or `mozilla_beta_tasks`,
|
||||
|
|
|
@ -26,6 +26,7 @@ BUILDER_NAME_PREFIX = {
|
|||
'linux64-ccov': 'Ubuntu Code Coverage VM 12.04 x64',
|
||||
'linux64-jsdcov': 'Ubuntu Code Coverage VM 12.04 x64',
|
||||
'linux64-stylo': 'Ubuntu VM 12.04 x64',
|
||||
'linux64-devedition-nightly': 'Ubuntu VM 12.04 x64 DevEdition',
|
||||
'macosx64': 'Rev7 MacOSX Yosemite 10.10.5',
|
||||
'macosx64-devedition': 'Rev7 MacOSX Yosemite 10.10.5 DevEdition',
|
||||
'android-4.3-arm7-api-15': 'Android 4.3 armv7 API 15+',
|
||||
|
|
|
@ -251,9 +251,9 @@ MarionetteComponent.prototype.init = function () {
|
|||
}
|
||||
|
||||
// Delay initialization until we are done with delayed startup...
|
||||
Services.tm.mainThread.idleDispatch(() => {
|
||||
Services.tm.idleDispatchToMainThread(() => {
|
||||
// ... and with startup tests.
|
||||
Services.tm.mainThread.idleDispatch(() => {
|
||||
Services.tm.idleDispatchToMainThread(() => {
|
||||
let s;
|
||||
try {
|
||||
Cu.import("chrome://marionette/content/server.js");
|
||||
|
|
|
@ -1280,7 +1280,7 @@ GeckoDriver.prototype.setWindowRect = async function (cmd, resp) {
|
|||
// Throttle resize event by forcing the event queue to flush and delay
|
||||
// until the main thread is idle.
|
||||
function optimisedResize (resolve) {
|
||||
return () => Services.tm.mainThread.idleDispatch(() => {
|
||||
return () => Services.tm.idleDispatchToMainThread(() => {
|
||||
win.requestAnimationFrame(resolve);
|
||||
});
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
[canvas_complexshapes_beziercurveto_001.htm]
|
||||
type: reftest
|
||||
disabled: if (os == "win") and (version == "10.0.15603"): https://bugzilla.mozilla.org/show_bug.cgi?id=1372037
|
||||
expected:
|
||||
if not debug and (os == "linux") and (processor == "x86") and (bits == 32): FAIL
|
||||
if not debug and (os == "linux") and (processor == "x86_64") and (bits == 64): FAIL
|
||||
|
|
|
@ -64843,6 +64843,16 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"service-workers/service-worker/resources/bytecheck-worker-imported-script.py": [
|
||||
[
|
||||
{}
|
||||
]
|
||||
],
|
||||
"service-workers/service-worker/resources/bytecheck-worker.py": [
|
||||
[
|
||||
{}
|
||||
]
|
||||
],
|
||||
"service-workers/service-worker/resources/claim-with-redirect-iframe.html": [
|
||||
[
|
||||
{}
|
||||
|
@ -127676,6 +127686,12 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"service-workers/service-worker/update-bytecheck.https.html": [
|
||||
[
|
||||
"/service-workers/service-worker/update-bytecheck.https.html",
|
||||
{}
|
||||
]
|
||||
],
|
||||
"service-workers/service-worker/update-recovery.https.html": [
|
||||
[
|
||||
"/service-workers/service-worker/update-recovery.https.html",
|
||||
|
@ -213561,6 +213577,14 @@
|
|||
"0ddb4f1cf84729ed673295719ec58a3e5d600a12",
|
||||
"support"
|
||||
],
|
||||
"service-workers/service-worker/resources/bytecheck-worker-imported-script.py": [
|
||||
"772d029d4efbe22f62f3473d4afe9e501a792571",
|
||||
"support"
|
||||
],
|
||||
"service-workers/service-worker/resources/bytecheck-worker.py": [
|
||||
"2693790af1dcd812bc3741db7fa355e23eef0e01",
|
||||
"support"
|
||||
],
|
||||
"service-workers/service-worker/resources/claim-with-redirect-iframe.html": [
|
||||
"fdc472f4e9a591f0b471174b2aa1783107731f49",
|
||||
"support"
|
||||
|
@ -214353,6 +214377,10 @@
|
|||
"7c8c6c3edca83d54f1838eccf3afb0b1223c7a44",
|
||||
"testharness"
|
||||
],
|
||||
"service-workers/service-worker/update-bytecheck.https.html": [
|
||||
"6562348b198124822297c6b622c3e63870427672",
|
||||
"testharness"
|
||||
],
|
||||
"service-workers/service-worker/update-recovery.https.html": [
|
||||
"aac5705d6844e4a33200418504adb57053a45be2",
|
||||
"testharness"
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
[imageset.https.sub.html]
|
||||
type: testharness
|
||||
disabled: https://bugzilla.mozilla.org/show_bug.cgi?id=1373780
|
||||
[Makes sure imageset blockable resources are not downloaded]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
import time
|
||||
|
||||
def main(request, response):
|
||||
headers = [('Content-Type', 'application/javascript'),
|
||||
('Cache-Control', 'max-age=0')]
|
||||
|
||||
imported_content_type = ''
|
||||
if 'imported' in request.GET:
|
||||
imported_content_type = request.GET['imported']
|
||||
|
||||
imported_content = 'default'
|
||||
if imported_content_type == 'time':
|
||||
imported_content = time.time()
|
||||
|
||||
body = '''
|
||||
// %s
|
||||
''' % (imported_content)
|
||||
|
||||
return headers, body
|
|
@ -0,0 +1,32 @@
|
|||
import time
|
||||
|
||||
def main(request, response):
|
||||
headers = [('Content-Type', 'application/javascript'),
|
||||
('Cache-Control', 'max-age=0')]
|
||||
|
||||
main_content_type = ''
|
||||
if 'main' in request.GET:
|
||||
main_content_type = request.GET['main']
|
||||
|
||||
main_content = 'default'
|
||||
if main_content_type == 'time':
|
||||
main_content = time.time()
|
||||
|
||||
imported_request_path = ''
|
||||
if 'path' in request.GET:
|
||||
imported_request_path = request.GET['path']
|
||||
|
||||
imported_request_type = ''
|
||||
if 'imported' in request.GET:
|
||||
imported_request_type = request.GET['imported']
|
||||
|
||||
imported_request = ''
|
||||
if imported_request_type == 'time':
|
||||
imported_request = '?imported=time';
|
||||
|
||||
body = '''
|
||||
// %s
|
||||
importScripts('%sbytecheck-worker-imported-script.py%s');
|
||||
''' % (main_content, imported_request_path, imported_request)
|
||||
|
||||
return headers, body
|
|
@ -0,0 +1,72 @@
|
|||
<!doctype html>
|
||||
<meta charset=utf-8>
|
||||
<title></title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="resources/testharness-helpers.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="resources/test-helpers.sub.js"></script>
|
||||
<script>
|
||||
|
||||
/*
|
||||
* @param bolean cors
|
||||
* Determine wether the imported script should be a cross origin script.
|
||||
* @param string main
|
||||
* Decide the content of the main script, where 'default' is for constant
|
||||
* content while 'time' is for time-variant content.
|
||||
* @param string imported
|
||||
* Decide the content of the imported script, where 'default' is for constant
|
||||
* content while 'time' is for time-variant content.
|
||||
*/
|
||||
const settings = [{cors: false, main: 'default', imported: 'default'},
|
||||
{cors: false, main: 'default', imported: 'time' },
|
||||
{cors: false, main: 'time', imported: 'default'},
|
||||
{cors: false, main: 'time', imported: 'time' },
|
||||
{cors: true, main: 'default', imported: 'default'},
|
||||
{cors: true, main: 'default', imported: 'time' },
|
||||
{cors: true, main: 'time', imported: 'default'},
|
||||
{cors: true, main: 'time', imported: 'time' }];
|
||||
|
||||
settings.reduce((p, s) => {
|
||||
return p.then(promise_test(function(t) {
|
||||
var path = !s.cors ? ''
|
||||
: 'https://www1.web-platform.test:8443/' +
|
||||
'service-workers/service-worker/resources/';
|
||||
var script = 'resources/bytecheck-worker.py' +
|
||||
'?main=' + s.main +
|
||||
'&imported=' + s.imported +
|
||||
'&path=' + path;
|
||||
var scope = 'resources/blank.html';
|
||||
|
||||
var swr, sw;
|
||||
return Promise.resolve()
|
||||
// Register a service worker.
|
||||
.then(_ => service_worker_unregister_and_register(t, script, scope))
|
||||
.then(r => swr = r)
|
||||
.then(_ => wait_for_update(t, swr))
|
||||
.then(w => sw = w)
|
||||
.then(_ => wait_for_state(t, sw, 'activated'))
|
||||
.then(_ => assert_array_equals([swr.active,
|
||||
swr.waiting,
|
||||
swr.installing],
|
||||
[sw, null, null]))
|
||||
|
||||
// Update the service worker registration.
|
||||
.then(_ => swr.update())
|
||||
.then(_ => {
|
||||
// If there should be a new service worker.
|
||||
if (s.main === 'time' || s.imported === 'time') {
|
||||
return wait_for_update(t, swr);
|
||||
}
|
||||
// Otherwise, make sure there is no newly created service worker.
|
||||
assert_array_equals([swr.active,
|
||||
swr.waiting,
|
||||
swr.installing],
|
||||
[sw, null, null]);
|
||||
})
|
||||
|
||||
// Unregister the service worker.
|
||||
.then(_ => service_worker_unregister_and_done(t, scope));
|
||||
}, `Test(cors: ${s.cors}, main: ${s.main}, imported: ${s.imported})`));
|
||||
}, Promise.resolve());
|
||||
|
||||
</script>
|
|
@ -317,6 +317,45 @@ security:
|
|||
record_in_processes:
|
||||
- main
|
||||
|
||||
preferences:
|
||||
created_new_user_prefs_file:
|
||||
bug_numbers:
|
||||
- 1367813
|
||||
description: >-
|
||||
A boolean indicating that profile/prefs.js was not found and it is being
|
||||
created for the first time in this session.
|
||||
expires: "62"
|
||||
kind: boolean
|
||||
notification_emails:
|
||||
- bsmedberg@mozilla.com
|
||||
release_channel_collection: opt-out
|
||||
record_in_processes:
|
||||
- main
|
||||
prefs_file_was_invalid:
|
||||
bug_numbers:
|
||||
- 1367813
|
||||
description: >-
|
||||
Set to true if a failure occurred reading profile/prefs.js.
|
||||
expires: "62"
|
||||
kind: boolean
|
||||
notification_emails:
|
||||
- bsmedberg@mozilla.com
|
||||
release_channel_collection: opt-out
|
||||
record_in_processes:
|
||||
- main
|
||||
read_user_js:
|
||||
bug_numbers:
|
||||
- 1367813
|
||||
description: >-
|
||||
Set to true if user.js exists and was read.
|
||||
expires: "62"
|
||||
kind: boolean
|
||||
notification_emails:
|
||||
- bsmedberg@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
|
||||
# For more info on STUN, see https://tools.ietf.org/html/rfc5389
|
||||
|
|
|
@ -1883,22 +1883,27 @@ void TelemetryHistogram::InitializeGlobalState(bool canRecordBase,
|
|||
}
|
||||
}
|
||||
|
||||
// Some Telemetry histograms depend on the value of C++ constants and hardcode
|
||||
// their values in Histograms.json.
|
||||
// We add static asserts here for those values to match so that future changes
|
||||
// don't go unnoticed.
|
||||
// TODO: Compare explicitly with gHistograms[<histogram id>].bucketCount here
|
||||
// once we can make gHistograms constexpr (requires VS2015).
|
||||
static_assert((JS::gcreason::NUM_TELEMETRY_REASONS == 100),
|
||||
"NUM_TELEMETRY_REASONS is assumed to be a fixed value in Histograms.json."
|
||||
" If this was an intentional change, update this assert with its value "
|
||||
"and update the n_values for the following in Histograms.json: "
|
||||
"GC_MINOR_REASON, GC_MINOR_REASON_LONG, GC_REASON_2");
|
||||
static_assert((mozilla::StartupTimeline::MAX_EVENT_ID == 16),
|
||||
"MAX_EVENT_ID is assumed to be a fixed value in Histograms.json. If this"
|
||||
" was an intentional change, update this assert with its value and update"
|
||||
" the n_values for the following in Histograms.json:"
|
||||
" STARTUP_MEASUREMENT_ERRORS");
|
||||
// Some Telemetry histograms depend on the value of C++ constants and hardcode
|
||||
// their values in Histograms.json.
|
||||
// We add static asserts here for those values to match so that future changes
|
||||
// don't go unnoticed.
|
||||
static_assert((JS::gcreason::NUM_TELEMETRY_REASONS + 1) ==
|
||||
gHistograms[mozilla::Telemetry::GC_MINOR_REASON].bucketCount &&
|
||||
(JS::gcreason::NUM_TELEMETRY_REASONS + 1) ==
|
||||
gHistograms[mozilla::Telemetry::GC_MINOR_REASON_LONG].bucketCount &&
|
||||
(JS::gcreason::NUM_TELEMETRY_REASONS + 1) ==
|
||||
gHistograms[mozilla::Telemetry::GC_REASON_2].bucketCount,
|
||||
"NUM_TELEMETRY_REASONS is assumed to be a fixed value in Histograms.json."
|
||||
" If this was an intentional change, update the n_values for the "
|
||||
"following in Histograms.json: GC_MINOR_REASON, GC_MINOR_REASON_LONG, "
|
||||
"GC_REASON_2");
|
||||
|
||||
static_assert((mozilla::StartupTimeline::MAX_EVENT_ID + 1) ==
|
||||
gHistograms[mozilla::Telemetry::STARTUP_MEASUREMENT_ERRORS].bucketCount,
|
||||
"MAX_EVENT_ID is assumed to be a fixed value in Histograms.json. If this"
|
||||
" was an intentional change, update the n_values for the following in "
|
||||
"Histograms.json: STARTUP_MEASUREMENT_ERRORS");
|
||||
|
||||
|
||||
gInitDone = true;
|
||||
}
|
||||
|
|
|
@ -57,7 +57,7 @@ function LOG(string) {
|
|||
* @constructor
|
||||
*/
|
||||
function TimerManager() {
|
||||
Services.obs.addObserver(this, "xpcom-shutdown");
|
||||
Services.obs.addObserver(this, "profile-before-change");
|
||||
}
|
||||
TimerManager.prototype = {
|
||||
/**
|
||||
|
@ -109,8 +109,8 @@ TimerManager.prototype = {
|
|||
this._canEnsureTimer = true;
|
||||
this._ensureTimer(firstInterval);
|
||||
break;
|
||||
case "xpcom-shutdown":
|
||||
Services.obs.removeObserver(this, "xpcom-shutdown");
|
||||
case "profile-before-change":
|
||||
Services.obs.removeObserver(this, "profile-before-change");
|
||||
|
||||
// Release everything we hold onto.
|
||||
this._cancelTimer();
|
||||
|
|
|
@ -348,7 +348,7 @@ function run_test() {
|
|||
}
|
||||
|
||||
function end_test() {
|
||||
gUTM.observe(null, "xpcom-shutdown", "");
|
||||
gUTM.observe(null, "profile-before-change", "");
|
||||
do_test_finished();
|
||||
}
|
||||
|
||||
|
|
|
@ -315,6 +315,8 @@ static ChildMinidumpMap* pidToMinidump;
|
|||
static uint32_t crashSequence;
|
||||
static bool OOPInitialized();
|
||||
|
||||
static nsIThread* sMinidumpWriterThread;
|
||||
|
||||
#ifdef MOZ_CRASHREPORTER_INJECTOR
|
||||
static nsIThread* sInjectorThread;
|
||||
|
||||
|
@ -3560,6 +3562,11 @@ OOPDeinit()
|
|||
}
|
||||
#endif
|
||||
|
||||
if (sMinidumpWriterThread) {
|
||||
sMinidumpWriterThread->Shutdown();
|
||||
NS_RELEASE(sMinidumpWriterThread);
|
||||
}
|
||||
|
||||
delete crashServer;
|
||||
crashServer = nullptr;
|
||||
|
||||
|
@ -4042,17 +4049,30 @@ bool TakeMinidump(nsIFile** aResult, bool aMoveToPending)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
CreateMinidumpsAndPair(ProcessHandle aTargetPid,
|
||||
ThreadId aTargetBlamedThread,
|
||||
const nsACString& aIncomingPairName,
|
||||
nsIFile* aIncomingDumpToPair,
|
||||
nsIFile** aMainDumpOut)
|
||||
inline void
|
||||
InvokeCallback(bool aAsync,
|
||||
std::function<void()>&& aCallback,
|
||||
RefPtr<nsIThread>&& aCallbackThread)
|
||||
{
|
||||
if (!GetEnabled()) {
|
||||
return false;
|
||||
if (aAsync) {
|
||||
MOZ_ASSERT(!!aCallbackThread);
|
||||
Unused << aCallbackThread->Dispatch(NS_NewRunnableFunction(Move(aCallback)),
|
||||
NS_DISPATCH_SYNC);
|
||||
} else {
|
||||
aCallback();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
CreateMinidumpsAndPairInternal(ProcessHandle aTargetPid,
|
||||
ThreadId aTargetBlamedThread,
|
||||
nsCString aIncomingPairName,
|
||||
nsCOMPtr<nsIFile> aIncomingDumpToPair,
|
||||
nsIFile** aMainDumpOut,
|
||||
std::function<void(bool)>&& aCallback,
|
||||
RefPtr<nsIThread>&& aCallbackThread,
|
||||
bool aAsync)
|
||||
{
|
||||
AutoIOInterposerDisable disableIOInterposition;
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
|
@ -4068,6 +4088,7 @@ CreateMinidumpsAndPair(ProcessHandle aTargetPid,
|
|||
dump_path = gExceptionHandler->minidump_descriptor().directory();
|
||||
#endif
|
||||
|
||||
std::function<void()> runnable;
|
||||
// dump the target
|
||||
nsCOMPtr<nsIFile> targetMinidump;
|
||||
if (!google_breakpad::ExceptionHandler::WriteMinidumpForChild(
|
||||
|
@ -4079,8 +4100,13 @@ CreateMinidumpsAndPair(ProcessHandle aTargetPid,
|
|||
#ifdef XP_WIN32
|
||||
, GetMinidumpType()
|
||||
#endif
|
||||
))
|
||||
return false;
|
||||
)) {
|
||||
runnable = [&](){
|
||||
aCallback(false);
|
||||
};
|
||||
InvokeCallback(aAsync, Move(runnable), Move(aCallbackThread));
|
||||
return;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIFile> targetExtra;
|
||||
GetExtraFileForMinidump(targetMinidump, getter_AddRefs(targetExtra));
|
||||
|
@ -4099,24 +4125,80 @@ CreateMinidumpsAndPair(ProcessHandle aTargetPid,
|
|||
, GetMinidumpType()
|
||||
#endif
|
||||
)) {
|
||||
targetMinidump->Remove(false);
|
||||
targetExtra->Remove(false);
|
||||
return false;
|
||||
runnable = [&](){
|
||||
targetMinidump->Remove(false);
|
||||
targetExtra->Remove(false);
|
||||
aCallback(false);
|
||||
};
|
||||
InvokeCallback(aAsync, Move(runnable), Move(aCallbackThread));
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
incomingDump = aIncomingDumpToPair;
|
||||
}
|
||||
|
||||
RenameAdditionalHangMinidump(incomingDump, targetMinidump, aIncomingPairName);
|
||||
runnable = [&](){
|
||||
RenameAdditionalHangMinidump(incomingDump, targetMinidump, aIncomingPairName);
|
||||
|
||||
if (ShouldReport()) {
|
||||
MoveToPending(targetMinidump, targetExtra, nullptr);
|
||||
MoveToPending(incomingDump, nullptr, nullptr);
|
||||
if (ShouldReport()) {
|
||||
MoveToPending(targetMinidump, targetExtra, nullptr);
|
||||
MoveToPending(incomingDump, nullptr, nullptr);
|
||||
}
|
||||
|
||||
targetMinidump.forget(aMainDumpOut);
|
||||
aIncomingPairName = nullptr; // Release the ptr on the main thread.
|
||||
|
||||
aCallback(true);
|
||||
};
|
||||
InvokeCallback(aAsync, Move(runnable), Move(aCallbackThread));
|
||||
}
|
||||
|
||||
void
|
||||
CreateMinidumpsAndPair(ProcessHandle aTargetPid,
|
||||
ThreadId aTargetBlamedThread,
|
||||
const nsACString& aIncomingPairName,
|
||||
nsIFile* aIncomingDumpToPair,
|
||||
nsIFile** aMainDumpOut,
|
||||
std::function<void(bool)>&& aCallback,
|
||||
bool aAsync)
|
||||
{
|
||||
if (!GetEnabled()) {
|
||||
aCallback(false);
|
||||
return;
|
||||
}
|
||||
|
||||
targetMinidump.forget(aMainDumpOut);
|
||||
if (aAsync &&
|
||||
!sMinidumpWriterThread &&
|
||||
NS_FAILED(NS_NewNamedThread("Minidump Writer", &sMinidumpWriterThread))) {
|
||||
aCallback(false);
|
||||
return;
|
||||
}
|
||||
|
||||
return true;
|
||||
nsCOMPtr<nsIFile> incomingDumpToPair = aIncomingDumpToPair;
|
||||
nsCString incomingPairName(aIncomingPairName);
|
||||
std::function<void(bool)> callback = Move(aCallback);
|
||||
// Don't call do_GetCurrentThread() is this is called synchronously because
|
||||
// 1. it's unnecessary, and 2. more importantly, it might create one if called
|
||||
// from a native thread, and the thread will be leakded.
|
||||
RefPtr<nsIThread> callbackThread = aAsync ? do_GetCurrentThread() : nullptr;
|
||||
|
||||
std::function<void()> doDump = [=]() mutable {
|
||||
CreateMinidumpsAndPairInternal(aTargetPid,
|
||||
aTargetBlamedThread,
|
||||
incomingPairName,
|
||||
incomingDumpToPair,
|
||||
aMainDumpOut,
|
||||
Move(callback),
|
||||
Move(callbackThread),
|
||||
aAsync);
|
||||
};
|
||||
|
||||
if (aAsync) {
|
||||
sMinidumpWriterThread->Dispatch(NS_NewRunnableFunction(Move(doDump)),
|
||||
nsIEventTarget::DISPATCH_NORMAL);
|
||||
} else {
|
||||
doDump();
|
||||
}
|
||||
}
|
||||
|
||||
bool
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
|
||||
#include "mozilla/Assertions.h"
|
||||
|
||||
#include <functional>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
#include "nsError.h"
|
||||
|
@ -198,11 +199,14 @@ ThreadId CurrentThreadId();
|
|||
* aIncomingDumpToPair.
|
||||
* @return bool indicating success or failure
|
||||
*/
|
||||
bool CreateMinidumpsAndPair(ProcessHandle aTargetPid,
|
||||
ThreadId aTargetBlamedThread,
|
||||
const nsACString& aIncomingPairName,
|
||||
nsIFile* aIncomingDumpToPair,
|
||||
nsIFile** aTargetDumpOut);
|
||||
void
|
||||
CreateMinidumpsAndPair(ProcessHandle aTargetPid,
|
||||
ThreadId aTargetBlamedThread,
|
||||
const nsACString& aIncomingPairName,
|
||||
nsIFile* aIncomingDumpToPair,
|
||||
nsIFile** aTargetDumpOut,
|
||||
std::function<void(bool)>&& aCallback,
|
||||
bool aAsync);
|
||||
|
||||
// Create an additional minidump for a child of a process which already has
|
||||
// a minidump (|parentMinidump|).
|
||||
|
|
|
@ -512,12 +512,6 @@ LazyIdleThread::IdleDispatch(already_AddRefed<nsIRunnable> aEvent)
|
|||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
LazyIdleThread::IdleDispatchFromScript(nsIRunnable* aEvent)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
LazyIdleThread::RegisterIdlePeriod(already_AddRefed<nsIIdlePeriod> aIdlePeriod)
|
||||
{
|
||||
|
|
|
@ -150,22 +150,7 @@ interface nsIThread : nsISerialEventTarget
|
|||
* Indicates that the thread is shutting down and has finished processing
|
||||
* events, so this event would never run and has not been dispatched.
|
||||
*/
|
||||
[noscript, binaryname(IdleDispatch)] void idleDispatchFromC(in alreadyAddRefed_nsIRunnable event);
|
||||
|
||||
/**
|
||||
* Dispatch an event to the thread's idle queue. This function may be called
|
||||
* from any thread, and it may be called re-entrantly.
|
||||
*
|
||||
* @param event
|
||||
* The (raw) event to dispatch.
|
||||
*
|
||||
* @throws NS_ERROR_INVALID_ARG
|
||||
* Indicates that event is null.
|
||||
* @throws NS_ERROR_UNEXPECTED
|
||||
* Indicates that the thread is shutting down and has finished processing
|
||||
* events, so this event would never run and has not been dispatched.
|
||||
*/
|
||||
[binaryname(IdleDispatchFromScript)] void idleDispatch(in nsIRunnable event);
|
||||
[noscript] void idleDispatch(in alreadyAddRefed_nsIRunnable event);
|
||||
|
||||
/**
|
||||
* Use this attribute to dispatch runnables to the thread. Eventually, the
|
||||
|
|
|
@ -94,6 +94,20 @@ interface nsIThreadManager : nsISupports
|
|||
*/
|
||||
void dispatchToMainThread(in nsIRunnable event);
|
||||
|
||||
/**
|
||||
* This queues a runnable to the main thread's idle queue.
|
||||
*
|
||||
* @param event
|
||||
* The event to dispatch.
|
||||
* @param timeout
|
||||
* The time in milliseconds until this event should be moved from the idle
|
||||
* queue to the regular queue if it hasn't been executed by then. If not
|
||||
* passed or a zero value is specified, the event will never be moved to
|
||||
* the regular queue.
|
||||
*/
|
||||
void idleDispatchToMainThread(in nsIRunnable event,
|
||||
[optional] in uint32_t timeout);
|
||||
|
||||
/**
|
||||
* Enter a nested event loop on the current thread, waiting on, and
|
||||
* processing events until condition.isDone() returns true.
|
||||
|
|
|
@ -1162,13 +1162,6 @@ nsThread::IdleDispatch(already_AddRefed<nsIRunnable> aEvent)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsThread::IdleDispatchFromScript(nsIRunnable* aEvent)
|
||||
{
|
||||
nsCOMPtr<nsIRunnable> event(aEvent);
|
||||
return IdleDispatch(event.forget());
|
||||
}
|
||||
|
||||
#ifdef MOZ_CANARY
|
||||
void canary_alarm_handler(int signum);
|
||||
|
||||
|
|
|
@ -263,7 +263,7 @@ nsThreadManager::NewNamedThread(const nsACString& aName,
|
|||
nsIThread** aResult)
|
||||
{
|
||||
// Note: can be called from arbitrary threads
|
||||
|
||||
|
||||
// No new threads during Shutdown
|
||||
if (NS_WARN_IF(!mInitialized)) {
|
||||
return NS_ERROR_NOT_INITIALIZED;
|
||||
|
@ -396,3 +396,18 @@ nsThreadManager::DispatchToMainThread(nsIRunnable *aEvent)
|
|||
|
||||
return mMainThread->DispatchFromScript(aEvent, 0);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsThreadManager::IdleDispatchToMainThread(nsIRunnable *aEvent, uint32_t aTimeout)
|
||||
{
|
||||
// Note: C++ callers should instead use NS_IdleDispatchToThread or
|
||||
// NS_IdleDispatchToCurrentThread.
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
|
||||
nsCOMPtr<nsIRunnable> event(aEvent);
|
||||
if (aTimeout) {
|
||||
return NS_IdleDispatchToThread(event.forget(), aTimeout, mMainThread);
|
||||
}
|
||||
|
||||
return NS_IdleDispatchToThread(event.forget(), mMainThread);
|
||||
}
|
||||
|
|
|
@ -265,27 +265,19 @@ NS_DelayedDispatchToCurrentThread(already_AddRefed<nsIRunnable>&& aEvent, uint32
|
|||
}
|
||||
|
||||
nsresult
|
||||
NS_IdleDispatchToCurrentThread(already_AddRefed<nsIRunnable>&& aEvent)
|
||||
NS_IdleDispatchToThread(already_AddRefed<nsIRunnable>&& aEvent,
|
||||
nsIThread* aThread)
|
||||
{
|
||||
nsresult rv;
|
||||
nsCOMPtr<nsIRunnable> event(aEvent);
|
||||
NS_ENSURE_TRUE(event, NS_ERROR_INVALID_ARG);
|
||||
#ifdef MOZILLA_INTERNAL_API
|
||||
nsIThread* thread = NS_GetCurrentThread();
|
||||
if (!thread) {
|
||||
if (!aThread) {
|
||||
return NS_ERROR_UNEXPECTED;
|
||||
}
|
||||
#else
|
||||
nsCOMPtr<nsIThread> thread;
|
||||
rv = NS_GetCurrentThread(getter_AddRefs(thread));
|
||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||
return rv;
|
||||
}
|
||||
#endif
|
||||
// To keep us from leaking the runnable if dispatch method fails,
|
||||
// we grab the reference on failures and release it.
|
||||
nsIRunnable* temp = event.get();
|
||||
rv = thread->IdleDispatch(event.forget());
|
||||
rv = aThread->IdleDispatch(event.forget());
|
||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||
// Dispatch() leaked the reference to the event, but due to caller's
|
||||
// assumptions, we shouldn't leak here. And given we are on the same
|
||||
|
@ -296,6 +288,13 @@ NS_IdleDispatchToCurrentThread(already_AddRefed<nsIRunnable>&& aEvent)
|
|||
return rv;
|
||||
}
|
||||
|
||||
nsresult
|
||||
NS_IdleDispatchToCurrentThread(already_AddRefed<nsIRunnable>&& aEvent)
|
||||
{
|
||||
return NS_IdleDispatchToThread(Move(aEvent),
|
||||
NS_GetCurrentThread());
|
||||
}
|
||||
|
||||
class IdleRunnableWrapper : public IdleRunnable
|
||||
{
|
||||
public:
|
||||
|
@ -351,8 +350,9 @@ private:
|
|||
};
|
||||
|
||||
extern nsresult
|
||||
NS_IdleDispatchToCurrentThread(already_AddRefed<nsIRunnable>&& aEvent,
|
||||
uint32_t aTimeout)
|
||||
NS_IdleDispatchToThread(already_AddRefed<nsIRunnable>&& aEvent,
|
||||
uint32_t aTimeout,
|
||||
nsIThread* aThread)
|
||||
{
|
||||
nsCOMPtr<nsIRunnable> event(Move(aEvent));
|
||||
NS_ENSURE_TRUE(event, NS_ERROR_INVALID_ARG);
|
||||
|
@ -372,7 +372,15 @@ NS_IdleDispatchToCurrentThread(already_AddRefed<nsIRunnable>&& aEvent,
|
|||
}
|
||||
idleEvent->SetTimer(aTimeout, target);
|
||||
|
||||
return NS_IdleDispatchToCurrentThread(event.forget());
|
||||
return NS_IdleDispatchToThread(event.forget(), aThread);
|
||||
}
|
||||
|
||||
extern nsresult
|
||||
NS_IdleDispatchToCurrentThread(already_AddRefed<nsIRunnable>&& aEvent,
|
||||
uint32_t aTimeout)
|
||||
{
|
||||
return NS_IdleDispatchToThread(Move(aEvent), aTimeout,
|
||||
NS_GetCurrentThread());
|
||||
}
|
||||
|
||||
#ifndef XPCOM_GLUE_AVOID_NSPR
|
||||
|
|
|
@ -152,6 +152,48 @@ NS_IdleDispatchToCurrentThread(already_AddRefed<nsIRunnable>&& aEvent);
|
|||
extern nsresult
|
||||
NS_IdleDispatchToCurrentThread(already_AddRefed<nsIRunnable>&& aEvent, uint32_t aTimeout);
|
||||
|
||||
/**
|
||||
* Dispatch the given event to the idle queue of a thread.
|
||||
*
|
||||
* @param aEvent The event to dispatch.
|
||||
*
|
||||
* @param aThread The target thread for the dispatch.
|
||||
*
|
||||
* @returns NS_ERROR_INVALID_ARG
|
||||
* If event is null.
|
||||
* @returns NS_ERROR_UNEXPECTED
|
||||
* If the thread is shutting down.
|
||||
*/
|
||||
extern nsresult
|
||||
NS_IdleDispatchToThread(already_AddRefed<nsIRunnable>&& aEvent,
|
||||
nsIThread* aThread);
|
||||
|
||||
/**
|
||||
* Dispatch the given event to the idle queue of a thread.
|
||||
*
|
||||
* @param aEvent The event to dispatch. If the event implements
|
||||
* nsIIdleRunnable, it will receive a call on
|
||||
* nsIIdleRunnable::SetTimer when dispatched, with the value of
|
||||
* aTimeout.
|
||||
*
|
||||
* @param aTimeout The time in milliseconds until the event should be
|
||||
* moved from the idle queue to the regular queue, if it hasn't been
|
||||
* executed. If aEvent is also an nsIIdleRunnable, it is expected
|
||||
* that it should handle the timeout itself, after a call to
|
||||
* nsIIdleRunnable::SetTimer.
|
||||
*
|
||||
* @param aThread The target thread for the dispatch.
|
||||
*
|
||||
* @returns NS_ERROR_INVALID_ARG
|
||||
* If event is null.
|
||||
* @returns NS_ERROR_UNEXPECTED
|
||||
* If the thread is shutting down.
|
||||
*/
|
||||
extern nsresult
|
||||
NS_IdleDispatchToThread(already_AddRefed<nsIRunnable>&& aEvent,
|
||||
uint32_t aTimeout,
|
||||
nsIThread* aThread);
|
||||
|
||||
#ifndef XPCOM_GLUE_AVOID_NSPR
|
||||
/**
|
||||
* Process all pending events for the given thread before returning. This
|
||||
|
|
Загрузка…
Ссылка в новой задаче