зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1519636 - Reformat everything to the Google coding style r=Ehsan
# ignore-this-changeset Differential Revision: https://phabricator.services.mozilla.com/D16388 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
0ebacc9129
Коммит
47a5dd1fb8
|
@ -8706,8 +8706,8 @@ void Document::ScrollToRef() {
|
|||
// document's charset.
|
||||
if (NS_FAILED(rv)) {
|
||||
const Encoding* encoding = GetDocumentCharacterSet();
|
||||
rv = encoding->DecodeWithoutBOMHandling(
|
||||
unescaped ? buff : mScrollToRef, ref);
|
||||
rv = encoding->DecodeWithoutBOMHandling(unescaped ? buff : mScrollToRef,
|
||||
ref);
|
||||
if (NS_SUCCEEDED(rv) && !ref.IsEmpty()) {
|
||||
rv = shell->GoToAnchor(ref, mChangeScrollPosWhenScrollingToRef);
|
||||
}
|
||||
|
@ -11696,7 +11696,7 @@ void Document::ClearUserGestureActivation() {
|
|||
Document* doc = this;
|
||||
while (doc) {
|
||||
MOZ_LOG(gUserInteractionPRLog, LogLevel::Debug,
|
||||
("Reset user activation flag for document %p.", this));
|
||||
("Reset user activation flag for document %p.", this));
|
||||
doc->mUserGestureActivated = false;
|
||||
doc = doc->GetSameTypeParentDocument();
|
||||
}
|
||||
|
|
|
@ -445,7 +445,8 @@ class Document : public nsINode,
|
|||
Document& operator=(const Document&) = delete;
|
||||
|
||||
public:
|
||||
typedef mozilla::dom::ExternalResourceMap::ExternalResourceLoad ExternalResourceLoad;
|
||||
typedef mozilla::dom::ExternalResourceMap::ExternalResourceLoad
|
||||
ExternalResourceLoad;
|
||||
typedef net::ReferrerPolicy ReferrerPolicyEnum;
|
||||
|
||||
NS_DECLARE_STATIC_IID_ACCESSOR(NS_IDOCUMENT_IID)
|
||||
|
@ -3096,7 +3097,9 @@ class Document : public nsINode,
|
|||
|
||||
#ifdef MOZILLA_INTERNAL_API
|
||||
bool Hidden() const { return mVisibilityState != VisibilityState::Visible; }
|
||||
mozilla::dom::VisibilityState VisibilityState() const { return mVisibilityState; }
|
||||
mozilla::dom::VisibilityState VisibilityState() const {
|
||||
return mVisibilityState;
|
||||
}
|
||||
#endif
|
||||
void GetSelectedStyleSheetSet(nsAString& aSheetSet);
|
||||
void SetSelectedStyleSheetSet(const nsAString& aSheetSet);
|
||||
|
|
|
@ -19,8 +19,8 @@ inline HTMLBodyElement* Document::GetBodyElement() {
|
|||
}
|
||||
|
||||
template <typename T>
|
||||
size_t Document::FindDocStyleSheetInsertionPoint(
|
||||
const nsTArray<T>& aDocSheets, const StyleSheet& aSheet) {
|
||||
size_t Document::FindDocStyleSheetInsertionPoint(const nsTArray<T>& aDocSheets,
|
||||
const StyleSheet& aSheet) {
|
||||
nsStyleSheetService* sheetService = nsStyleSheetService::GetInstance();
|
||||
|
||||
// lowest index first
|
||||
|
|
|
@ -31,7 +31,7 @@ namespace mozilla {
|
|||
namespace dom {
|
||||
class Document;
|
||||
class Element;
|
||||
}
|
||||
} // namespace dom
|
||||
|
||||
/**
|
||||
* Right now our identifier map entries contain information for 'name'
|
||||
|
|
|
@ -175,8 +175,8 @@ class RemoteObjectProxy : public RemoteObjectProxyBase {
|
|||
using RemoteObjectProxyBase::RemoteObjectProxyBase;
|
||||
|
||||
private:
|
||||
bool DefinePropertiesAndFunctions(
|
||||
JSContext* aCx, JS::Handle<JSObject*> aHolder) const final {
|
||||
bool DefinePropertiesAndFunctions(JSContext* aCx,
|
||||
JS::Handle<JSObject*> aHolder) const final {
|
||||
return JS_DefineProperties(aCx, aHolder, P) &&
|
||||
JS_DefineFunctions(aCx, aHolder, F);
|
||||
}
|
||||
|
|
|
@ -823,24 +823,24 @@ void GetEnumAttr(nsGenericHTMLElement* aContent, nsAtom* atom,
|
|||
rv = aForm->GetActionURL(getter_AddRefs(actionURL), aOriginatingElement);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
// Check if CSP allows this form-action
|
||||
nsCOMPtr<nsIContentSecurityPolicy> csp;
|
||||
rv = aForm->NodePrincipal()->GetCsp(getter_AddRefs(csp));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
if (csp) {
|
||||
bool permitsFormAction = true;
|
||||
// Check if CSP allows this form-action
|
||||
nsCOMPtr<nsIContentSecurityPolicy> csp;
|
||||
rv = aForm->NodePrincipal()->GetCsp(getter_AddRefs(csp));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
if (csp) {
|
||||
bool permitsFormAction = true;
|
||||
|
||||
// form-action is only enforced if explicitly defined in the
|
||||
// policy - do *not* consult default-src, see:
|
||||
// http://www.w3.org/TR/CSP2/#directive-default-src
|
||||
rv = csp->Permits(aForm, nullptr /* nsICSPEventListener */, actionURL,
|
||||
nsIContentSecurityPolicy::FORM_ACTION_DIRECTIVE, true,
|
||||
&permitsFormAction);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
if (!permitsFormAction) {
|
||||
return NS_ERROR_CSP_FORM_ACTION_VIOLATION;
|
||||
}
|
||||
}
|
||||
// form-action is only enforced if explicitly defined in the
|
||||
// policy - do *not* consult default-src, see:
|
||||
// http://www.w3.org/TR/CSP2/#directive-default-src
|
||||
rv = csp->Permits(aForm, nullptr /* nsICSPEventListener */, actionURL,
|
||||
nsIContentSecurityPolicy::FORM_ACTION_DIRECTIVE, true,
|
||||
&permitsFormAction);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
if (!permitsFormAction) {
|
||||
return NS_ERROR_CSP_FORM_ACTION_VIOLATION;
|
||||
}
|
||||
}
|
||||
|
||||
// Get target
|
||||
// The target is the originating element formtarget attribute if the element
|
||||
|
|
|
@ -750,7 +750,8 @@ class HTMLInputElement final : public nsGenericHTMLFormElementWithState,
|
|||
/*
|
||||
* This locates the inner datetimebox UA Widget element and only the
|
||||
* UA Widget
|
||||
* element. This should fold into GetDateTimeBoxElement() when the XBL binding is removed.
|
||||
* element. This should fold into GetDateTimeBoxElement() when the XBL binding
|
||||
* is removed.
|
||||
*/
|
||||
Element* GetDateTimeBoxElementInUAWidget();
|
||||
|
||||
|
|
|
@ -54,8 +54,8 @@ NS_IMPL_ISUPPORTS(MemoryReportRequestClient, nsIRunnable)
|
|||
const ReportCallback& aReportCallback,
|
||||
const FinishCallback& aFinishCallback) {
|
||||
RefPtr<MemoryReportRequestClient> request = new MemoryReportRequestClient(
|
||||
aGeneration, aAnonymize, aDMDFile, aProcessString,
|
||||
aReportCallback, aFinishCallback);
|
||||
aGeneration, aAnonymize, aDMDFile, aProcessString, aReportCallback,
|
||||
aFinishCallback);
|
||||
|
||||
DebugOnly<nsresult> rv;
|
||||
if (aMinimizeMemoryUsage) {
|
||||
|
@ -127,8 +127,7 @@ class FinishReportingCallback final : public nsIFinishReportingCallback {
|
|||
|
||||
explicit FinishReportingCallback(uint32_t aGeneration,
|
||||
const FinishCallback& aFinishCallback)
|
||||
: mGeneration(aGeneration),
|
||||
mFinishCallback(aFinishCallback) {}
|
||||
: mGeneration(aGeneration), mFinishCallback(aFinishCallback) {}
|
||||
|
||||
NS_IMETHOD Callback(nsISupports* aUnused) override {
|
||||
return mFinishCallback(mGeneration) ? NS_OK : NS_ERROR_FAILURE;
|
||||
|
|
|
@ -4180,54 +4180,54 @@ SourceListener::InitializeAsync() {
|
|||
LOG("started all sources");
|
||||
aHolder.Resolve(true, __func__);
|
||||
})
|
||||
->Then(GetMainThreadSerialEventTarget(), __func__,
|
||||
[self = RefPtr<SourceListener>(this), this]() {
|
||||
if (mStopped) {
|
||||
// We were shut down during the async init
|
||||
return SourceListenerPromise::CreateAndResolve(true, __func__);
|
||||
}
|
||||
->Then(
|
||||
GetMainThreadSerialEventTarget(), __func__,
|
||||
[self = RefPtr<SourceListener>(this), this]() {
|
||||
if (mStopped) {
|
||||
// We were shut down during the async init
|
||||
return SourceListenerPromise::CreateAndResolve(true, __func__);
|
||||
}
|
||||
|
||||
for (DeviceState* state :
|
||||
{mAudioDeviceState.get(), mVideoDeviceState.get()}) {
|
||||
if (!state) {
|
||||
continue;
|
||||
}
|
||||
MOZ_DIAGNOSTIC_ASSERT(!state->mTrackEnabled);
|
||||
MOZ_DIAGNOSTIC_ASSERT(!state->mDeviceEnabled);
|
||||
MOZ_DIAGNOSTIC_ASSERT(!state->mStopped);
|
||||
for (DeviceState* state :
|
||||
{mAudioDeviceState.get(), mVideoDeviceState.get()}) {
|
||||
if (!state) {
|
||||
continue;
|
||||
}
|
||||
MOZ_DIAGNOSTIC_ASSERT(!state->mTrackEnabled);
|
||||
MOZ_DIAGNOSTIC_ASSERT(!state->mDeviceEnabled);
|
||||
MOZ_DIAGNOSTIC_ASSERT(!state->mStopped);
|
||||
|
||||
state->mDeviceEnabled = true;
|
||||
state->mTrackEnabled = true;
|
||||
state->mTrackEnabledTime = TimeStamp::Now();
|
||||
state->mDeviceEnabled = true;
|
||||
state->mTrackEnabled = true;
|
||||
state->mTrackEnabledTime = TimeStamp::Now();
|
||||
|
||||
if (state == mVideoDeviceState.get() &&
|
||||
!mStream->IsDestroyed()) {
|
||||
mStream->SetPullingEnabled(kVideoTrack, true);
|
||||
}
|
||||
}
|
||||
return SourceListenerPromise::CreateAndResolve(true, __func__);
|
||||
},
|
||||
[self = RefPtr<SourceListener>(this),
|
||||
this](RefPtr<MediaMgrError>&& aResult) {
|
||||
if (mStopped) {
|
||||
return SourceListenerPromise::CreateAndReject(
|
||||
std::move(aResult), __func__);
|
||||
}
|
||||
if (state == mVideoDeviceState.get() && !mStream->IsDestroyed()) {
|
||||
mStream->SetPullingEnabled(kVideoTrack, true);
|
||||
}
|
||||
}
|
||||
return SourceListenerPromise::CreateAndResolve(true, __func__);
|
||||
},
|
||||
[self = RefPtr<SourceListener>(this),
|
||||
this](RefPtr<MediaMgrError>&& aResult) {
|
||||
if (mStopped) {
|
||||
return SourceListenerPromise::CreateAndReject(std::move(aResult),
|
||||
__func__);
|
||||
}
|
||||
|
||||
for (DeviceState* state :
|
||||
{mAudioDeviceState.get(), mVideoDeviceState.get()}) {
|
||||
if (!state) {
|
||||
continue;
|
||||
}
|
||||
MOZ_DIAGNOSTIC_ASSERT(!state->mTrackEnabled);
|
||||
MOZ_DIAGNOSTIC_ASSERT(!state->mDeviceEnabled);
|
||||
MOZ_DIAGNOSTIC_ASSERT(!state->mStopped);
|
||||
for (DeviceState* state :
|
||||
{mAudioDeviceState.get(), mVideoDeviceState.get()}) {
|
||||
if (!state) {
|
||||
continue;
|
||||
}
|
||||
MOZ_DIAGNOSTIC_ASSERT(!state->mTrackEnabled);
|
||||
MOZ_DIAGNOSTIC_ASSERT(!state->mDeviceEnabled);
|
||||
MOZ_DIAGNOSTIC_ASSERT(!state->mStopped);
|
||||
|
||||
state->mStopped = true;
|
||||
}
|
||||
return SourceListenerPromise::CreateAndReject(std::move(aResult),
|
||||
__func__);
|
||||
});
|
||||
state->mStopped = true;
|
||||
}
|
||||
return SourceListenerPromise::CreateAndReject(std::move(aResult),
|
||||
__func__);
|
||||
});
|
||||
}
|
||||
|
||||
void SourceListener::Stop() {
|
||||
|
|
|
@ -605,20 +605,19 @@ nsresult MediaEngineWebRTCMicrophoneSource::Stop(
|
|||
}
|
||||
|
||||
RefPtr<MediaEngineWebRTCMicrophoneSource> that = this;
|
||||
NS_DispatchToMainThread(
|
||||
media::NewRunnableFrom([that, stream = mStream]() {
|
||||
if (stream->IsDestroyed()) {
|
||||
return NS_OK;
|
||||
}
|
||||
NS_DispatchToMainThread(media::NewRunnableFrom([that, stream = mStream]() {
|
||||
if (stream->IsDestroyed()) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
stream->GraphImpl()->AppendMessage(MakeUnique<StartStopMessage>(
|
||||
that->mInputProcessing, StartStopMessage::Stop));
|
||||
CubebUtils::AudioDeviceID deviceID = that->mDeviceInfo->DeviceID();
|
||||
Maybe<CubebUtils::AudioDeviceID> id = Some(deviceID);
|
||||
stream->CloseAudioInput(id, that->mInputProcessing);
|
||||
stream->GraphImpl()->AppendMessage(MakeUnique<StartStopMessage>(
|
||||
that->mInputProcessing, StartStopMessage::Stop));
|
||||
CubebUtils::AudioDeviceID deviceID = that->mDeviceInfo->DeviceID();
|
||||
Maybe<CubebUtils::AudioDeviceID> id = Some(deviceID);
|
||||
stream->CloseAudioInput(id, that->mInputProcessing);
|
||||
|
||||
return NS_OK;
|
||||
}));
|
||||
return NS_OK;
|
||||
}));
|
||||
|
||||
MOZ_ASSERT(mState == kStarted, "Should be started when stopping");
|
||||
mState = kStopped;
|
||||
|
|
|
@ -152,8 +152,9 @@ already_AddRefed<WakeLock> PowerManagerService::NewWakeLockOnBehalfOfProcess(
|
|||
|
||||
NS_DEFINE_NAMED_CID(NS_POWERMANAGERSERVICE_CID);
|
||||
|
||||
NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsIPowerManagerService,
|
||||
mozilla::dom::power::PowerManagerService::GetInstance)
|
||||
NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(
|
||||
nsIPowerManagerService,
|
||||
mozilla::dom::power::PowerManagerService::GetInstance)
|
||||
|
||||
static const mozilla::Module::CIDEntry kPowerManagerCIDs[] = {
|
||||
// clang-format off
|
||||
|
@ -171,13 +172,14 @@ static const mozilla::Module::ContractIDEntry kPowerManagerContracts[] = {
|
|||
|
||||
// We mark the power module as being available in the GPU process because the
|
||||
// appshell depends on the power manager service.
|
||||
static const mozilla::Module kPowerManagerModule = {mozilla::Module::kVersion,
|
||||
kPowerManagerCIDs,
|
||||
kPowerManagerContracts,
|
||||
nullptr,
|
||||
nullptr,
|
||||
nullptr,
|
||||
nullptr,
|
||||
mozilla::Module::ALLOW_IN_GPU_PROCESS};
|
||||
static const mozilla::Module kPowerManagerModule = {
|
||||
mozilla::Module::kVersion,
|
||||
kPowerManagerCIDs,
|
||||
kPowerManagerContracts,
|
||||
nullptr,
|
||||
nullptr,
|
||||
nullptr,
|
||||
nullptr,
|
||||
mozilla::Module::ALLOW_IN_GPU_PROCESS};
|
||||
|
||||
NSMODULE_DEFN(nsPowerManagerModule) = &kPowerManagerModule;
|
||||
|
|
|
@ -40,9 +40,7 @@ NS_IMPL_CYCLE_COLLECTING_RELEASE(LoadedScript)
|
|||
|
||||
LoadedScript::LoadedScript(ScriptKind aKind, ScriptFetchOptions* aFetchOptions,
|
||||
nsIURI* aBaseURL)
|
||||
: mKind(aKind),
|
||||
mFetchOptions(aFetchOptions),
|
||||
mBaseURL(aBaseURL) {
|
||||
: mKind(aKind), mFetchOptions(aFetchOptions), mBaseURL(aBaseURL) {
|
||||
MOZ_ASSERT(mFetchOptions);
|
||||
MOZ_ASSERT(mBaseURL);
|
||||
}
|
||||
|
|
|
@ -2301,9 +2301,8 @@ nsresult ScriptLoader::FillCompileOptionsForRequest(
|
|||
|
||||
bool isScriptElement =
|
||||
!aRequest->IsModuleRequest() || aRequest->AsModuleRequest()->IsTopLevel();
|
||||
aOptions->setIntroductionInfoToCaller(jsapi.cx(),
|
||||
isScriptElement ? "scriptElement"
|
||||
: "importedModule");
|
||||
aOptions->setIntroductionInfoToCaller(
|
||||
jsapi.cx(), isScriptElement ? "scriptElement" : "importedModule");
|
||||
aOptions->setFileAndLine(aRequest->mURL.get(), aRequest->mLineNo);
|
||||
aOptions->setIsRunOnce(true);
|
||||
aOptions->setNoScriptRval(true);
|
||||
|
|
|
@ -27,10 +27,10 @@ class SMILKeySpline {
|
|||
* aX1, etc. are the x1, y1, x2, y2 cubic Bezier control points as defined
|
||||
* by SMILANIM 3.2.3. They must each be in the range 0.0 <= x <= 1.0
|
||||
*/
|
||||
SMILKeySpline(double aX1, double aY1, double aX2, double aY2)
|
||||
: mX1(0), mY1(0), mX2(0), mY2(0) {
|
||||
Init(aX1, aY1, aX2, aY2);
|
||||
}
|
||||
SMILKeySpline(double aX1, double aY1, double aX2, double aY2)
|
||||
: mX1(0), mY1(0), mX2(0), mY2(0) {
|
||||
Init(aX1, aY1, aX2, aY2);
|
||||
}
|
||||
|
||||
double X1() const { return mX1; }
|
||||
double Y1() const { return mY1; }
|
||||
|
|
|
@ -191,8 +191,7 @@ class SVGContentUtils {
|
|||
/*
|
||||
* Report a localized error message to the error console.
|
||||
*/
|
||||
static nsresult ReportToConsole(dom::Document* doc,
|
||||
const char* aWarning,
|
||||
static nsresult ReportToConsole(dom::Document* doc, const char* aWarning,
|
||||
const char16_t** aParams,
|
||||
uint32_t aParamsLength);
|
||||
|
||||
|
|
|
@ -77,8 +77,8 @@ class SVGIntegerPair {
|
|||
mIndex(aIndex) {}
|
||||
virtual ~DOMAnimatedInteger();
|
||||
|
||||
SVGIntegerPair* mVal; // kept alive because it belongs to content
|
||||
PairIndex mIndex; // are we the first or second integer
|
||||
SVGIntegerPair* mVal; // kept alive because it belongs to content
|
||||
PairIndex mIndex; // are we the first or second integer
|
||||
|
||||
virtual int32_t BaseVal() override { return mVal->GetBaseValue(mIndex); }
|
||||
virtual void SetBaseVal(int32_t aValue) override {
|
||||
|
|
|
@ -78,8 +78,8 @@ class SVGNumberPair {
|
|||
mIndex(aIndex) {}
|
||||
virtual ~DOMAnimatedNumber();
|
||||
|
||||
SVGNumberPair* mVal; // kept alive because it belongs to content
|
||||
PairIndex mIndex; // are we the first or second number
|
||||
SVGNumberPair* mVal; // kept alive because it belongs to content
|
||||
PairIndex mIndex; // are we the first or second number
|
||||
|
||||
virtual float BaseVal() override { return mVal->GetBaseValue(mIndex); }
|
||||
virtual void SetBaseVal(float aValue) override {
|
||||
|
|
|
@ -46,7 +46,8 @@ bool SVGTests::HasExtension(const nsAString& aExtension) const {
|
|||
if (aExtension.EqualsLiteral(str)) return true;
|
||||
SVG_SUPPORTED_EXTENSION("http://www.w3.org/1999/xhtml")
|
||||
nsNameSpaceManager* nameSpaceManager = nsNameSpaceManager::GetInstance();
|
||||
if (AsSVGElement()->IsInChromeDocument() || !nameSpaceManager->mMathMLDisabled) {
|
||||
if (AsSVGElement()->IsInChromeDocument() ||
|
||||
!nameSpaceManager->mMathMLDisabled) {
|
||||
SVG_SUPPORTED_EXTENSION("http://www.w3.org/1998/Math/MathML")
|
||||
}
|
||||
#undef SVG_SUPPORTED_EXTENSION
|
||||
|
|
|
@ -460,8 +460,7 @@ RefPtr<PerformanceInfoPromise> WorkerDebugger::ReportPerformanceInfo() {
|
|||
RefPtr<nsIURI> scriptURI = mWorkerPrivate->GetResolvedScriptURI();
|
||||
if (NS_WARN_IF(!scriptURI)) {
|
||||
// This can happen at shutdown, let's stop here.
|
||||
return PerformanceInfoPromise::CreateAndReject(NS_ERROR_FAILURE,
|
||||
__func__);
|
||||
return PerformanceInfoPromise::CreateAndReject(NS_ERROR_FAILURE, __func__);
|
||||
}
|
||||
nsCString url = scriptURI->GetSpecOrDefault();
|
||||
|
||||
|
|
|
@ -152,8 +152,8 @@ class nsXBLStreamListener final : public nsIStreamListener,
|
|||
AutoTArray<nsXBLBindingRequest*, 8> mBindingRequests;
|
||||
|
||||
nsWeakPtr mBoundDocument;
|
||||
nsCOMPtr<nsIXMLContentSink> mSink; // Only set until OnStartRequest
|
||||
nsCOMPtr<Document> mBindingDocument; // Only set until OnStartRequest
|
||||
nsCOMPtr<nsIXMLContentSink> mSink; // Only set until OnStartRequest
|
||||
nsCOMPtr<Document> mBindingDocument; // Only set until OnStartRequest
|
||||
};
|
||||
|
||||
/* Implementation file */
|
||||
|
|
|
@ -35,9 +35,7 @@ DOMIterator::DOMIterator(nsINode& aNode MOZ_GUARD_OBJECT_NOTIFIER_PARAM_IN_IMPL)
|
|||
MOZ_ASSERT(NS_SUCCEEDED(rv));
|
||||
}
|
||||
|
||||
nsresult DOMIterator::Init(nsRange& aRange) {
|
||||
return mIter->Init(&aRange);
|
||||
}
|
||||
nsresult DOMIterator::Init(nsRange& aRange) { return mIter->Init(&aRange); }
|
||||
|
||||
DOMIterator::DOMIterator(MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM_IN_IMPL)
|
||||
: mIter(&mPostOrderIter) {
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
#include "TextServicesDocument.h"
|
||||
|
||||
#include "FilteredContentIterator.h" // for FilteredContentIterator
|
||||
#include "mozilla/Assertions.h" // for MOZ_ASSERT, etc
|
||||
#include "mozilla/EditorUtils.h" // for AutoTransactionBatchExternal
|
||||
#include "mozilla/Assertions.h" // for MOZ_ASSERT, etc
|
||||
#include "mozilla/EditorUtils.h" // for AutoTransactionBatchExternal
|
||||
#include "mozilla/dom/Element.h"
|
||||
#include "mozilla/dom/Selection.h"
|
||||
#include "mozilla/mozalloc.h" // for operator new, etc
|
||||
|
@ -15,22 +15,22 @@
|
|||
#include "nsAString.h" // for nsAString::Length, etc
|
||||
#include "nsContentUtils.h" // for nsContentUtils
|
||||
#include "nsComposeTxtSrvFilter.h"
|
||||
#include "nsDebug.h" // for NS_ENSURE_TRUE, etc
|
||||
#include "nsDependentSubstring.h" // for Substring
|
||||
#include "nsError.h" // for NS_OK, NS_ERROR_FAILURE, etc
|
||||
#include "nsGenericHTMLElement.h" // for nsGenericHTMLElement
|
||||
#include "nsIContent.h" // for nsIContent, etc
|
||||
#include "nsID.h" // for NS_GET_IID
|
||||
#include "nsIEditor.h" // for nsIEditor, etc
|
||||
#include "nsINode.h" // for nsINode
|
||||
#include "nsISelectionController.h" // for nsISelectionController, etc
|
||||
#include "nsISupportsBase.h" // for nsISupports
|
||||
#include "nsISupportsUtils.h" // for NS_IF_ADDREF, NS_ADDREF, etc
|
||||
#include "mozilla/intl/WordBreaker.h" // for WordRange, WordBreaker
|
||||
#include "nsRange.h" // for nsRange
|
||||
#include "nsString.h" // for nsString, nsAutoString
|
||||
#include "nscore.h" // for nsresult, NS_IMETHODIMP, etc
|
||||
#include "mozilla/UniquePtr.h" // for UniquePtr
|
||||
#include "nsDebug.h" // for NS_ENSURE_TRUE, etc
|
||||
#include "nsDependentSubstring.h" // for Substring
|
||||
#include "nsError.h" // for NS_OK, NS_ERROR_FAILURE, etc
|
||||
#include "nsGenericHTMLElement.h" // for nsGenericHTMLElement
|
||||
#include "nsIContent.h" // for nsIContent, etc
|
||||
#include "nsID.h" // for NS_GET_IID
|
||||
#include "nsIEditor.h" // for nsIEditor, etc
|
||||
#include "nsINode.h" // for nsINode
|
||||
#include "nsISelectionController.h" // for nsISelectionController, etc
|
||||
#include "nsISupportsBase.h" // for nsISupports
|
||||
#include "nsISupportsUtils.h" // for NS_IF_ADDREF, NS_ADDREF, etc
|
||||
#include "mozilla/intl/WordBreaker.h" // for WordRange, WordBreaker
|
||||
#include "nsRange.h" // for nsRange
|
||||
#include "nsString.h" // for nsString, nsAutoString
|
||||
#include "nscore.h" // for nsresult, NS_IMETHODIMP, etc
|
||||
#include "mozilla/UniquePtr.h" // for UniquePtr
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ class TextEditor;
|
|||
namespace dom {
|
||||
class Document;
|
||||
class Element;
|
||||
};
|
||||
}; // namespace dom
|
||||
|
||||
/**
|
||||
* The TextServicesDocument presents the document in as a bunch of flattened
|
||||
|
|
|
@ -310,8 +310,7 @@ GLContextEGL::GLContextEGL(CreateContextFlags flags, const SurfaceCaps& caps,
|
|||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
GLContextEGL::OnMarkDestroyed() {
|
||||
void GLContextEGL::OnMarkDestroyed() {
|
||||
if (mSurfaceOverride != EGL_NO_SURFACE) {
|
||||
SetEGLSurfaceOverride(EGL_NO_SURFACE);
|
||||
}
|
||||
|
|
|
@ -17,7 +17,8 @@ void FrameMetrics::RecalculateLayoutViewportOffset() {
|
|||
if (!mIsRootContent) {
|
||||
return;
|
||||
}
|
||||
KeepLayoutViewportEnclosingVisualViewport(GetVisualViewport(), mLayoutViewport);
|
||||
KeepLayoutViewportEnclosingVisualViewport(GetVisualViewport(),
|
||||
mLayoutViewport);
|
||||
}
|
||||
|
||||
/* static */ void FrameMetrics::KeepLayoutViewportEnclosingVisualViewport(
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
#include "mozilla/DefineEnum.h" // for MOZ_DEFINE_ENUM
|
||||
#include "mozilla/gfx/Point.h" // for IntPoint
|
||||
#include "mozilla/Maybe.h"
|
||||
#include "mozilla/TimeStamp.h" // for TimeStamp
|
||||
#include "mozilla/TimeStamp.h" // for TimeStamp
|
||||
#include "mozilla/TypedEnumBits.h"
|
||||
#include "nsRegion.h"
|
||||
#include "nsStyleConsts.h"
|
||||
|
@ -420,7 +420,7 @@ MOZ_DEFINE_ENUM_CLASS_WITH_BASE(CompositionPayloadType, uint8_t, (
|
|||
// clang-format on
|
||||
|
||||
struct CompositionPayload {
|
||||
bool operator ==(const CompositionPayload& aOther) const {
|
||||
bool operator==(const CompositionPayload& aOther) const {
|
||||
return mType == aOther.mType && mTimeStamp == aOther.mTimeStamp;
|
||||
}
|
||||
/* The type of payload that is in this composition */
|
||||
|
|
|
@ -205,7 +205,8 @@ static ScreenMargin ScrollFrame(nsIContent* aContent,
|
|||
aRequest, actualScrollOffset);
|
||||
}
|
||||
} else if (aRequest.IsRootContent() &&
|
||||
aRequest.GetScrollOffset() != aRequest.GetLayoutViewport().TopLeft()) {
|
||||
aRequest.GetScrollOffset() !=
|
||||
aRequest.GetLayoutViewport().TopLeft()) {
|
||||
// APZ uses the visual viewport's offset to calculate where to place the
|
||||
// display port, so the display port is misplaced when a pinch zoom occurs.
|
||||
//
|
||||
|
|
|
@ -170,8 +170,9 @@ class CrossProcessCompositorBridgeParent final
|
|||
|
||||
void UpdatePaintTime(LayerTransactionParent* aLayerTree,
|
||||
const TimeDuration& aPaintTime) override;
|
||||
void RegisterPayload(LayerTransactionParent* aLayerTree,
|
||||
const InfallibleTArray<CompositionPayload>& aPayload) override;
|
||||
void RegisterPayload(
|
||||
LayerTransactionParent* aLayerTree,
|
||||
const InfallibleTArray<CompositionPayload>& aPayload) override;
|
||||
|
||||
PWebRenderBridgeParent* AllocPWebRenderBridgeParent(
|
||||
const wr::PipelineId& aPipelineId,
|
||||
|
|
|
@ -710,7 +710,7 @@ struct ParamTraits<mozilla::layers::SimpleLayerAttributes>
|
|||
template <>
|
||||
struct ParamTraits<mozilla::layers::ScrollUpdateInfo>
|
||||
: public PlainOldDataSerializer<mozilla::layers::ScrollUpdateInfo> {};
|
||||
|
||||
|
||||
template <>
|
||||
struct ParamTraits<mozilla::layers::CompositionPayloadType>
|
||||
: public ContiguousEnumSerializerInclusive<
|
||||
|
@ -719,8 +719,7 @@ struct ParamTraits<mozilla::layers::CompositionPayloadType>
|
|||
mozilla::layers::kHighestCompositionPayloadType> {};
|
||||
|
||||
template <>
|
||||
struct ParamTraits<mozilla::layers::CompositionPayload>
|
||||
{
|
||||
struct ParamTraits<mozilla::layers::CompositionPayload> {
|
||||
typedef mozilla::layers::CompositionPayload paramType;
|
||||
|
||||
static void Write(Message* aMsg, const paramType& aParam) {
|
||||
|
@ -728,7 +727,8 @@ struct ParamTraits<mozilla::layers::CompositionPayload>
|
|||
WriteParam(aMsg, aParam.mTimeStamp);
|
||||
}
|
||||
|
||||
static bool Read(const Message* aMsg, PickleIterator* aIter, paramType* aResult) {
|
||||
static bool Read(const Message* aMsg, PickleIterator* aIter,
|
||||
paramType* aResult) {
|
||||
return ReadParam(aMsg, aIter, &aResult->mType) &&
|
||||
ReadParam(aMsg, aIter, &aResult->mTimeStamp);
|
||||
}
|
||||
|
|
|
@ -20,7 +20,9 @@
|
|||
|
||||
//#define CLIP_LOG(...) printf_stderr("CLIP: " __VA_ARGS__)
|
||||
|
||||
// clang-format off
|
||||
//#define CLIP_LOG(...) if (XRE_IsContentProcess()) printf_stderr("CLIP: " __VA_ARGS__)
|
||||
// clang-format on
|
||||
|
||||
namespace mozilla {
|
||||
namespace layers {
|
||||
|
|
|
@ -11,71 +11,50 @@
|
|||
namespace mozilla {
|
||||
namespace layers {
|
||||
|
||||
RenderRootStateManager::RenderRootStateManager(WebRenderLayerManager* aLayerManager)
|
||||
: mLayerManager(aLayerManager)
|
||||
, mDestroyed(false)
|
||||
{
|
||||
}
|
||||
RenderRootStateManager::RenderRootStateManager(
|
||||
WebRenderLayerManager* aLayerManager)
|
||||
: mLayerManager(aLayerManager), mDestroyed(false) {}
|
||||
|
||||
RenderRootStateManager::~RenderRootStateManager()
|
||||
{}
|
||||
RenderRootStateManager::~RenderRootStateManager() {}
|
||||
|
||||
// RenderRootStateManager shares its ref count with the WebRenderLayerManager that
|
||||
// created it. You can think of the two classes as being one unit, except there
|
||||
// are multiple RenderRootStateManagers per WebRenderLayerManager. Since we need
|
||||
// to reference the WebRenderLayerManager and it needs to reference us, this
|
||||
// avoids us needing to involve the cycle collector.
|
||||
void
|
||||
RenderRootStateManager::AddRef()
|
||||
{
|
||||
mLayerManager->AddRef();
|
||||
}
|
||||
// RenderRootStateManager shares its ref count with the WebRenderLayerManager
|
||||
// that created it. You can think of the two classes as being one unit, except
|
||||
// there are multiple RenderRootStateManagers per WebRenderLayerManager. Since
|
||||
// we need to reference the WebRenderLayerManager and it needs to reference us,
|
||||
// this avoids us needing to involve the cycle collector.
|
||||
void RenderRootStateManager::AddRef() { mLayerManager->AddRef(); }
|
||||
|
||||
void
|
||||
RenderRootStateManager::Release()
|
||||
{
|
||||
mLayerManager->Release();
|
||||
}
|
||||
void RenderRootStateManager::Release() { mLayerManager->Release(); }
|
||||
|
||||
|
||||
WebRenderBridgeChild*
|
||||
RenderRootStateManager::WrBridge() const
|
||||
{
|
||||
WebRenderBridgeChild* RenderRootStateManager::WrBridge() const {
|
||||
return mLayerManager->WrBridge();
|
||||
}
|
||||
|
||||
WebRenderCommandBuilder&
|
||||
RenderRootStateManager::CommandBuilder()
|
||||
{
|
||||
WebRenderCommandBuilder& RenderRootStateManager::CommandBuilder() {
|
||||
return mLayerManager->CommandBuilder();
|
||||
}
|
||||
|
||||
RenderRootStateManager::WebRenderUserDataRefTable*
|
||||
RenderRootStateManager::GetWebRenderUserDataTable()
|
||||
{
|
||||
RenderRootStateManager::GetWebRenderUserDataTable() {
|
||||
return mLayerManager->GetWebRenderUserDataTable();
|
||||
}
|
||||
|
||||
wr::IpcResourceUpdateQueue&
|
||||
RenderRootStateManager::AsyncResourceUpdates()
|
||||
{
|
||||
wr::IpcResourceUpdateQueue& RenderRootStateManager::AsyncResourceUpdates() {
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
|
||||
if (!mAsyncResourceUpdates) {
|
||||
mAsyncResourceUpdates.emplace(WrBridge());
|
||||
|
||||
RefPtr<Runnable> task = NewRunnableMethod(
|
||||
"RenderRootStateManager::FlushAsyncResourceUpdates",
|
||||
this, &RenderRootStateManager::FlushAsyncResourceUpdates);
|
||||
"RenderRootStateManager::FlushAsyncResourceUpdates", this,
|
||||
&RenderRootStateManager::FlushAsyncResourceUpdates);
|
||||
NS_DispatchToMainThread(task.forget());
|
||||
}
|
||||
|
||||
return mAsyncResourceUpdates.ref();
|
||||
}
|
||||
|
||||
void
|
||||
RenderRootStateManager::Destroy()
|
||||
{
|
||||
void RenderRootStateManager::Destroy() {
|
||||
ClearAsyncAnimations();
|
||||
|
||||
if (WrBridge()) {
|
||||
|
@ -90,9 +69,7 @@ RenderRootStateManager::Destroy()
|
|||
mDestroyed = true;
|
||||
}
|
||||
|
||||
void
|
||||
RenderRootStateManager::FlushAsyncResourceUpdates()
|
||||
{
|
||||
void RenderRootStateManager::FlushAsyncResourceUpdates() {
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
|
||||
if (!mAsyncResourceUpdates) {
|
||||
|
@ -106,21 +83,16 @@ RenderRootStateManager::FlushAsyncResourceUpdates()
|
|||
mAsyncResourceUpdates.reset();
|
||||
}
|
||||
|
||||
void
|
||||
RenderRootStateManager::AddImageKeyForDiscard(wr::ImageKey key)
|
||||
{
|
||||
void RenderRootStateManager::AddImageKeyForDiscard(wr::ImageKey key) {
|
||||
mImageKeysToDelete.AppendElement(key);
|
||||
}
|
||||
|
||||
void
|
||||
RenderRootStateManager::AddBlobImageKeyForDiscard(wr::BlobImageKey key)
|
||||
{
|
||||
void RenderRootStateManager::AddBlobImageKeyForDiscard(wr::BlobImageKey key) {
|
||||
mBlobImageKeysToDelete.AppendElement(key);
|
||||
}
|
||||
|
||||
void
|
||||
RenderRootStateManager::DiscardImagesInTransaction(wr::IpcResourceUpdateQueue& aResources)
|
||||
{
|
||||
void RenderRootStateManager::DiscardImagesInTransaction(
|
||||
wr::IpcResourceUpdateQueue& aResources) {
|
||||
for (const auto& key : mImageKeysToDelete) {
|
||||
aResources.DeleteImage(key);
|
||||
}
|
||||
|
@ -131,9 +103,7 @@ RenderRootStateManager::DiscardImagesInTransaction(wr::IpcResourceUpdateQueue& a
|
|||
mBlobImageKeysToDelete.Clear();
|
||||
}
|
||||
|
||||
void
|
||||
RenderRootStateManager::DiscardLocalImages()
|
||||
{
|
||||
void RenderRootStateManager::DiscardLocalImages() {
|
||||
// Removes images but doesn't tell the parent side about them
|
||||
// This is useful in empty / failed transactions where we created
|
||||
// image keys but didn't tell the parent about them yet.
|
||||
|
@ -141,16 +111,12 @@ RenderRootStateManager::DiscardLocalImages()
|
|||
mBlobImageKeysToDelete.Clear();
|
||||
}
|
||||
|
||||
void
|
||||
RenderRootStateManager::ClearCachedResources()
|
||||
{
|
||||
void RenderRootStateManager::ClearCachedResources() {
|
||||
mActiveCompositorAnimationIds.clear();
|
||||
mDiscardedCompositorAnimationsIds.Clear();
|
||||
}
|
||||
|
||||
void
|
||||
RenderRootStateManager::AddActiveCompositorAnimationId(uint64_t aId)
|
||||
{
|
||||
void RenderRootStateManager::AddActiveCompositorAnimationId(uint64_t aId) {
|
||||
// In layers-free mode we track the active compositor animation ids on the
|
||||
// client side so that we don't try to discard the same animation id multiple
|
||||
// times. We could just ignore the multiple-discard on the parent side, but
|
||||
|
@ -158,53 +124,42 @@ RenderRootStateManager::AddActiveCompositorAnimationId(uint64_t aId)
|
|||
mActiveCompositorAnimationIds.insert(aId);
|
||||
}
|
||||
|
||||
void
|
||||
RenderRootStateManager::AddCompositorAnimationsIdForDiscard(uint64_t aId)
|
||||
{
|
||||
void RenderRootStateManager::AddCompositorAnimationsIdForDiscard(uint64_t aId) {
|
||||
if (mActiveCompositorAnimationIds.erase(aId)) {
|
||||
// For layers-free ensure we don't try to discard an animation id that wasn't
|
||||
// active. We also remove it from mActiveCompositorAnimationIds so we don't
|
||||
// discard it again unless it gets re-activated.
|
||||
// For layers-free ensure we don't try to discard an animation id that
|
||||
// wasn't active. We also remove it from mActiveCompositorAnimationIds so we
|
||||
// don't discard it again unless it gets re-activated.
|
||||
mDiscardedCompositorAnimationsIds.AppendElement(aId);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
RenderRootStateManager::DiscardCompositorAnimations()
|
||||
{
|
||||
if (WrBridge()->IPCOpen() &&
|
||||
!mDiscardedCompositorAnimationsIds.IsEmpty()) {
|
||||
WrBridge()->
|
||||
SendDeleteCompositorAnimations(mDiscardedCompositorAnimationsIds);
|
||||
void RenderRootStateManager::DiscardCompositorAnimations() {
|
||||
if (WrBridge()->IPCOpen() && !mDiscardedCompositorAnimationsIds.IsEmpty()) {
|
||||
WrBridge()->SendDeleteCompositorAnimations(
|
||||
mDiscardedCompositorAnimationsIds);
|
||||
}
|
||||
mDiscardedCompositorAnimationsIds.Clear();
|
||||
}
|
||||
|
||||
void
|
||||
RenderRootStateManager::RegisterAsyncAnimation(const wr::ImageKey& aKey,
|
||||
SharedSurfacesAnimation* aAnimation)
|
||||
{
|
||||
void RenderRootStateManager::RegisterAsyncAnimation(
|
||||
const wr::ImageKey& aKey, SharedSurfacesAnimation* aAnimation) {
|
||||
mAsyncAnimations.insert(std::make_pair(wr::AsUint64(aKey), aAnimation));
|
||||
}
|
||||
|
||||
void
|
||||
RenderRootStateManager::DeregisterAsyncAnimation(const wr::ImageKey& aKey)
|
||||
{
|
||||
void RenderRootStateManager::DeregisterAsyncAnimation(
|
||||
const wr::ImageKey& aKey) {
|
||||
mAsyncAnimations.erase(wr::AsUint64(aKey));
|
||||
}
|
||||
|
||||
void
|
||||
RenderRootStateManager::ClearAsyncAnimations()
|
||||
{
|
||||
void RenderRootStateManager::ClearAsyncAnimations() {
|
||||
for (const auto& i : mAsyncAnimations) {
|
||||
i.second->Invalidate(this);
|
||||
}
|
||||
mAsyncAnimations.clear();
|
||||
}
|
||||
|
||||
void
|
||||
RenderRootStateManager::WrReleasedImages(const nsTArray<wr::ExternalImageKeyPair>& aPairs)
|
||||
{
|
||||
void RenderRootStateManager::WrReleasedImages(
|
||||
const nsTArray<wr::ExternalImageKeyPair>& aPairs) {
|
||||
// A SharedSurfaceAnimation object's lifetime is tied to its owning
|
||||
// ImageContainer. When the ImageContainer is released,
|
||||
// SharedSurfaceAnimation::Destroy is called which should ensure it is removed
|
||||
|
@ -223,54 +178,41 @@ RenderRootStateManager::WrReleasedImages(const nsTArray<wr::ExternalImageKeyPair
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
RenderRootStateManager::AddWebRenderParentCommand(const WebRenderParentCommand& aCmd)
|
||||
{
|
||||
void RenderRootStateManager::AddWebRenderParentCommand(
|
||||
const WebRenderParentCommand& aCmd) {
|
||||
WrBridge()->AddWebRenderParentCommand(aCmd);
|
||||
}
|
||||
void
|
||||
RenderRootStateManager::UpdateResources(wr::IpcResourceUpdateQueue& aResources)
|
||||
{
|
||||
void RenderRootStateManager::UpdateResources(
|
||||
wr::IpcResourceUpdateQueue& aResources) {
|
||||
WrBridge()->UpdateResources(aResources);
|
||||
}
|
||||
void
|
||||
RenderRootStateManager::AddPipelineIdForAsyncCompositable(const wr::PipelineId& aPipelineId,
|
||||
const CompositableHandle& aHandle)
|
||||
{
|
||||
void RenderRootStateManager::AddPipelineIdForAsyncCompositable(
|
||||
const wr::PipelineId& aPipelineId, const CompositableHandle& aHandle) {
|
||||
WrBridge()->AddPipelineIdForAsyncCompositable(aPipelineId, aHandle);
|
||||
}
|
||||
void
|
||||
RenderRootStateManager::AddPipelineIdForCompositable(const wr::PipelineId& aPipelineId,
|
||||
const CompositableHandle& aHandle)
|
||||
{
|
||||
void RenderRootStateManager::AddPipelineIdForCompositable(
|
||||
const wr::PipelineId& aPipelineId, const CompositableHandle& aHandle) {
|
||||
WrBridge()->AddPipelineIdForCompositable(aPipelineId, aHandle);
|
||||
}
|
||||
void
|
||||
RenderRootStateManager::RemovePipelineIdForCompositable(const wr::PipelineId& aPipelineId)
|
||||
{
|
||||
void RenderRootStateManager::RemovePipelineIdForCompositable(
|
||||
const wr::PipelineId& aPipelineId) {
|
||||
WrBridge()->RemovePipelineIdForCompositable(aPipelineId);
|
||||
}
|
||||
/// Release TextureClient that is bounded to ImageKey.
|
||||
/// It is used for recycling TextureClient.
|
||||
void
|
||||
RenderRootStateManager::ReleaseTextureOfImage(const wr::ImageKey& aKey)
|
||||
{
|
||||
/// Release TextureClient that is bounded to ImageKey.
|
||||
/// It is used for recycling TextureClient.
|
||||
void RenderRootStateManager::ReleaseTextureOfImage(const wr::ImageKey& aKey) {
|
||||
WrBridge()->ReleaseTextureOfImage(aKey);
|
||||
}
|
||||
|
||||
wr::FontInstanceKey
|
||||
RenderRootStateManager::GetFontKeyForScaledFont(gfx::ScaledFont* aScaledFont,
|
||||
wr::IpcResourceUpdateQueue* aResources)
|
||||
{
|
||||
wr::FontInstanceKey RenderRootStateManager::GetFontKeyForScaledFont(
|
||||
gfx::ScaledFont* aScaledFont, wr::IpcResourceUpdateQueue* aResources) {
|
||||
return WrBridge()->GetFontKeyForScaledFont(aScaledFont, aResources);
|
||||
}
|
||||
|
||||
wr::FontKey
|
||||
RenderRootStateManager::GetFontKeyForUnscaledFont(gfx::UnscaledFont* aUnscaledFont,
|
||||
wr::IpcResourceUpdateQueue* aResources)
|
||||
{
|
||||
wr::FontKey RenderRootStateManager::GetFontKeyForUnscaledFont(
|
||||
gfx::UnscaledFont* aUnscaledFont, wr::IpcResourceUpdateQueue* aResources) {
|
||||
return WrBridge()->GetFontKeyForUnscaledFont(aUnscaledFont, aResources);
|
||||
}
|
||||
|
||||
} // namespace layers
|
||||
} // namespace mozilla
|
||||
} // namespace layers
|
||||
} // namespace mozilla
|
|
@ -16,11 +16,11 @@ namespace mozilla {
|
|||
|
||||
namespace layers {
|
||||
|
||||
class RenderRootStateManager
|
||||
{
|
||||
typedef nsTHashtable<nsRefPtrHashKey<WebRenderUserData>> WebRenderUserDataRefTable;
|
||||
class RenderRootStateManager {
|
||||
typedef nsTHashtable<nsRefPtrHashKey<WebRenderUserData>>
|
||||
WebRenderUserDataRefTable;
|
||||
|
||||
public:
|
||||
public:
|
||||
void AddRef();
|
||||
void Release();
|
||||
|
||||
|
@ -32,10 +32,7 @@ public:
|
|||
WebRenderBridgeChild* WrBridge() const;
|
||||
WebRenderCommandBuilder& CommandBuilder();
|
||||
WebRenderUserDataRefTable* GetWebRenderUserDataTable();
|
||||
WebRenderLayerManager* LayerManager()
|
||||
{
|
||||
return mLayerManager;
|
||||
}
|
||||
WebRenderLayerManager* LayerManager() { return mLayerManager; }
|
||||
|
||||
void AddImageKeyForDiscard(wr::ImageKey key);
|
||||
void AddBlobImageKeyForDiscard(wr::BlobImageKey key);
|
||||
|
@ -51,7 +48,8 @@ public:
|
|||
void AddCompositorAnimationsIdForDiscard(uint64_t aId);
|
||||
void DiscardCompositorAnimations();
|
||||
|
||||
void RegisterAsyncAnimation(const wr::ImageKey& aKey, SharedSurfacesAnimation* aAnimation);
|
||||
void RegisterAsyncAnimation(const wr::ImageKey& aKey,
|
||||
SharedSurfacesAnimation* aAnimation);
|
||||
void DeregisterAsyncAnimation(const wr::ImageKey& aKey);
|
||||
void ClearAsyncAnimations();
|
||||
void WrReleasedImages(const nsTArray<wr::ExternalImageKeyPair>& aPairs);
|
||||
|
@ -66,19 +64,23 @@ public:
|
|||
/// Release TextureClient that is bounded to ImageKey.
|
||||
/// It is used for recycling TextureClient.
|
||||
void ReleaseTextureOfImage(const wr::ImageKey& aKey);
|
||||
wr::FontInstanceKey GetFontKeyForScaledFont(gfx::ScaledFont* aScaledFont,
|
||||
wr::IpcResourceUpdateQueue* aResources = nullptr);
|
||||
wr::FontKey GetFontKeyForUnscaledFont(gfx::UnscaledFont* aUnscaledFont,
|
||||
wr::IpcResourceUpdateQueue* aResources = nullptr);
|
||||
wr::FontInstanceKey GetFontKeyForScaledFont(
|
||||
gfx::ScaledFont* aScaledFont,
|
||||
wr::IpcResourceUpdateQueue* aResources = nullptr);
|
||||
wr::FontKey GetFontKeyForUnscaledFont(
|
||||
gfx::UnscaledFont* aUnscaledFont,
|
||||
wr::IpcResourceUpdateQueue* aResources = nullptr);
|
||||
|
||||
void FlushAsyncResourceUpdates();
|
||||
private:
|
||||
|
||||
private:
|
||||
~RenderRootStateManager();
|
||||
WebRenderLayerManager* mLayerManager;
|
||||
Maybe<wr::IpcResourceUpdateQueue> mAsyncResourceUpdates;
|
||||
nsTArray<wr::ImageKey> mImageKeysToDelete;
|
||||
nsTArray<wr::BlobImageKey> mBlobImageKeysToDelete;
|
||||
std::unordered_map<uint64_t, RefPtr<SharedSurfacesAnimation>> mAsyncAnimations;
|
||||
std::unordered_map<uint64_t, RefPtr<SharedSurfacesAnimation>>
|
||||
mAsyncAnimations;
|
||||
|
||||
// Set of compositor animation ids for which there are active animations (as
|
||||
// of the last transaction) on the compositor side.
|
||||
|
@ -92,7 +94,7 @@ private:
|
|||
friend class WebRenderLayerManager;
|
||||
};
|
||||
|
||||
} // namespace layers
|
||||
} // namespace mozilla
|
||||
} // namespace layers
|
||||
} // namespace mozilla
|
||||
|
||||
#endif /* GFX_RENDERROOTSTATEMANAGER_H */
|
||||
|
|
|
@ -1067,8 +1067,9 @@ static bool IsItemProbablyActive(nsDisplayItem* aItem,
|
|||
bool is2D = t.Is2D(&t2d);
|
||||
GP("active: %d\n", transformItem->MayBeAnimated(aDisplayListBuilder));
|
||||
return transformItem->MayBeAnimated(aDisplayListBuilder, false) ||
|
||||
!is2D || HasActiveChildren(*transformItem->GetChildren(),
|
||||
aDisplayListBuilder);
|
||||
!is2D ||
|
||||
HasActiveChildren(*transformItem->GetChildren(),
|
||||
aDisplayListBuilder);
|
||||
}
|
||||
case DisplayItemType::TYPE_OPACITY: {
|
||||
nsDisplayOpacity* opacityItem = static_cast<nsDisplayOpacity*>(aItem);
|
||||
|
@ -2303,8 +2304,7 @@ Maybe<wr::WrImageMask> WebRenderCommandBuilder::BuildWrMaskImage(
|
|||
|
||||
recorder->FlushItem(IntRect(0, 0, size.width, size.height));
|
||||
TakeExternalSurfaces(recorder, maskData->mExternalSurfaces,
|
||||
mManager->GetRenderRootStateManager(),
|
||||
aResources);
|
||||
mManager->GetRenderRootStateManager(), aResources);
|
||||
recorder->Finish();
|
||||
|
||||
Range<uint8_t> bytes((uint8_t*)recorder->mOutputStream.mData,
|
||||
|
|
|
@ -1940,9 +1940,7 @@ class gfxFont {
|
|||
|
||||
// The return value is interpreted as a horizontal advance in 16.16 fixed
|
||||
// point format.
|
||||
virtual int32_t GetGlyphWidth(uint16_t aGID) {
|
||||
return -1;
|
||||
}
|
||||
virtual int32_t GetGlyphWidth(uint16_t aGID) { return -1; }
|
||||
|
||||
bool IsSpaceGlyphInvisible(DrawTarget* aRefDrawTarget,
|
||||
const gfxTextRun* aTextRun);
|
||||
|
|
|
@ -308,10 +308,10 @@ void nsWebPDecoder::ApplyColorProfile(const char* aProfile, size_t aLength) {
|
|||
uint32_t profileSpace = qcms_profile_get_color_space(mInProfile);
|
||||
if (profileSpace == icSigGrayData) {
|
||||
// WebP doesn't produce grayscale data, this must be corrupt.
|
||||
MOZ_LOG(
|
||||
sWebPLog, LogLevel::Error,
|
||||
("[this=%p] nsWebPDecoder::ApplyColorProfile -- ignoring grayscale color profile\n",
|
||||
this));
|
||||
MOZ_LOG(sWebPLog, LogLevel::Error,
|
||||
("[this=%p] nsWebPDecoder::ApplyColorProfile -- ignoring grayscale "
|
||||
"color profile\n",
|
||||
this));
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -15,15 +15,13 @@ namespace base {
|
|||
// thread-safe access, since it will only be modified in testing.
|
||||
static AtExitManager* g_top_manager = NULL;
|
||||
|
||||
AtExitManager::AtExitManager() : lock_("AtExitManager"),
|
||||
next_manager_(NULL) {
|
||||
AtExitManager::AtExitManager() : lock_("AtExitManager"), next_manager_(NULL) {
|
||||
DCHECK(!g_top_manager);
|
||||
g_top_manager = this;
|
||||
}
|
||||
|
||||
AtExitManager::AtExitManager(bool shadow) : lock_("AtExitManager"),
|
||||
next_manager_(g_top_manager)
|
||||
{
|
||||
AtExitManager::AtExitManager(bool shadow)
|
||||
: lock_("AtExitManager"), next_manager_(g_top_manager) {
|
||||
DCHECK(shadow || !g_top_manager);
|
||||
g_top_manager = this;
|
||||
}
|
||||
|
|
|
@ -243,15 +243,13 @@ class NowSingleton {
|
|||
|
||||
private:
|
||||
explicit NowSingleton(mozilla::StaticMutex& aMutex)
|
||||
: lock_(aMutex)
|
||||
, rollover_(TimeDelta::FromMilliseconds(0))
|
||||
, last_seen_(0)
|
||||
{
|
||||
}
|
||||
: lock_(aMutex),
|
||||
rollover_(TimeDelta::FromMilliseconds(0)),
|
||||
last_seen_(0) {}
|
||||
~NowSingleton() = default;
|
||||
|
||||
mozilla::StaticMutex& lock_; // To protected last_seen_ and rollover_.
|
||||
TimeDelta rollover_; // Accumulation of time lost due to rollover.
|
||||
TimeDelta rollover_; // Accumulation of time lost due to rollover.
|
||||
DWORD last_seen_; // The last timeGetTime value we saw, to detect rollover.
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(NowSingleton);
|
||||
|
|
|
@ -150,9 +150,7 @@ class PipeMap {
|
|||
}
|
||||
|
||||
private:
|
||||
explicit PipeMap(mozilla::StaticMutex& aMutex)
|
||||
: lock_(aMutex)
|
||||
{}
|
||||
explicit PipeMap(mozilla::StaticMutex& aMutex) : lock_(aMutex) {}
|
||||
~PipeMap() = default;
|
||||
|
||||
mozilla::StaticMutex& lock_;
|
||||
|
|
|
@ -20,15 +20,20 @@
|
|||
// in the code below. Making them equal also ensures that if new process
|
||||
// types are added, people will know they may need to add crash reporting
|
||||
// support in various places because compilation errors will be triggered here.
|
||||
static_assert(nsICrashService::PROCESS_TYPE_MAIN == (int)GeckoProcessType_Default,
|
||||
static_assert(nsICrashService::PROCESS_TYPE_MAIN ==
|
||||
(int)GeckoProcessType_Default,
|
||||
"GeckoProcessType enum is out of sync with nsICrashService!");
|
||||
static_assert(nsICrashService::PROCESS_TYPE_PLUGIN == (int)GeckoProcessType_Plugin,
|
||||
static_assert(nsICrashService::PROCESS_TYPE_PLUGIN ==
|
||||
(int)GeckoProcessType_Plugin,
|
||||
"GeckoProcessType enum is out of sync with nsICrashService!");
|
||||
static_assert(nsICrashService::PROCESS_TYPE_CONTENT == (int)GeckoProcessType_Content,
|
||||
static_assert(nsICrashService::PROCESS_TYPE_CONTENT ==
|
||||
(int)GeckoProcessType_Content,
|
||||
"GeckoProcessType enum is out of sync with nsICrashService!");
|
||||
static_assert(nsICrashService::PROCESS_TYPE_IPDLUNITTEST == (int)GeckoProcessType_IPDLUnitTest,
|
||||
static_assert(nsICrashService::PROCESS_TYPE_IPDLUNITTEST ==
|
||||
(int)GeckoProcessType_IPDLUnitTest,
|
||||
"GeckoProcessType enum is out of sync with nsICrashService!");
|
||||
static_assert(nsICrashService::PROCESS_TYPE_GMPLUGIN == (int)GeckoProcessType_GMPlugin,
|
||||
static_assert(nsICrashService::PROCESS_TYPE_GMPLUGIN ==
|
||||
(int)GeckoProcessType_GMPlugin,
|
||||
"GeckoProcessType enum is out of sync with nsICrashService!");
|
||||
static_assert(nsICrashService::PROCESS_TYPE_GPU == (int)GeckoProcessType_GPU,
|
||||
"GeckoProcessType enum is out of sync with nsICrashService!");
|
||||
|
@ -36,14 +41,15 @@ static_assert(nsICrashService::PROCESS_TYPE_VR == (int)GeckoProcessType_VR,
|
|||
"GeckoProcessType enum is out of sync with nsICrashService!");
|
||||
static_assert(nsICrashService::PROCESS_TYPE_RDD == (int)GeckoProcessType_RDD,
|
||||
"GeckoProcessType enum is out of sync with nsICrashService!");
|
||||
static_assert(nsICrashService::PROCESS_TYPE_SOCKET == (int)GeckoProcessType_Socket,
|
||||
static_assert(nsICrashService::PROCESS_TYPE_SOCKET ==
|
||||
(int)GeckoProcessType_Socket,
|
||||
"GeckoProcessType enum is out of sync with nsICrashService!");
|
||||
// Add new static asserts here if you add more process types.
|
||||
// Update this static assert as well.
|
||||
static_assert(nsICrashService::PROCESS_TYPE_SOCKET + 1 == (int)GeckoProcessType_End,
|
||||
static_assert(nsICrashService::PROCESS_TYPE_SOCKET + 1 ==
|
||||
(int)GeckoProcessType_End,
|
||||
"GeckoProcessType enum is out of sync with nsICrashService!");
|
||||
|
||||
|
||||
namespace mozilla {
|
||||
namespace ipc {
|
||||
|
||||
|
@ -116,14 +122,14 @@ bool CrashReporterHost::FinalizeCrashReport() {
|
|||
// unit tests), but that's OK.
|
||||
switch (mProcessType) {
|
||||
#define GECKO_PROCESS_TYPE(enum_name, string_name, xre_name) \
|
||||
case GeckoProcessType_##enum_name: \
|
||||
type.AssignLiteral(string_name); \
|
||||
break;
|
||||
case GeckoProcessType_##enum_name: \
|
||||
type.AssignLiteral(string_name); \
|
||||
break;
|
||||
#include "mozilla/GeckoProcessTypes.h"
|
||||
#undef GECKO_PROCESS_TYPE
|
||||
default:
|
||||
NS_ERROR("unknown process type");
|
||||
break;
|
||||
default:
|
||||
NS_ERROR("unknown process type");
|
||||
break;
|
||||
}
|
||||
}
|
||||
annotations[CrashReporter::Annotation::ProcessType] = type;
|
||||
|
@ -188,13 +194,13 @@ bool CrashReporterHost::FinalizeCrashReport() {
|
|||
} else {
|
||||
switch (aProcessType) {
|
||||
#define GECKO_PROCESS_TYPE(enum_name, string_name, xre_name) \
|
||||
case GeckoProcessType_##enum_name: \
|
||||
telemetryKey.AssignLiteral(string_name); \
|
||||
break;
|
||||
case GeckoProcessType_##enum_name: \
|
||||
telemetryKey.AssignLiteral(string_name); \
|
||||
break;
|
||||
#include "mozilla/GeckoProcessTypes.h"
|
||||
#undef GECKO_PROCESS_TYPE
|
||||
// We can't really hit this, thanks to the above switch, but having it here
|
||||
// will placate the compiler.
|
||||
// We can't really hit this, thanks to the above switch, but having it
|
||||
// here will placate the compiler.
|
||||
default:
|
||||
NS_ERROR("unknown process type");
|
||||
return;
|
||||
|
|
|
@ -381,7 +381,8 @@ bool IndirectBindingMap::lookup(jsid name, ModuleEnvironmentObject** envOut,
|
|||
}
|
||||
|
||||
SetProxyReservedSlot(object, ExportsSlot, ObjectValue(*exports));
|
||||
SetProxyReservedSlot(object, BindingsSlot, PrivateValue(rootedBindings.release()));
|
||||
SetProxyReservedSlot(object, BindingsSlot,
|
||||
PrivateValue(rootedBindings.release()));
|
||||
|
||||
return &object->as<ModuleNamespaceObject>();
|
||||
}
|
||||
|
|
|
@ -985,8 +985,8 @@ class NameResolver {
|
|||
MOZ_ASSERT(parents[initialParents] == cur,
|
||||
"pushed child shouldn't change underneath us");
|
||||
|
||||
AlwaysPoison(&parents[initialParents], 0xFF, sizeof(parents[initialParents]),
|
||||
MemCheckKind::MakeUndefined);
|
||||
AlwaysPoison(&parents[initialParents], 0xFF,
|
||||
sizeof(parents[initialParents]), MemCheckKind::MakeUndefined);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -592,7 +592,7 @@ inline size_t Arena::finalize(FreeOp* fop, AllocKind thingKind,
|
|||
} else {
|
||||
t->finalize(fop);
|
||||
AlwaysPoison(t, JS_SWEPT_TENURED_PATTERN, thingSize,
|
||||
MemCheckKind::MakeUndefined);
|
||||
MemCheckKind::MakeUndefined);
|
||||
gcTracer.traceTenuredFinalize(t);
|
||||
}
|
||||
}
|
||||
|
@ -3587,8 +3587,8 @@ void GCRuntime::sweepFromBackgroundThread(AutoLockHelperThreadState& lock) {
|
|||
AutoUnlockHelperThreadState unlock(lock);
|
||||
sweepBackgroundThings(zones, freeLifoAlloc);
|
||||
|
||||
// The main thread may call queueZonesAndStartBackgroundSweep() while this is
|
||||
// running so we must check there is no more work after releasing the
|
||||
// The main thread may call queueZonesAndStartBackgroundSweep() while this
|
||||
// is running so we must check there is no more work after releasing the
|
||||
// lock.
|
||||
} while (!backgroundSweepZones.ref().isEmpty());
|
||||
}
|
||||
|
@ -3642,8 +3642,7 @@ void GCRuntime::startBackgroundFree() {
|
|||
}
|
||||
|
||||
void BackgroundFreeTask::run() {
|
||||
AutoTraceLog logFreeing(TraceLoggerForCurrentThread(),
|
||||
TraceLogger_GCFree);
|
||||
AutoTraceLog logFreeing(TraceLoggerForCurrentThread(), TraceLogger_GCFree);
|
||||
|
||||
AutoLockHelperThreadState lock;
|
||||
|
||||
|
@ -3666,16 +3665,15 @@ void GCRuntime::freeFromBackgroundThread(AutoLockHelperThreadState& lock) {
|
|||
|
||||
lifoBlocks.freeAll();
|
||||
|
||||
for (Nursery::BufferSet::Range r = buffers.all(); !r.empty(); r.popFront()) {
|
||||
for (Nursery::BufferSet::Range r = buffers.all(); !r.empty();
|
||||
r.popFront()) {
|
||||
rt->defaultFreeOp()->free_(r.front());
|
||||
}
|
||||
} while (!lifoBlocksToFree.ref().isEmpty() ||
|
||||
!buffersToFreeAfterMinorGC.ref().empty());
|
||||
}
|
||||
|
||||
void GCRuntime::waitBackgroundFreeEnd() {
|
||||
freeTask.join();
|
||||
}
|
||||
void GCRuntime::waitBackgroundFreeEnd() { freeTask.join(); }
|
||||
|
||||
struct IsAboutToBeFinalizedFunctor {
|
||||
template <typename T>
|
||||
|
@ -6935,8 +6933,8 @@ static bool ShouldCleanUpEverything(JS::gcreason::Reason reason,
|
|||
}
|
||||
|
||||
static bool ShouldSweepOnBackgroundThread(JS::gcreason::Reason reason) {
|
||||
return reason != JS::gcreason::DESTROY_RUNTIME &&
|
||||
!gcTracer.traceEnabled() && CanUseExtraThreads();
|
||||
return reason != JS::gcreason::DESTROY_RUNTIME && !gcTracer.traceEnabled() &&
|
||||
CanUseExtraThreads();
|
||||
}
|
||||
|
||||
void GCRuntime::incrementalSlice(SliceBudget& budget,
|
||||
|
|
|
@ -166,8 +166,9 @@ class FreeSpan {
|
|||
return nullptr; // The span is empty.
|
||||
}
|
||||
checkSpan(arena);
|
||||
DebugOnlyPoison(reinterpret_cast<void*>(thing), JS_ALLOCATED_TENURED_PATTERN,
|
||||
thingSize, MemCheckKind::MakeUndefined);
|
||||
DebugOnlyPoison(reinterpret_cast<void*>(thing),
|
||||
JS_ALLOCATED_TENURED_PATTERN, thingSize,
|
||||
MemCheckKind::MakeUndefined);
|
||||
return reinterpret_cast<TenuredCell*>(thing);
|
||||
}
|
||||
|
||||
|
@ -237,7 +238,7 @@ class Arena {
|
|||
*/
|
||||
static const size_t DELAYED_MARKING_FLAG_BITS = 3;
|
||||
static const size_t DELAYED_MARKING_ARENA_BITS =
|
||||
JS_BITS_PER_WORD - 8 - DELAYED_MARKING_FLAG_BITS;
|
||||
JS_BITS_PER_WORD - 8 - DELAYED_MARKING_FLAG_BITS;
|
||||
size_t onDelayedMarkingList_ : 1;
|
||||
size_t hasDelayedBlackMarking_ : 1;
|
||||
size_t hasDelayedGrayMarking_ : 1;
|
||||
|
|
|
@ -974,7 +974,7 @@ static bool TraceKindParticipatesInCC(JS::TraceKind kind) {
|
|||
return DispatchTraceKindTyped(ParticipatesInCCFunctor(), kind);
|
||||
}
|
||||
|
||||
#endif // DEBUG
|
||||
#endif // DEBUG
|
||||
|
||||
template <typename T>
|
||||
bool js::GCMarker::mark(T* thing) {
|
||||
|
|
|
@ -72,8 +72,7 @@ inline void js::NurseryChunk::poisonAndInit(JSRuntime* rt, size_t extent) {
|
|||
MOZ_ASSERT(extent <= ChunkSize);
|
||||
MOZ_MAKE_MEM_UNDEFINED(this, extent);
|
||||
|
||||
Poison(this, JS_FRESH_NURSERY_PATTERN, extent,
|
||||
MemCheckKind::MakeUndefined);
|
||||
Poison(this, JS_FRESH_NURSERY_PATTERN, extent, MemCheckKind::MakeUndefined);
|
||||
|
||||
new (&trailer) gc::ChunkTrailer(rt, &rt->gc.storeBuffer());
|
||||
}
|
||||
|
@ -182,9 +181,7 @@ bool js::Nursery::init(uint32_t maxNurseryBytes, AutoLockGCBgAlloc& lock) {
|
|||
return true;
|
||||
}
|
||||
|
||||
js::Nursery::~Nursery() {
|
||||
disable();
|
||||
}
|
||||
js::Nursery::~Nursery() { disable(); }
|
||||
|
||||
void js::Nursery::enable() {
|
||||
MOZ_ASSERT(isEmpty());
|
||||
|
|
|
@ -312,8 +312,7 @@ class Nursery {
|
|||
}
|
||||
size_t sizeOfMallocedBuffers(mozilla::MallocSizeOf mallocSizeOf) const {
|
||||
size_t total = 0;
|
||||
for (BufferSet::Range r = mallocedBuffers.all(); !r.empty();
|
||||
r.popFront()) {
|
||||
for (BufferSet::Range r = mallocedBuffers.all(); !r.empty(); r.popFront()) {
|
||||
total += mallocSizeOf(r.front());
|
||||
}
|
||||
total += mallocedBuffers.shallowSizeOfExcludingThis(mallocSizeOf);
|
||||
|
|
|
@ -181,8 +181,9 @@ Phase Statistics::lookupChildPhase(PhaseKind phaseKind) const {
|
|||
}
|
||||
|
||||
if (phase == Phase::NONE) {
|
||||
MOZ_CRASH_UNSAFE_PRINTF("Child phase kind %u not found under current phase kind %u",
|
||||
unsigned(phaseKind), unsigned(currentPhaseKind()));
|
||||
MOZ_CRASH_UNSAFE_PRINTF(
|
||||
"Child phase kind %u not found under current phase kind %u",
|
||||
unsigned(phaseKind), unsigned(currentPhaseKind()));
|
||||
}
|
||||
|
||||
return phase;
|
||||
|
|
|
@ -5413,9 +5413,9 @@ void CodeGenerator::visitDefVar(LDefVar* lir) {
|
|||
JSScript* script = current->mir()->info().script();
|
||||
jsbytecode* pc = lir->mir()->resumePoint()->pc();
|
||||
|
||||
pushArg(ImmPtr(pc)); // jsbytecode*
|
||||
pushArg(ImmGCPtr(script)); // JSScript*
|
||||
pushArg(envChain); // JSObject*
|
||||
pushArg(ImmPtr(pc)); // jsbytecode*
|
||||
pushArg(ImmGCPtr(script)); // JSScript*
|
||||
pushArg(envChain); // JSObject*
|
||||
|
||||
callVM(DefVarInfo, lir);
|
||||
}
|
||||
|
|
|
@ -150,8 +150,7 @@ class IonTryNoteFilter {
|
|||
class TryNoteIterIon : public TryNoteIter<IonTryNoteFilter> {
|
||||
public:
|
||||
TryNoteIterIon(JSContext* cx, const InlineFrameIterator& frame)
|
||||
: TryNoteIter(cx, frame.script(), frame.pc(),
|
||||
IonTryNoteFilter(frame)) {}
|
||||
: TryNoteIter(cx, frame.script(), frame.pc(), IonTryNoteFilter(frame)) {}
|
||||
};
|
||||
|
||||
static void HandleExceptionIon(JSContext* cx, const InlineFrameIterator& frame,
|
||||
|
@ -323,8 +322,7 @@ class BaselineTryNoteFilter {
|
|||
class TryNoteIterBaseline : public TryNoteIter<BaselineTryNoteFilter> {
|
||||
public:
|
||||
TryNoteIterBaseline(JSContext* cx, BaselineFrame* frame, jsbytecode* pc)
|
||||
: TryNoteIter(cx, frame->script(), pc, BaselineTryNoteFilter(frame)) {
|
||||
}
|
||||
: TryNoteIter(cx, frame->script(), pc, BaselineTryNoteFilter(frame)) {}
|
||||
};
|
||||
|
||||
// Close all live iterators on a BaselineFrame due to exception unwinding. The
|
||||
|
|
|
@ -43,7 +43,7 @@ static constexpr FloatRegister ScratchDoubleReg = {FloatRegisters::d31,
|
|||
FloatRegisters::Double};
|
||||
struct ScratchDoubleScope : public AutoFloatRegisterScope {
|
||||
explicit ScratchDoubleScope(MacroAssembler& masm)
|
||||
: AutoFloatRegisterScope(masm, ScratchDoubleReg) {}
|
||||
: AutoFloatRegisterScope(masm, ScratchDoubleReg) {}
|
||||
};
|
||||
|
||||
static constexpr FloatRegister ReturnFloat32Reg = {FloatRegisters::s0,
|
||||
|
@ -52,7 +52,7 @@ static constexpr FloatRegister ScratchFloat32Reg = {FloatRegisters::s31,
|
|||
FloatRegisters::Single};
|
||||
struct ScratchFloat32Scope : public AutoFloatRegisterScope {
|
||||
explicit ScratchFloat32Scope(MacroAssembler& masm)
|
||||
: AutoFloatRegisterScope(masm, ScratchFloat32Reg) {}
|
||||
: AutoFloatRegisterScope(masm, ScratchFloat32Reg) {}
|
||||
};
|
||||
|
||||
static constexpr Register InvalidReg{Registers::invalid_reg};
|
||||
|
|
|
@ -493,10 +493,10 @@ void MacroAssembler::storeRegsInMask(LiveRegisterSet set, Address dest,
|
|||
} else {
|
||||
MOZ_CRASH("Unknown register type.");
|
||||
}
|
||||
|
||||
}
|
||||
MOZ_ASSERT(numFpu == 0);
|
||||
// Padding to keep the stack aligned, taken from the x64 and mips64 implementations.
|
||||
// Padding to keep the stack aligned, taken from the x64 and mips64
|
||||
// implementations.
|
||||
diffF -= diffF % sizeof(uintptr_t);
|
||||
MOZ_ASSERT(diffF == 0);
|
||||
}
|
||||
|
|
|
@ -3557,8 +3557,8 @@ CompileOptions& CompileOptions::setIntroductionInfoToCaller(
|
|||
DescribeScriptedCallerForCompilation(cx, &maybeScript, &filename, &lineno,
|
||||
&pcOffset, &mutedErrors);
|
||||
if (filename) {
|
||||
return setIntroductionInfo(filename, introductionType, lineno,
|
||||
maybeScript, pcOffset);
|
||||
return setIntroductionInfo(filename, introductionType, lineno, maybeScript,
|
||||
pcOffset);
|
||||
} else {
|
||||
return setIntroductionType(introductionType);
|
||||
}
|
||||
|
|
|
@ -4213,9 +4213,9 @@ static T* findDebuggerInVector(Debugger* dbg,
|
|||
|
||||
// a ReadBarriered version for findDebuggerInVector
|
||||
// TODO: Bug 1515934 - findDebuggerInVector<T> triggers read barriers.
|
||||
static ReadBarriered<Debugger*>*
|
||||
findDebuggerInVector(Debugger* dbg,
|
||||
Vector<ReadBarriered<Debugger*>, 0, js::SystemAllocPolicy>* vec) {
|
||||
static ReadBarriered<Debugger*>* findDebuggerInVector(
|
||||
Debugger* dbg,
|
||||
Vector<ReadBarriered<Debugger*>, 0, js::SystemAllocPolicy>* vec) {
|
||||
ReadBarriered<Debugger*>* p;
|
||||
for (p = vec->begin(); p != vec->end(); p++) {
|
||||
if (p->unbarrieredGet() == dbg) {
|
||||
|
|
|
@ -1105,8 +1105,7 @@ class InterpreterTryNoteFilter {
|
|||
}
|
||||
};
|
||||
|
||||
class TryNoteIterInterpreter
|
||||
: public TryNoteIter<InterpreterTryNoteFilter> {
|
||||
class TryNoteIterInterpreter : public TryNoteIter<InterpreterTryNoteFilter> {
|
||||
public:
|
||||
TryNoteIterInterpreter(JSContext* cx, const InterpreterRegs& regs)
|
||||
: TryNoteIter(cx, regs.fp()->script(), regs.pc,
|
||||
|
|
|
@ -415,7 +415,6 @@ class MOZ_STACK_CLASS TryNoteIter {
|
|||
uint32_t start = tn_->start;
|
||||
uint32_t length = tn_->length;
|
||||
return offset - start < length;
|
||||
|
||||
}
|
||||
bool done() const { return tn_ == tnEnd_; }
|
||||
const JSTryNote* operator*() const { return tn_; }
|
||||
|
|
|
@ -119,7 +119,7 @@ inline js::GlobalObject& JSScript::global() const {
|
|||
return *realm()->maybeGlobal();
|
||||
}
|
||||
|
||||
inline bool JSScript::hasGlobal(const js::GlobalObject *global) const {
|
||||
inline bool JSScript::hasGlobal(const js::GlobalObject* global) const {
|
||||
return global == realm()->unsafeUnbarrieredMaybeGlobal();
|
||||
}
|
||||
|
||||
|
|
|
@ -1382,7 +1382,8 @@ ScriptSourceObject* ScriptSourceObject::createInternal(JSContext* cx,
|
|||
obj->initReservedSlot(ELEMENT_SLOT, MagicValue(JS_GENERIC_MAGIC));
|
||||
obj->initReservedSlot(ELEMENT_PROPERTY_SLOT, MagicValue(JS_GENERIC_MAGIC));
|
||||
obj->initReservedSlot(INTRODUCTION_SCRIPT_SLOT, MagicValue(JS_GENERIC_MAGIC));
|
||||
obj->initReservedSlot(INTRODUCTION_SOURCE_OBJECT_SLOT, MagicValue(JS_GENERIC_MAGIC));
|
||||
obj->initReservedSlot(INTRODUCTION_SOURCE_OBJECT_SLOT,
|
||||
MagicValue(JS_GENERIC_MAGIC));
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
|
|
@ -1677,8 +1677,8 @@ bool SavedStacks::getLocation(JSContext* cx, const FrameIter& iter,
|
|||
}
|
||||
|
||||
void SavedStacks::chooseSamplingProbability(Realm* realm) {
|
||||
// Use unbarriered version to prevent triggering read barrier while collecting,
|
||||
// this is safe as long as global does not escape.
|
||||
// Use unbarriered version to prevent triggering read barrier while
|
||||
// collecting, this is safe as long as global does not escape.
|
||||
GlobalObject* global = realm->unsafeUnbarrieredMaybeGlobal();
|
||||
if (!global) {
|
||||
return;
|
||||
|
@ -1703,8 +1703,7 @@ void SavedStacks::chooseSamplingProbability(Realm* realm) {
|
|||
|
||||
if (dbgp->trackingAllocationSites && dbgp->enabled) {
|
||||
foundAnyDebuggers = true;
|
||||
probability =
|
||||
std::max(dbgp->allocationSamplingProbability, probability);
|
||||
probability = std::max(dbgp->allocationSamplingProbability, probability);
|
||||
}
|
||||
}
|
||||
MOZ_ASSERT(foundAnyDebuggers);
|
||||
|
|
|
@ -1325,7 +1325,7 @@ class MOZ_STACK_CLASS JS_HAZ_ROOTED ModuleValidatorShared {
|
|||
using MathNameMap = HashMap<PropertyName*, MathBuiltin>;
|
||||
using ArrayViewVector = Vector<ArrayView>;
|
||||
|
||||
protected:
|
||||
protected:
|
||||
JSContext* cx_;
|
||||
CodeNode* moduleFunctionNode_;
|
||||
PropertyName* moduleFunctionName_;
|
||||
|
|
|
@ -259,8 +259,10 @@ static const double arm64IonBytecodesPerMs = 750; // Estimate
|
|||
static const double x64DesktopTierCutoff = x64IonBytecodesPerMs * tierCutoffMs;
|
||||
static const double x86DesktopTierCutoff = x86IonBytecodesPerMs * tierCutoffMs;
|
||||
static const double x86MobileTierCutoff = x86DesktopTierCutoff / 2; // Guess
|
||||
static const double arm32MobileTierCutoff = arm32IonBytecodesPerMs * tierCutoffMs;
|
||||
static const double arm64MobileTierCutoff = arm64IonBytecodesPerMs * tierCutoffMs;
|
||||
static const double arm32MobileTierCutoff =
|
||||
arm32IonBytecodesPerMs * tierCutoffMs;
|
||||
static const double arm64MobileTierCutoff =
|
||||
arm64IonBytecodesPerMs * tierCutoffMs;
|
||||
|
||||
static double CodesizeCutoff(SystemClass cls) {
|
||||
switch (cls) {
|
||||
|
|
|
@ -701,12 +701,9 @@ static void LayoutModuleDtor() {
|
|||
xpcModuleDtor();
|
||||
}
|
||||
|
||||
static const mozilla::Module kLayoutModule = {mozilla::Module::kVersion,
|
||||
kLayoutCIDs,
|
||||
kLayoutContracts,
|
||||
kLayoutCategories,
|
||||
nullptr,
|
||||
Initialize,
|
||||
LayoutModuleDtor};
|
||||
static const mozilla::Module kLayoutModule = {
|
||||
mozilla::Module::kVersion, kLayoutCIDs, kLayoutContracts,
|
||||
kLayoutCategories, nullptr, Initialize,
|
||||
LayoutModuleDtor};
|
||||
|
||||
NSMODULE_DEFN(nsLayoutModule) = &kLayoutModule;
|
||||
|
|
|
@ -14,29 +14,30 @@
|
|||
#endif
|
||||
|
||||
#if (defined(XP_WIN) && !defined(HAVE_64BIT_BUILD)) || defined(ANDROID)
|
||||
// Blink's magic depth limit from its HTML parser (513) plus as much as fits in the
|
||||
// default run-time stack on armv7 Android on Dalvik when using display: block minus
|
||||
// a bit just to be sure. The Dalvik default stack crashes at 588. ART can do a few
|
||||
// frames more. Using the same number for 32-bit Windows for consistency. Over there,
|
||||
// Blink's magic depth of 513 doesn't fit in the default stack of 1 MB, but this magic
|
||||
// depth fits when the default is grown by mere 192 KB (tested in 64 KB increments).
|
||||
// Blink's magic depth limit from its HTML parser (513) plus as much as fits in
|
||||
// the default run-time stack on armv7 Android on Dalvik when using display:
|
||||
// block minus a bit just to be sure. The Dalvik default stack crashes at 588.
|
||||
// ART can do a few frames more. Using the same number for 32-bit Windows for
|
||||
// consistency. Over there, Blink's magic depth of 513 doesn't fit in the
|
||||
// default stack of 1 MB, but this magic depth fits when the default is grown by
|
||||
// mere 192 KB (tested in 64 KB increments).
|
||||
//
|
||||
// 32-bit Windows has a different limit compared to 64-bit desktop, because the
|
||||
// default stack size affects all threads and consumes address space. Fixing that
|
||||
// is bug 1257522.
|
||||
// default stack size affects all threads and consumes address space. Fixing
|
||||
// that is bug 1257522.
|
||||
//
|
||||
// 32-bit Android on ARM already happens to have defaults that are close enough to
|
||||
// what makes sense as a temporary measure on Windows, so adjusting the Android
|
||||
// stack can be a follow-up. The stack on 64-bit ARM needs adjusting in any case
|
||||
// before 64-bit ARM can become tier-1. See bug 1400811.
|
||||
// 32-bit Android on ARM already happens to have defaults that are close enough
|
||||
// to what makes sense as a temporary measure on Windows, so adjusting the
|
||||
// Android stack can be a follow-up. The stack on 64-bit ARM needs adjusting in
|
||||
// any case before 64-bit ARM can become tier-1. See bug 1400811.
|
||||
//
|
||||
// Ideally, we'd get rid of this smaller limit and make 32-bit Windows and Android
|
||||
// capable of working with the Linux/Mac/Win64 number below.
|
||||
// Ideally, we'd get rid of this smaller limit and make 32-bit Windows and
|
||||
// Android capable of working with the Linux/Mac/Win64 number below.
|
||||
#define MAX_REFLOW_DEPTH 585
|
||||
#else
|
||||
// Blink's magic depth limit from its HTML parser times two. Also just about fits
|
||||
// within the system default runtime stack limit of 8 MB on 64-bit Mac and Linux with
|
||||
// display: table-cell.
|
||||
// Blink's magic depth limit from its HTML parser times two. Also just about
|
||||
// fits within the system default runtime stack limit of 8 MB on 64-bit Mac and
|
||||
// Linux with display: table-cell.
|
||||
#define MAX_REFLOW_DEPTH 1026
|
||||
#endif
|
||||
|
||||
|
|
|
@ -1627,8 +1627,9 @@ ImgDrawResult nsImageFrame::DisplayAltFeedbackWithoutLayer(
|
|||
nsLayoutUtils::ComputeImageContainerDrawingParameters(
|
||||
imgCon, this, destRect, aSc, aFlags, svgContext);
|
||||
RefPtr<ImageContainer> container;
|
||||
result = imgCon->GetImageContainerAtSize(
|
||||
aManager->LayerManager(), decodeSize, svgContext, aFlags, getter_AddRefs(container));
|
||||
result = imgCon->GetImageContainerAtSize(aManager->LayerManager(),
|
||||
decodeSize, svgContext, aFlags,
|
||||
getter_AddRefs(container));
|
||||
if (container) {
|
||||
bool wrResult = aManager->CommandBuilder().PushImage(
|
||||
aItem, container, aBuilder, aResources, aSc, destRect, bounds);
|
||||
|
|
|
@ -1898,7 +1898,7 @@ bool BuildTextRunsScanner::ContinueTextRunAcrossFrames(nsTextFrame* aFrame1,
|
|||
};
|
||||
|
||||
const nsIFrame* ancestor =
|
||||
nsLayoutUtils::FindNearestCommonAncestorFrame(aFrame1, aFrame2);
|
||||
nsLayoutUtils::FindNearestCommonAncestorFrame(aFrame1, aFrame2);
|
||||
MOZ_ASSERT(ancestor);
|
||||
|
||||
// Map inline-end and inline-start to physical sides for checking presence
|
||||
|
|
|
@ -33,7 +33,7 @@ class Rule;
|
|||
namespace dom {
|
||||
class Document;
|
||||
class Element;
|
||||
}
|
||||
} // namespace dom
|
||||
|
||||
struct MutationClosureData {
|
||||
MutationClosureData() : mClosure(nullptr), mElement(nullptr), mModType(0) {}
|
||||
|
|
|
@ -21,7 +21,7 @@ namespace mozilla {
|
|||
namespace dom {
|
||||
class Document;
|
||||
}
|
||||
}
|
||||
} // namespace mozilla
|
||||
|
||||
struct VisitedURI {
|
||||
nsCOMPtr<nsIURI> mURI;
|
||||
|
|
|
@ -449,7 +449,8 @@ void nsIOService::NotifySocketProcessPrefsChanged(const char *aName) {
|
|||
dom::Pref pref(nsCString(aName), /* isLocked */ false, null_t(), null_t());
|
||||
Preferences::GetPreference(&pref);
|
||||
auto sendPrefUpdate = [pref]() {
|
||||
Unused << gIOService->mSocketProcess->GetActor()->SendPreferenceUpdate(pref);
|
||||
Unused << gIOService->mSocketProcess->GetActor()->SendPreferenceUpdate(
|
||||
pref);
|
||||
};
|
||||
CallOrWaitForSocketProcess(sendPrefUpdate);
|
||||
}
|
||||
|
@ -469,13 +470,14 @@ void nsIOService::OnProcessLaunchComplete(SocketProcessHost *aHost,
|
|||
if (!mPendingEvents.IsEmpty()) {
|
||||
nsTArray<std::function<void()>> pendingEvents;
|
||||
mPendingEvents.SwapElements(pendingEvents);
|
||||
for (auto& func : pendingEvents) {
|
||||
for (auto &func : pendingEvents) {
|
||||
func();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void nsIOService::CallOrWaitForSocketProcess(const std::function<void()>& aFunc) {
|
||||
void nsIOService::CallOrWaitForSocketProcess(
|
||||
const std::function<void()> &aFunc) {
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
if (IsSocketProcessLaunchComplete() && SocketProcessReady()) {
|
||||
aFunc();
|
||||
|
@ -499,9 +501,9 @@ void nsIOService::OnProcessUnexpectedShutdown(SocketProcessHost *aHost) {
|
|||
RefPtr<MemoryReportingProcess> nsIOService::GetSocketProcessMemoryReporter() {
|
||||
// Check the prefs here again, since we don't want to create
|
||||
// SocketProcessMemoryReporter for some tests.
|
||||
if (!Preferences::GetBool("network.process.enabled") || !SocketProcessReady()) {
|
||||
if (!Preferences::GetBool("network.process.enabled") ||
|
||||
!SocketProcessReady()) {
|
||||
return nullptr;
|
||||
|
||||
}
|
||||
|
||||
return new SocketProcessMemoryReporter();
|
||||
|
|
|
@ -62,8 +62,8 @@ class OfflineObserver final : public nsIObserver {
|
|||
} else if (!strcmp(aTopic, NS_XPCOM_WILL_SHUTDOWN_OBSERVER_ID)) {
|
||||
nsCOMPtr<nsIObserverService> obs =
|
||||
mozilla::services::GetObserverService();
|
||||
obs->RemoveObserver(this, NS_IPC_IOSERVICE_SET_OFFLINE_TOPIC);
|
||||
obs->RemoveObserver(this, NS_XPCOM_WILL_SHUTDOWN_OBSERVER_ID);
|
||||
obs->RemoveObserver(this, NS_IPC_IOSERVICE_SET_OFFLINE_TOPIC);
|
||||
obs->RemoveObserver(this, NS_XPCOM_WILL_SHUTDOWN_OBSERVER_ID);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
|
|
|
@ -15,8 +15,7 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsParser)
|
|||
NS_DEFINE_NAMED_CID(NS_PARSER_CID);
|
||||
|
||||
static const mozilla::Module::CIDEntry kParserCIDs[] = {
|
||||
{&kNS_PARSER_CID, false, nullptr, nsParserConstructor},
|
||||
{nullptr}};
|
||||
{&kNS_PARSER_CID, false, nullptr, nsParserConstructor}, {nullptr}};
|
||||
|
||||
static nsresult Initialize() {
|
||||
nsresult rv = nsHTMLTags::AddRefTable();
|
||||
|
|
|
@ -603,8 +603,10 @@ nsresult Connection::initialize() {
|
|||
}
|
||||
|
||||
#ifdef MOZ_SQLITE_FTS3_TOKENIZER
|
||||
srv = ::sqlite3_db_config(mDBConn, SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER, 1, 0);
|
||||
MOZ_ASSERT(srv == SQLITE_OK, "SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER should be enabled");
|
||||
srv =
|
||||
::sqlite3_db_config(mDBConn, SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER, 1, 0);
|
||||
MOZ_ASSERT(srv == SQLITE_OK,
|
||||
"SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER should be enabled");
|
||||
#endif
|
||||
|
||||
// Do not set mDatabaseFile or mFileURL here since this is a "memory"
|
||||
|
@ -642,8 +644,10 @@ nsresult Connection::initialize(nsIFile *aDatabaseFile) {
|
|||
}
|
||||
|
||||
#ifdef MOZ_SQLITE_FTS3_TOKENIZER
|
||||
srv = ::sqlite3_db_config(mDBConn, SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER, 1, 0);
|
||||
MOZ_ASSERT(srv == SQLITE_OK, "SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER should be enabled");
|
||||
srv =
|
||||
::sqlite3_db_config(mDBConn, SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER, 1, 0);
|
||||
MOZ_ASSERT(srv == SQLITE_OK,
|
||||
"SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER should be enabled");
|
||||
#endif
|
||||
|
||||
// Do not set mFileURL here since this is database does not have an associated
|
||||
|
@ -676,8 +680,10 @@ nsresult Connection::initialize(nsIFileURL *aFileURL) {
|
|||
}
|
||||
|
||||
#ifdef MOZ_SQLITE_FTS3_TOKENIZER
|
||||
srv = ::sqlite3_db_config(mDBConn, SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER, 1, 0);
|
||||
MOZ_ASSERT(srv == SQLITE_OK, "SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER should be enabled");
|
||||
srv =
|
||||
::sqlite3_db_config(mDBConn, SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER, 1, 0);
|
||||
MOZ_ASSERT(srv == SQLITE_OK,
|
||||
"SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER should be enabled");
|
||||
#endif
|
||||
|
||||
// Set both mDatabaseFile and mFileURL here.
|
||||
|
|
|
@ -483,7 +483,8 @@ static const char* const kBinaryFileExtensions[] = {
|
|||
".com", // Windows executable
|
||||
".command", // Mac script
|
||||
".cpgz", // Mac archive
|
||||
".cpi", // Control Panel Item. Executable used for adding icons to Control Panel
|
||||
".cpi", // Control Panel Item. Executable used for adding icons
|
||||
// to Control Panel
|
||||
//".cpio",
|
||||
".cpl", // Windows executable
|
||||
".crt", // Windows signed certificate
|
||||
|
|
|
@ -279,7 +279,6 @@ class SelectionStyleProvider final {
|
|||
// formatting of floating-point values.
|
||||
style.AppendFloat(alpha);
|
||||
style.AppendPrintf(");");
|
||||
|
||||
}
|
||||
nscolor selectionBackgroundColor;
|
||||
if (NS_SUCCEEDED(
|
||||
|
|
|
@ -115,13 +115,16 @@ void nsSound::PurgeLastSound() {
|
|||
// Halt any currently playing sound.
|
||||
if (mSoundPlayer) {
|
||||
if (mPlayerThread) {
|
||||
mPlayerThread->Dispatch(NS_NewRunnableFunction(
|
||||
"nsSound::PurgeLastSound", [player = std::move(mSoundPlayer)]() {
|
||||
// Capture move mSoundPlayer to lambda then
|
||||
// PlaySoundW(nullptr, nullptr, SND_PURGE) will be called before
|
||||
// freeing the nsSoundPlayer.
|
||||
::PlaySoundW(nullptr, nullptr, SND_PURGE);
|
||||
}), NS_DISPATCH_NORMAL);
|
||||
mPlayerThread->Dispatch(
|
||||
NS_NewRunnableFunction("nsSound::PurgeLastSound",
|
||||
[player = std::move(mSoundPlayer)]() {
|
||||
// Capture move mSoundPlayer to lambda then
|
||||
// PlaySoundW(nullptr, nullptr, SND_PURGE)
|
||||
// will be called before freeing the
|
||||
// nsSoundPlayer.
|
||||
::PlaySoundW(nullptr, nullptr, SND_PURGE);
|
||||
}),
|
||||
NS_DISPATCH_NORMAL);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -374,8 +374,7 @@ enum GeckoProcessType {
|
|||
};
|
||||
|
||||
static const char* const kGeckoProcessTypeString[] = {
|
||||
#define GECKO_PROCESS_TYPE(enum_name, string_name, xre_name) \
|
||||
string_name,
|
||||
#define GECKO_PROCESS_TYPE(enum_name, string_name, xre_name) string_name,
|
||||
#include "mozilla/GeckoProcessTypes.h"
|
||||
#undef GECKO_PROCESS_TYPE
|
||||
};
|
||||
|
|
|
@ -729,7 +729,8 @@ already_AddRefed<nsTimerImpl> TimerThread::PostTimerEvent(
|
|||
if (!p) {
|
||||
return timer.forget();
|
||||
}
|
||||
RefPtr<nsTimerEvent> event = ::new (KnownNotNull, p) nsTimerEvent(timer.forget());
|
||||
RefPtr<nsTimerEvent> event =
|
||||
::new (KnownNotNull, p) nsTimerEvent(timer.forget());
|
||||
|
||||
nsresult rv;
|
||||
{
|
||||
|
|
Загрузка…
Ссылка в новой задаче