mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-18 04:44:17 +00:00
Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset Differential Revision: https://phabricator.services.mozilla.com/D30883 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
a1552ab73e
commit
d57d4905f1
@ -338,7 +338,8 @@ uint64_t HTMLTextFieldAccessible::NativeState() const {
|
|||||||
return state | states::SUPPORTS_AUTOCOMPLETION | states::HASPOPUP;
|
return state | states::SUPPORTS_AUTOCOMPLETION | states::HASPOPUP;
|
||||||
|
|
||||||
// Ordinal XUL textboxes don't support autocomplete.
|
// Ordinal XUL textboxes don't support autocomplete.
|
||||||
if (!BindingOrWidgetParent() && Preferences::GetBool("browser.formfill.enable")) {
|
if (!BindingOrWidgetParent() &&
|
||||||
|
Preferences::GetBool("browser.formfill.enable")) {
|
||||||
// Check to see if autocompletion is allowed on this input. We don't expose
|
// Check to see if autocompletion is allowed on this input. We don't expose
|
||||||
// it for password fields even though the entire password can be remembered
|
// it for password fields even though the entire password can be remembered
|
||||||
// for a page if the user asks it to be. However, the kind of autocomplete
|
// for a page if the user asks it to be. However, the kind of autocomplete
|
||||||
|
@ -102,7 +102,7 @@ class HTMLTextFieldAccessible final : public HyperTextAccessibleWrap {
|
|||||||
* HTML:input@type="number".
|
* HTML:input@type="number".
|
||||||
*/
|
*/
|
||||||
nsIContent* BindingOrWidgetParent() const {
|
nsIContent* BindingOrWidgetParent() const {
|
||||||
nsIContent * el = mContent->GetBindingParent();
|
nsIContent* el = mContent->GetBindingParent();
|
||||||
if (el) {
|
if (el) {
|
||||||
return el;
|
return el;
|
||||||
}
|
}
|
||||||
|
@ -176,11 +176,11 @@ static mozilla::Maybe<bool> RunAsLauncherProcess(int& argc, wchar_t** argv) {
|
|||||||
bool runAsLauncher = DoLauncherProcessChecks(argc, argv);
|
bool runAsLauncher = DoLauncherProcessChecks(argc, argv);
|
||||||
|
|
||||||
#if defined(MOZ_LAUNCHER_PROCESS)
|
#if defined(MOZ_LAUNCHER_PROCESS)
|
||||||
bool forceLauncher = runAsLauncher &&
|
bool forceLauncher =
|
||||||
|
runAsLauncher &&
|
||||||
mozilla::CheckArg(argc, argv, L"force-launcher",
|
mozilla::CheckArg(argc, argv, L"force-launcher",
|
||||||
static_cast<const wchar_t**>(nullptr),
|
static_cast<const wchar_t**>(nullptr),
|
||||||
mozilla::CheckArgFlag::RemoveArg) ==
|
mozilla::CheckArgFlag::RemoveArg) == mozilla::ARG_FOUND;
|
||||||
mozilla::ARG_FOUND;
|
|
||||||
|
|
||||||
mozilla::LauncherRegistryInfo::ProcessType desiredType =
|
mozilla::LauncherRegistryInfo::ProcessType desiredType =
|
||||||
runAsLauncher ? mozilla::LauncherRegistryInfo::ProcessType::Launcher
|
runAsLauncher ? mozilla::LauncherRegistryInfo::ProcessType::Launcher
|
||||||
|
@ -49,8 +49,7 @@ NS_IMPL_CI_INTERFACE_GETTER(ContentPrincipal, nsIPrincipal, nsISerializable)
|
|||||||
|
|
||||||
ContentPrincipal::ContentPrincipal() : BasePrincipal(eCodebasePrincipal) {}
|
ContentPrincipal::ContentPrincipal() : BasePrincipal(eCodebasePrincipal) {}
|
||||||
|
|
||||||
ContentPrincipal::~ContentPrincipal() {
|
ContentPrincipal::~ContentPrincipal() {}
|
||||||
}
|
|
||||||
|
|
||||||
nsresult ContentPrincipal::Init(nsIURI* aCodebase,
|
nsresult ContentPrincipal::Init(nsIURI* aCodebase,
|
||||||
const OriginAttributes& aOriginAttributes,
|
const OriginAttributes& aOriginAttributes,
|
||||||
|
@ -810,8 +810,8 @@ void BrowsingContext::Transaction::Apply(BrowsingContext* aBrowsingContext,
|
|||||||
}
|
}
|
||||||
|
|
||||||
BrowsingContext::IPCInitializer BrowsingContext::GetIPCInitializer() {
|
BrowsingContext::IPCInitializer BrowsingContext::GetIPCInitializer() {
|
||||||
MOZ_ASSERT(
|
MOZ_ASSERT(!mozilla::Preferences::GetBool(
|
||||||
!mozilla::Preferences::GetBool("fission.preserve_browsing_contexts", false) ||
|
"fission.preserve_browsing_contexts", false) ||
|
||||||
IsContent());
|
IsContent());
|
||||||
|
|
||||||
IPCInitializer init;
|
IPCInitializer init;
|
||||||
|
@ -280,7 +280,7 @@ void ResizeObserverEntry::SetContentRectAndSize(const nsSize& aSize) {
|
|||||||
nsIFrame* frame = mTarget->GetPrimaryFrame();
|
nsIFrame* frame = mTarget->GetPrimaryFrame();
|
||||||
|
|
||||||
// 1. Update mContentRect.
|
// 1. Update mContentRect.
|
||||||
nsMargin padding = frame ? frame->GetUsedPadding(): nsMargin();
|
nsMargin padding = frame ? frame->GetUsedPadding() : nsMargin();
|
||||||
// Per the spec, we need to use the top-left padding offset as the origin of
|
// Per the spec, we need to use the top-left padding offset as the origin of
|
||||||
// our contentRect.
|
// our contentRect.
|
||||||
nsRect rect(nsPoint(padding.left, padding.top), aSize);
|
nsRect rect(nsPoint(padding.left, padding.top), aSize);
|
||||||
|
@ -59,7 +59,8 @@ void ResizeObserverNotificationHelper::Unregister() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
nsRefreshDriver* refreshDriver = GetRefreshDriver();
|
nsRefreshDriver* refreshDriver = GetRefreshDriver();
|
||||||
MOZ_RELEASE_ASSERT(refreshDriver,
|
MOZ_RELEASE_ASSERT(
|
||||||
|
refreshDriver,
|
||||||
"We should not leave a dangling reference to the observer around");
|
"We should not leave a dangling reference to the observer around");
|
||||||
|
|
||||||
bool rv = refreshDriver->RemoveRefreshObserver(this, FlushType::Display);
|
bool rv = refreshDriver->RemoveRefreshObserver(this, FlushType::Display);
|
||||||
|
@ -15,7 +15,8 @@ namespace dom {
|
|||||||
SerializedStackHolder::SerializedStackHolder()
|
SerializedStackHolder::SerializedStackHolder()
|
||||||
: mHolder(StructuredCloneHolder::CloningSupported,
|
: mHolder(StructuredCloneHolder::CloningSupported,
|
||||||
StructuredCloneHolder::TransferringNotSupported,
|
StructuredCloneHolder::TransferringNotSupported,
|
||||||
StructuredCloneHolder::StructuredCloneScope::SameProcessDifferentThread) {}
|
StructuredCloneHolder::StructuredCloneScope::
|
||||||
|
SameProcessDifferentThread) {}
|
||||||
|
|
||||||
void SerializedStackHolder::WriteStack(JSContext* aCx,
|
void SerializedStackHolder::WriteStack(JSContext* aCx,
|
||||||
JS::HandleObject aStack) {
|
JS::HandleObject aStack) {
|
||||||
@ -37,8 +38,8 @@ void SerializedStackHolder::SerializeWorkerStack(JSContext* aCx,
|
|||||||
JS::HandleObject aStack) {
|
JS::HandleObject aStack) {
|
||||||
MOZ_ASSERT(aWorkerPrivate->IsOnCurrentThread());
|
MOZ_ASSERT(aWorkerPrivate->IsOnCurrentThread());
|
||||||
|
|
||||||
RefPtr<StrongWorkerRef> workerRef = StrongWorkerRef::Create(
|
RefPtr<StrongWorkerRef> workerRef =
|
||||||
aWorkerPrivate, "WorkerErrorReport");
|
StrongWorkerRef::Create(aWorkerPrivate, "WorkerErrorReport");
|
||||||
if (workerRef) {
|
if (workerRef) {
|
||||||
mWorkerRef = new ThreadSafeWorkerRef(workerRef);
|
mWorkerRef = new ThreadSafeWorkerRef(workerRef);
|
||||||
} else {
|
} else {
|
||||||
@ -78,8 +79,7 @@ JSObject* SerializedStackHolder::ReadStack(JSContext* aCx) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
JS::RootedValue stackValue(aCx);
|
JS::RootedValue stackValue(aCx);
|
||||||
mHolder.Read(xpc::CurrentNativeGlobal(aCx), aCx, &stackValue,
|
mHolder.Read(xpc::CurrentNativeGlobal(aCx), aCx, &stackValue, IgnoreErrors());
|
||||||
IgnoreErrors());
|
|
||||||
return stackValue.isObject() ? &stackValue.toObject() : nullptr;
|
return stackValue.isObject() ? &stackValue.toObject() : nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -92,8 +92,8 @@ UniquePtr<SerializedStackHolder> GetCurrentStackForNetMonitor(JSContext* aCx) {
|
|||||||
return stack;
|
return stack;
|
||||||
}
|
}
|
||||||
|
|
||||||
void NotifyNetworkMonitorAlternateStack(nsISupports* aChannel,
|
void NotifyNetworkMonitorAlternateStack(
|
||||||
UniquePtr<SerializedStackHolder> aStackHolder) {
|
nsISupports* aChannel, UniquePtr<SerializedStackHolder> aStackHolder) {
|
||||||
if (!aStackHolder) {
|
if (!aStackHolder) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -121,8 +121,8 @@ void ConvertSerializedStackToJSON(UniquePtr<SerializedStackHolder> aStackHolder,
|
|||||||
}
|
}
|
||||||
|
|
||||||
JS::RootedObject converted(cx);
|
JS::RootedObject converted(cx);
|
||||||
converted = JS::ConvertSavedFrameToPlainObject(cx, savedFrame,
|
converted = JS::ConvertSavedFrameToPlainObject(
|
||||||
JS::SavedFrameSelfHosted::Exclude);
|
cx, savedFrame, JS::SavedFrameSelfHosted::Exclude);
|
||||||
if (!converted) {
|
if (!converted) {
|
||||||
JS_ClearPendingException(cx);
|
JS_ClearPendingException(cx);
|
||||||
return;
|
return;
|
||||||
|
@ -59,8 +59,8 @@ UniquePtr<SerializedStackHolder> GetCurrentStackForNetMonitor(JSContext* aCx);
|
|||||||
// thread. This call is synchronous, and aChannel and aStackHolder will not be
|
// thread. This call is synchronous, and aChannel and aStackHolder will not be
|
||||||
// used afterward. aChannel is an nsISupports object because this can be used
|
// used afterward. aChannel is an nsISupports object because this can be used
|
||||||
// with either nsIChannel or nsIWebSocketChannel.
|
// with either nsIChannel or nsIWebSocketChannel.
|
||||||
void NotifyNetworkMonitorAlternateStack(nsISupports* aChannel,
|
void NotifyNetworkMonitorAlternateStack(
|
||||||
UniquePtr<SerializedStackHolder> aStackHolder);
|
nsISupports* aChannel, UniquePtr<SerializedStackHolder> aStackHolder);
|
||||||
|
|
||||||
// Read back the saved frame stack and store it in a string as JSON.
|
// Read back the saved frame stack and store it in a string as JSON.
|
||||||
// This must be called on the main thread.
|
// This must be called on the main thread.
|
||||||
|
@ -81,13 +81,11 @@ void TabGroup::EnsureThrottledEventQueues() {
|
|||||||
for (size_t i = 0; i < size_t(TaskCategory::Count); i++) {
|
for (size_t i = 0; i < size_t(TaskCategory::Count); i++) {
|
||||||
TaskCategory category = static_cast<TaskCategory>(i);
|
TaskCategory category = static_cast<TaskCategory>(i);
|
||||||
if (category == TaskCategory::Worker) {
|
if (category == TaskCategory::Worker) {
|
||||||
mEventTargets[i] =
|
mEventTargets[i] = ThrottledEventQueue::Create(mEventTargets[i],
|
||||||
ThrottledEventQueue::Create(mEventTargets[i],
|
|
||||||
"TabGroup worker queue");
|
"TabGroup worker queue");
|
||||||
} else if (category == TaskCategory::Timer) {
|
} else if (category == TaskCategory::Timer) {
|
||||||
mEventTargets[i] =
|
mEventTargets[i] =
|
||||||
ThrottledEventQueue::Create(mEventTargets[i],
|
ThrottledEventQueue::Create(mEventTargets[i], "TabGroup timer queue");
|
||||||
"TabGroup timer queue");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4180,10 +4180,9 @@ void nsContentUtils::RequestFrameFocus(Element& aFrameElement, bool aCanRaise) {
|
|||||||
RefPtr<Element> target = &aFrameElement;
|
RefPtr<Element> target = &aFrameElement;
|
||||||
bool defaultAction = true;
|
bool defaultAction = true;
|
||||||
if (aCanRaise) {
|
if (aCanRaise) {
|
||||||
DispatchEventOnlyToChrome(target->OwnerDoc(), target,
|
DispatchEventOnlyToChrome(
|
||||||
NS_LITERAL_STRING("framefocusrequested"),
|
target->OwnerDoc(), target, NS_LITERAL_STRING("framefocusrequested"),
|
||||||
CanBubble::eYes, Cancelable::eYes,
|
CanBubble::eYes, Cancelable::eYes, &defaultAction);
|
||||||
&defaultAction);
|
|
||||||
}
|
}
|
||||||
if (!defaultAction) {
|
if (!defaultAction) {
|
||||||
return;
|
return;
|
||||||
|
@ -142,7 +142,9 @@ mozilla::dom::Nullable<uint16_t> nsDOMDataChannel::GetMaxRetransmits() const {
|
|||||||
return mDataChannel->GetMaxRetransmits();
|
return mDataChannel->GetMaxRetransmits();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool nsDOMDataChannel::Negotiated() const { return mDataChannel->GetNegotiated(); }
|
bool nsDOMDataChannel::Negotiated() const {
|
||||||
|
return mDataChannel->GetNegotiated();
|
||||||
|
}
|
||||||
|
|
||||||
bool nsDOMDataChannel::Ordered() const { return mDataChannel->GetOrdered(); }
|
bool nsDOMDataChannel::Ordered() const { return mDataChannel->GetOrdered(); }
|
||||||
|
|
||||||
|
@ -617,7 +617,8 @@ nsresult nsDocumentEncoder::SerializeNodeStart(nsINode& aOriginalNode,
|
|||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
Element* originalElement = aOriginalNode.AsElement();
|
Element* originalElement = aOriginalNode.AsElement();
|
||||||
rv = mSerializer->AppendElementStart(node->AsElement(), originalElement, aStr);
|
rv = mSerializer->AppendElementStart(node->AsElement(), originalElement,
|
||||||
|
aStr);
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -47,7 +47,8 @@ void nsFrameLoaderOwner::ChangeRemoteness(
|
|||||||
// Policy, do not preserve the browsing context. Otherwise, save off the
|
// Policy, do not preserve the browsing context. Otherwise, save off the
|
||||||
// browsing context and use it when creating our new FrameLoader.
|
// browsing context and use it when creating our new FrameLoader.
|
||||||
if (!aOptions.mReplaceBrowsingContext && !isChromeRemoteToLocal &&
|
if (!aOptions.mReplaceBrowsingContext && !isChromeRemoteToLocal &&
|
||||||
mozilla::Preferences::GetBool("fission.preserve_browsing_contexts", false)) {
|
mozilla::Preferences::GetBool("fission.preserve_browsing_contexts",
|
||||||
|
false)) {
|
||||||
bc = mFrameLoader->GetBrowsingContext();
|
bc = mFrameLoader->GetBrowsingContext();
|
||||||
mFrameLoader->SkipBrowsingContextDetach();
|
mFrameLoader->SkipBrowsingContextDetach();
|
||||||
}
|
}
|
||||||
|
@ -231,9 +231,7 @@ class nsGlobalWindowOuter final : public mozilla::dom::EventTarget,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// nsIGlobalJSObjectHolder
|
// nsIGlobalJSObjectHolder
|
||||||
JSObject* GetGlobalJSObject() final {
|
JSObject* GetGlobalJSObject() final { return GetWrapper(); }
|
||||||
return GetWrapper();
|
|
||||||
}
|
|
||||||
JSObject* GetGlobalJSObjectPreserveColor() const final {
|
JSObject* GetGlobalJSObjectPreserveColor() const final {
|
||||||
return GetWrapperPreserveColor();
|
return GetWrapperPreserveColor();
|
||||||
}
|
}
|
||||||
|
@ -134,8 +134,8 @@ void WebGLShader::CompileShader() {
|
|||||||
PrintLongString(mCleanSource.BeginReading(), mCleanSource.Length());
|
PrintLongString(mCleanSource.BeginReading(), mCleanSource.Length());
|
||||||
}
|
}
|
||||||
|
|
||||||
const bool success = Translate(mCleanSource, mValidator.get(), &mValidationLog,
|
const bool success = Translate(mCleanSource, mValidator.get(),
|
||||||
&mTranslatedSource);
|
&mValidationLog, &mTranslatedSource);
|
||||||
|
|
||||||
if (MOZ_UNLIKELY(kDumpShaders)) {
|
if (MOZ_UNLIKELY(kDumpShaders)) {
|
||||||
printf_stderr("\n==== \\/ \\/ \\/ ====\n");
|
printf_stderr("\n==== \\/ \\/ \\/ ====\n");
|
||||||
|
@ -16,9 +16,10 @@ namespace mozilla {
|
|||||||
namespace webgl {
|
namespace webgl {
|
||||||
|
|
||||||
class ShaderValidator final {
|
class ShaderValidator final {
|
||||||
public:
|
public:
|
||||||
const ShHandle mHandle;
|
const ShHandle mHandle;
|
||||||
private:
|
|
||||||
|
private:
|
||||||
const ShCompileOptions mCompileOptions;
|
const ShCompileOptions mCompileOptions;
|
||||||
const int mMaxVaryingVectors;
|
const int mMaxVaryingVectors;
|
||||||
bool mHasRun;
|
bool mHasRun;
|
||||||
|
@ -518,8 +518,8 @@ void PointerEventHandler::DispatchPointerFromMouseOrTouch(
|
|||||||
break;
|
break;
|
||||||
case eMouseDown:
|
case eMouseDown:
|
||||||
pointerMessage =
|
pointerMessage =
|
||||||
mouseEvent->mButtons &
|
mouseEvent->mButtons & ~nsContentUtils::GetButtonsFlagForButton(
|
||||||
~nsContentUtils::GetButtonsFlagForButton(mouseEvent->mButton)
|
mouseEvent->mButton)
|
||||||
? ePointerMove
|
? ePointerMove
|
||||||
: ePointerDown;
|
: ePointerDown;
|
||||||
break;
|
break;
|
||||||
|
@ -55,9 +55,7 @@ class BrowserHost : public RemoteBrowser,
|
|||||||
ContentParent* GetContentParent() const {
|
ContentParent* GetContentParent() const {
|
||||||
return mRoot ? mRoot->Manager() : nullptr;
|
return mRoot ? mRoot->Manager() : nullptr;
|
||||||
}
|
}
|
||||||
TabId GetTabId() const {
|
TabId GetTabId() const { return mId; }
|
||||||
return mId;
|
|
||||||
}
|
|
||||||
|
|
||||||
BrowserHost* AsBrowserHost() override { return this; }
|
BrowserHost* AsBrowserHost() override { return this; }
|
||||||
BrowserBridgeHost* AsBrowserBridgeHost() override { return nullptr; }
|
BrowserBridgeHost* AsBrowserBridgeHost() override { return nullptr; }
|
||||||
|
@ -161,17 +161,17 @@ NS_IMETHODIMP RemoteWebProgressRequest::GetMatchedFullHash(
|
|||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP RemoteWebProgressRequest::SetMatchedTrackingInfo(
|
NS_IMETHODIMP RemoteWebProgressRequest::SetMatchedTrackingInfo(
|
||||||
const nsTArray<nsCString> &aLists, const nsTArray<nsCString> &aFullHashes) {
|
const nsTArray<nsCString>& aLists, const nsTArray<nsCString>& aFullHashes) {
|
||||||
return NS_ERROR_NOT_IMPLEMENTED;
|
return NS_ERROR_NOT_IMPLEMENTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP RemoteWebProgressRequest::GetMatchedTrackingLists(
|
NS_IMETHODIMP RemoteWebProgressRequest::GetMatchedTrackingLists(
|
||||||
nsTArray<nsCString> &aLists) {
|
nsTArray<nsCString>& aLists) {
|
||||||
return NS_ERROR_NOT_IMPLEMENTED;
|
return NS_ERROR_NOT_IMPLEMENTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP RemoteWebProgressRequest::GetMatchedTrackingFullHashes(
|
NS_IMETHODIMP RemoteWebProgressRequest::GetMatchedTrackingFullHashes(
|
||||||
nsTArray<nsCString> &aFullHashes) {
|
nsTArray<nsCString>& aFullHashes) {
|
||||||
return NS_ERROR_NOT_IMPLEMENTED;
|
return NS_ERROR_NOT_IMPLEMENTED;
|
||||||
}
|
}
|
||||||
// nsIRequest methods
|
// nsIRequest methods
|
||||||
|
@ -974,10 +974,14 @@ long AudioCallbackDriver::DataCallback(const AudioDataValue* aInputBuffer,
|
|||||||
|
|
||||||
static const char* StateToString(cubeb_state aState) {
|
static const char* StateToString(cubeb_state aState) {
|
||||||
switch (aState) {
|
switch (aState) {
|
||||||
case CUBEB_STATE_STARTED: return "STARTED";
|
case CUBEB_STATE_STARTED:
|
||||||
case CUBEB_STATE_STOPPED: return "STOPPED";
|
return "STARTED";
|
||||||
case CUBEB_STATE_DRAINED: return "DRAINED";
|
case CUBEB_STATE_STOPPED:
|
||||||
case CUBEB_STATE_ERROR: return "ERROR";
|
return "STOPPED";
|
||||||
|
case CUBEB_STATE_DRAINED:
|
||||||
|
return "DRAINED";
|
||||||
|
case CUBEB_STATE_ERROR:
|
||||||
|
return "ERROR";
|
||||||
default:
|
default:
|
||||||
MOZ_CRASH("Unexpected state!");
|
MOZ_CRASH("Unexpected state!");
|
||||||
}
|
}
|
||||||
@ -985,7 +989,8 @@ static const char* StateToString(cubeb_state aState) {
|
|||||||
|
|
||||||
void AudioCallbackDriver::StateCallback(cubeb_state aState) {
|
void AudioCallbackDriver::StateCallback(cubeb_state aState) {
|
||||||
MOZ_ASSERT(!OnGraphThread());
|
MOZ_ASSERT(!OnGraphThread());
|
||||||
LOG(LogLevel::Debug, ("AudioCallbackDriver State: %s", StateToString(aState)));
|
LOG(LogLevel::Debug,
|
||||||
|
("AudioCallbackDriver State: %s", StateToString(aState)));
|
||||||
|
|
||||||
// Clear the flag for the not running
|
// Clear the flag for the not running
|
||||||
// states: stopped, drained, error.
|
// states: stopped, drained, error.
|
||||||
|
@ -345,8 +345,7 @@ void PDMFactory::CreatePDMs() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (StaticPrefs::MediaRddProcessEnabled()
|
if (StaticPrefs::MediaRddProcessEnabled() && BrowserTabsRemoteAutostart()) {
|
||||||
&& BrowserTabsRemoteAutostart()) {
|
|
||||||
m = new RemoteDecoderModule;
|
m = new RemoteDecoderModule;
|
||||||
StartupPDM(m);
|
StartupPDM(m);
|
||||||
}
|
}
|
||||||
|
@ -26,8 +26,7 @@ bool AgnosticDecoderModule::SupportsMimeType(
|
|||||||
VPXDecoder::IsVPX(aMimeType) || OpusDataDecoder::IsOpus(aMimeType) ||
|
VPXDecoder::IsVPX(aMimeType) || OpusDataDecoder::IsOpus(aMimeType) ||
|
||||||
WaveDataDecoder::IsWave(aMimeType) || TheoraDecoder::IsTheora(aMimeType);
|
WaveDataDecoder::IsWave(aMimeType) || TheoraDecoder::IsTheora(aMimeType);
|
||||||
if (!StaticPrefs::MediaRddVorbisEnabled() ||
|
if (!StaticPrefs::MediaRddVorbisEnabled() ||
|
||||||
!StaticPrefs::MediaRddProcessEnabled() ||
|
!StaticPrefs::MediaRddProcessEnabled() || !BrowserTabsRemoteAutostart()) {
|
||||||
!BrowserTabsRemoteAutostart()) {
|
|
||||||
supports |= VorbisDataDecoder::IsVorbis(aMimeType);
|
supports |= VorbisDataDecoder::IsVorbis(aMimeType);
|
||||||
}
|
}
|
||||||
#ifdef MOZ_AV1
|
#ifdef MOZ_AV1
|
||||||
|
@ -43,8 +43,7 @@ using namespace net;
|
|||||||
|
|
||||||
namespace dom {
|
namespace dom {
|
||||||
|
|
||||||
static void FireInteralError(TCPSocketParent* aActor,
|
static void FireInteralError(TCPSocketParent* aActor, uint32_t aLineNo) {
|
||||||
uint32_t aLineNo) {
|
|
||||||
MOZ_ASSERT(aActor->IPCOpen());
|
MOZ_ASSERT(aActor->IPCOpen());
|
||||||
|
|
||||||
mozilla::Unused << aActor->SendCallback(
|
mozilla::Unused << aActor->SendCallback(
|
||||||
|
@ -66,9 +66,7 @@ struct GCPolicy<nsJSObjWrapper*> {
|
|||||||
(*wrapper)->trace(trc);
|
(*wrapper)->trace(trc);
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool isValid(const nsJSObjWrapper *&wrapper) {
|
static bool isValid(const nsJSObjWrapper*& wrapper) { return true; }
|
||||||
return true;
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
} // namespace JS
|
} // namespace JS
|
||||||
|
|
||||||
|
@ -173,7 +173,8 @@ class QuotaManager final : public BackgroundThreadObject {
|
|||||||
/**
|
/**
|
||||||
* For use when creating an origin directory. It's possible that origin usage
|
* For use when creating an origin directory. It's possible that origin usage
|
||||||
* is already being tracked due to a call to EnsureQuotaForOrigin, and in that
|
* is already being tracked due to a call to EnsureQuotaForOrigin, and in that
|
||||||
* case we need to update the existing OriginInfo rather than create a new one.
|
* case we need to update the existing OriginInfo rather than create a new
|
||||||
|
* one.
|
||||||
*/
|
*/
|
||||||
void NoteOriginDirectoryCreated(PersistenceType aPersistenceType,
|
void NoteOriginDirectoryCreated(PersistenceType aPersistenceType,
|
||||||
const nsACString& aGroup,
|
const nsACString& aGroup,
|
||||||
|
@ -75,8 +75,8 @@ void StorageNotifierService::Broadcast(StorageEvent* aEvent,
|
|||||||
|
|
||||||
// No reasons to continue if the principal of the event doesn't match with
|
// No reasons to continue if the principal of the event doesn't match with
|
||||||
// the window's one.
|
// the window's one.
|
||||||
if (!StorageUtils::PrincipalsEqual(aEvent->GetPrincipal(),
|
if (!StorageUtils::PrincipalsEqual(
|
||||||
observer->GetEffectiveStoragePrincipal())) {
|
aEvent->GetPrincipal(), observer->GetEffectiveStoragePrincipal())) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -165,9 +165,11 @@ class SVGPathData {
|
|||||||
* which is generated by cbindgen from Rust (see ServoStyleConsts.h).
|
* which is generated by cbindgen from Rust (see ServoStyleConsts.h).
|
||||||
* Basically, this is a variant of the above BuildPath() functions.
|
* Basically, this is a variant of the above BuildPath() functions.
|
||||||
*/
|
*/
|
||||||
static already_AddRefed<Path> BuildPath(
|
static already_AddRefed<Path> BuildPath(Span<const StylePathCommand> aPath,
|
||||||
Span<const StylePathCommand> aPath, PathBuilder* aBuilder,
|
PathBuilder* aBuilder,
|
||||||
uint8_t aStrokeLineCap, Float aStrokeWidth, float aZoomFactor = 1.0);
|
uint8_t aStrokeLineCap,
|
||||||
|
Float aStrokeWidth,
|
||||||
|
float aZoomFactor = 1.0);
|
||||||
|
|
||||||
const_iterator begin() const { return mData.Elements(); }
|
const_iterator begin() const { return mData.Elements(); }
|
||||||
const_iterator end() const { return mData.Elements() + mData.Length(); }
|
const_iterator end() const { return mData.Elements() + mData.Length(); }
|
||||||
|
@ -1649,8 +1649,8 @@ nsresult WebSocketImpl::Init(JSContext* aCx, nsIPrincipal* aLoadingPrincipal,
|
|||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
nsresult WebSocketImpl::AsyncOpen(nsIPrincipal* aPrincipal,
|
nsresult WebSocketImpl::AsyncOpen(
|
||||||
uint64_t aInnerWindowID,
|
nsIPrincipal* aPrincipal, uint64_t aInnerWindowID,
|
||||||
nsITransportProvider* aTransportProvider,
|
nsITransportProvider* aTransportProvider,
|
||||||
const nsACString& aNegotiatedExtensions,
|
const nsACString& aNegotiatedExtensions,
|
||||||
UniquePtr<SerializedStackHolder> aOriginStack) {
|
UniquePtr<SerializedStackHolder> aOriginStack) {
|
||||||
|
@ -844,8 +844,7 @@ class ScriptLoaderRunnable final : public nsIRunnable, public nsINamed {
|
|||||||
// thread) explicitly, so that we can use the stack to notify the net
|
// thread) explicitly, so that we can use the stack to notify the net
|
||||||
// monitor about every script we load.
|
// monitor about every script we load.
|
||||||
if (mOriginStack) {
|
if (mOriginStack) {
|
||||||
ConvertSerializedStackToJSON(std::move(mOriginStack),
|
ConvertSerializedStackToJSON(std::move(mOriginStack), mOriginStackJSON);
|
||||||
mOriginStackJSON);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!mWorkerPrivate->IsServiceWorker() || IsDebuggerScript()) {
|
if (!mWorkerPrivate->IsServiceWorker() || IsDebuggerScript()) {
|
||||||
@ -2125,8 +2124,8 @@ void LoadAllScripts(WorkerPrivate* aWorkerPrivate,
|
|||||||
}
|
}
|
||||||
|
|
||||||
RefPtr<ScriptLoaderRunnable> loader = new ScriptLoaderRunnable(
|
RefPtr<ScriptLoaderRunnable> loader = new ScriptLoaderRunnable(
|
||||||
aWorkerPrivate, std::move(aOriginStack), syncLoopTarget, aLoadInfos, clientInfo,
|
aWorkerPrivate, std::move(aOriginStack), syncLoopTarget, aLoadInfos,
|
||||||
controller, aIsMainScript, aWorkerScriptType, aRv);
|
clientInfo, controller, aIsMainScript, aWorkerScriptType, aRv);
|
||||||
|
|
||||||
NS_ASSERTION(aLoadInfos.IsEmpty(), "Should have swapped!");
|
NS_ASSERTION(aLoadInfos.IsEmpty(), "Should have swapped!");
|
||||||
|
|
||||||
|
@ -310,7 +310,8 @@ class CompileScriptRunnable final : public WorkerDebuggeeRunnable {
|
|||||||
UniquePtr<SerializedStackHolder> aOriginStack,
|
UniquePtr<SerializedStackHolder> aOriginStack,
|
||||||
const nsAString& aScriptURL)
|
const nsAString& aScriptURL)
|
||||||
: WorkerDebuggeeRunnable(aWorkerPrivate, WorkerThreadModifyBusyCount),
|
: WorkerDebuggeeRunnable(aWorkerPrivate, WorkerThreadModifyBusyCount),
|
||||||
mScriptURL(aScriptURL), mOriginStack(aOriginStack.release()) {}
|
mScriptURL(aScriptURL),
|
||||||
|
mOriginStack(aOriginStack.release()) {}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// We can't implement PreRun effectively, because at the point when that would
|
// We can't implement PreRun effectively, because at the point when that would
|
||||||
@ -2178,9 +2179,8 @@ WorkerPrivate::WorkerPrivate(WorkerPrivate* aParent,
|
|||||||
mMainThreadEventTargetForMessaging =
|
mMainThreadEventTargetForMessaging =
|
||||||
ThrottledEventQueue::Create(target, "Worker queue for messaging");
|
ThrottledEventQueue::Create(target, "Worker queue for messaging");
|
||||||
if (StaticPrefs::dom_worker_use_medium_high_event_queue()) {
|
if (StaticPrefs::dom_worker_use_medium_high_event_queue()) {
|
||||||
mMainThreadEventTarget =
|
mMainThreadEventTarget = ThrottledEventQueue::Create(
|
||||||
ThrottledEventQueue::Create(GetMainThreadSerialEventTarget(),
|
GetMainThreadSerialEventTarget(), "Worker queue",
|
||||||
"Worker queue",
|
|
||||||
nsIRunnablePriority::PRIORITY_MEDIUMHIGH);
|
nsIRunnablePriority::PRIORITY_MEDIUMHIGH);
|
||||||
} else {
|
} else {
|
||||||
mMainThreadEventTarget = mMainThreadEventTargetForMessaging;
|
mMainThreadEventTarget = mMainThreadEventTargetForMessaging;
|
||||||
|
@ -766,9 +766,7 @@ class WorkerPrivate : public RelativeTimeline {
|
|||||||
return mLoadInfo.mServiceWorkersTestingInWindow;
|
return mLoadInfo.mServiceWorkersTestingInWindow;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool IsWatchedByDevtools() const {
|
bool IsWatchedByDevtools() const { return mLoadInfo.mWatchedByDevtools; }
|
||||||
return mLoadInfo.mWatchedByDevtools;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Determine if the worker is currently loading its top level script.
|
// Determine if the worker is currently loading its top level script.
|
||||||
bool IsLoadingWorkerScript() const { return mLoadingWorkerScript; }
|
bool IsLoadingWorkerScript() const { return mLoadingWorkerScript; }
|
||||||
|
@ -141,9 +141,7 @@ static void NotifySubdocumentInvalidation(
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void SetChildrenChangedRecursive(Layer* aLayer) {
|
static void SetChildrenChangedRecursive(Layer* aLayer) {
|
||||||
ForEachNode<ForwardIterator>(
|
ForEachNode<ForwardIterator>(aLayer, [](Layer* layer) {
|
||||||
aLayer,
|
|
||||||
[](Layer* layer) {
|
|
||||||
ContainerLayer* container = layer->AsContainerLayer();
|
ContainerLayer* container = layer->AsContainerLayer();
|
||||||
if (container) {
|
if (container) {
|
||||||
container->SetChildrenChanged(true);
|
container->SetChildrenChanged(true);
|
||||||
|
@ -590,6 +590,7 @@ class APZCTreeManager : public IAPZCTreeManager, public APZInputBridge {
|
|||||||
|
|
||||||
// Also used for controlling time during tests
|
// Also used for controlling time during tests
|
||||||
void SetTestSampleTime(const Maybe<TimeStamp>& aTime);
|
void SetTestSampleTime(const Maybe<TimeStamp>& aTime);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Maybe<TimeStamp> mTestSampleTime;
|
Maybe<TimeStamp> mTestSampleTime;
|
||||||
|
|
||||||
|
@ -666,8 +666,7 @@ static bool PrepareForSetTargetAPZCNotification(
|
|||||||
nsIWidget* aWidget, const LayersId& aLayersId, nsIFrame* aRootFrame,
|
nsIWidget* aWidget, const LayersId& aLayersId, nsIFrame* aRootFrame,
|
||||||
const LayoutDeviceIntPoint& aRefPoint,
|
const LayoutDeviceIntPoint& aRefPoint,
|
||||||
nsTArray<SLGuidAndRenderRoot>* aTargets) {
|
nsTArray<SLGuidAndRenderRoot>* aTargets) {
|
||||||
SLGuidAndRenderRoot guid(aLayersId, 0,
|
SLGuidAndRenderRoot guid(aLayersId, 0, ScrollableLayerGuid::NULL_SCROLL_ID,
|
||||||
ScrollableLayerGuid::NULL_SCROLL_ID,
|
|
||||||
wr::RenderRoot::Default);
|
wr::RenderRoot::Default);
|
||||||
nsPoint point = nsLayoutUtils::GetEventCoordinatesRelativeTo(
|
nsPoint point = nsLayoutUtils::GetEventCoordinatesRelativeTo(
|
||||||
aWidget, aRefPoint, aRootFrame);
|
aWidget, aRefPoint, aRootFrame);
|
||||||
@ -818,9 +817,11 @@ void DisplayportSetListener::DidRefresh() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
UniquePtr<DisplayportSetListener>
|
UniquePtr<DisplayportSetListener>
|
||||||
APZCCallbackHelper::SendSetTargetAPZCNotification(
|
APZCCallbackHelper::SendSetTargetAPZCNotification(nsIWidget* aWidget,
|
||||||
nsIWidget* aWidget, dom::Document* aDocument, const WidgetGUIEvent& aEvent,
|
dom::Document* aDocument,
|
||||||
const LayersId& aLayersId, uint64_t aInputBlockId) {
|
const WidgetGUIEvent& aEvent,
|
||||||
|
const LayersId& aLayersId,
|
||||||
|
uint64_t aInputBlockId) {
|
||||||
if (!aWidget || !aDocument) {
|
if (!aWidget || !aDocument) {
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
@ -176,8 +176,8 @@ void APZEventState::ProcessSingleTap(const CSSPoint& aPoint,
|
|||||||
const CSSToLayoutDeviceScale& aScale,
|
const CSSToLayoutDeviceScale& aScale,
|
||||||
Modifiers aModifiers,
|
Modifiers aModifiers,
|
||||||
int32_t aClickCount) {
|
int32_t aClickCount) {
|
||||||
APZES_LOG("Handling single tap at %s with %d\n",
|
APZES_LOG("Handling single tap at %s with %d\n", Stringify(aPoint).c_str(),
|
||||||
Stringify(aPoint).c_str(), mTouchEndCancelled);
|
mTouchEndCancelled);
|
||||||
|
|
||||||
RefPtr<nsIContent> touchRollup = GetTouchRollup();
|
RefPtr<nsIContent> touchRollup = GetTouchRollup();
|
||||||
mTouchRollup = nullptr;
|
mTouchRollup = nullptr;
|
||||||
|
@ -225,7 +225,6 @@ BasicCompositor::BasicCompositor(CompositorBridgeParent* aParent,
|
|||||||
mMaxTextureSize =
|
mMaxTextureSize =
|
||||||
std::min(Factory::GetMaxSurfaceSize(gfxVars::ContentBackend()),
|
std::min(Factory::GetMaxSurfaceSize(gfxVars::ContentBackend()),
|
||||||
Factory::GetMaxSurfaceSize(BackendType::CAIRO));
|
Factory::GetMaxSurfaceSize(BackendType::CAIRO));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
BasicCompositor::~BasicCompositor() { MOZ_COUNT_DTOR(BasicCompositor); }
|
BasicCompositor::~BasicCompositor() { MOZ_COUNT_DTOR(BasicCompositor); }
|
||||||
|
@ -451,7 +451,8 @@ CompositorD3D11::CreateRenderTargetFromSource(
|
|||||||
|
|
||||||
bool CompositorD3D11::ShouldAllowFrameRecording() const {
|
bool CompositorD3D11::ShouldAllowFrameRecording() const {
|
||||||
#ifdef MOZ_GECKO_PROFILER
|
#ifdef MOZ_GECKO_PROFILER
|
||||||
return mAllowFrameRecording || profiler_feature_active(ProfilerFeature::Screenshots);
|
return mAllowFrameRecording ||
|
||||||
|
profiler_feature_active(ProfilerFeature::Screenshots);
|
||||||
#else
|
#else
|
||||||
return mAllowFrameRecording;
|
return mAllowFrameRecording;
|
||||||
#endif
|
#endif
|
||||||
|
@ -485,8 +485,8 @@ void WebRenderLayerManager::MakeSnapshotIfRequired(LayoutDeviceIntSize aSize) {
|
|||||||
SurfaceFormat::B8G8R8A8;
|
SurfaceFormat::B8G8R8A8;
|
||||||
#endif
|
#endif
|
||||||
RefPtr<TextureClient> texture = TextureClient::CreateForRawBufferAccess(
|
RefPtr<TextureClient> texture = TextureClient::CreateForRawBufferAccess(
|
||||||
WrBridge(), format, aSize.ToUnknownSize(),
|
WrBridge(), format, aSize.ToUnknownSize(), BackendType::SKIA,
|
||||||
BackendType::SKIA, TextureFlags::SNAPSHOT);
|
TextureFlags::SNAPSHOT);
|
||||||
if (!texture) {
|
if (!texture) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -112,7 +112,7 @@ void Family::AddFaces(FontList* aList, const nsTArray<Face::InitData>& aFaces) {
|
|||||||
// of the full CSS font-matching algorithm) if there is at maximum one normal,
|
// of the full CSS font-matching algorithm) if there is at maximum one normal,
|
||||||
// bold, italic, and bold-italic face; in this case, they are stored at known
|
// bold, italic, and bold-italic face; in this case, they are stored at known
|
||||||
// positions in the mFaces array.
|
// positions in the mFaces array.
|
||||||
const Face::InitData* slots[4] = { nullptr, nullptr, nullptr, nullptr };
|
const Face::InitData* slots[4] = {nullptr, nullptr, nullptr, nullptr};
|
||||||
if (count >= 2 && count <= 4) {
|
if (count >= 2 && count <= 4) {
|
||||||
// Check if this can be treated as a "simple" family
|
// Check if this can be treated as a "simple" family
|
||||||
isSimple = true;
|
isSimple = true;
|
||||||
@ -332,8 +332,9 @@ void Family::SearchAllFontsForChar(FontList* aList,
|
|||||||
// already checked character coverage, do it now (note that
|
// already checked character coverage, do it now (note that
|
||||||
// HasCharacter() will trigger loading the fontEntry's cmap, if
|
// HasCharacter() will trigger loading the fontEntry's cmap, if
|
||||||
// needed).
|
// needed).
|
||||||
RefPtr<gfxFontEntry> fe = gfxPlatformFontList::PlatformFontList()
|
RefPtr<gfxFontEntry> fe =
|
||||||
->GetOrCreateFontEntry(face, this);
|
gfxPlatformFontList::PlatformFontList()->GetOrCreateFontEntry(face,
|
||||||
|
this);
|
||||||
if (!fe) {
|
if (!fe) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -358,9 +359,8 @@ void Family::SetFacePtrs(FontList* aList, nsTArray<Pointer>& aFaces) {
|
|||||||
// them at the appropriate slots in mFaces and set the mIsSimple flag to
|
// them at the appropriate slots in mFaces and set the mIsSimple flag to
|
||||||
// accelerate font-matching.
|
// accelerate font-matching.
|
||||||
bool isSimple = true;
|
bool isSimple = true;
|
||||||
Pointer slots[4] = {
|
Pointer slots[4] = {Pointer::Null(), Pointer::Null(), Pointer::Null(),
|
||||||
Pointer::Null(), Pointer::Null(), Pointer::Null(), Pointer::Null()
|
Pointer::Null()};
|
||||||
};
|
|
||||||
for (const Pointer& fp : aFaces) {
|
for (const Pointer& fp : aFaces) {
|
||||||
const Face* f = static_cast<const Face*>(fp.ToPtr(aList));
|
const Face* f = static_cast<const Face*>(fp.ToPtr(aList));
|
||||||
if (!f->mWeight.IsSingle() || !f->mStyle.IsSingle() ||
|
if (!f->mWeight.IsSingle() || !f->mStyle.IsSingle() ||
|
||||||
|
@ -140,8 +140,7 @@ gfxFontEntry::~gfxFontEntry() {
|
|||||||
MOZ_ASSERT(!mGrFaceInitialized);
|
MOZ_ASSERT(!mGrFaceInitialized);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool gfxFontEntry::TrySetShmemCharacterMap()
|
bool gfxFontEntry::TrySetShmemCharacterMap() {
|
||||||
{
|
|
||||||
MOZ_ASSERT(mShmemFace);
|
MOZ_ASSERT(mShmemFace);
|
||||||
auto list = gfxPlatformFontList::PlatformFontList()->SharedFontList();
|
auto list = gfxPlatformFontList::PlatformFontList()->SharedFontList();
|
||||||
mShmemCharacterMap =
|
mShmemCharacterMap =
|
||||||
|
@ -487,7 +487,8 @@ inline void gfxSparseBitSet::Union(const SharedBitSet& aBitset) {
|
|||||||
mBlockIndex.AppendElement(NO_BLOCK);
|
mBlockIndex.AppendElement(NO_BLOCK);
|
||||||
}
|
}
|
||||||
auto blockIndex = reinterpret_cast<const uint16_t*>(&aBitset + 1);
|
auto blockIndex = reinterpret_cast<const uint16_t*>(&aBitset + 1);
|
||||||
auto blocks = reinterpret_cast<const Block*>(blockIndex + aBitset.mBlockIndexCount);
|
auto blocks =
|
||||||
|
reinterpret_cast<const Block*>(blockIndex + aBitset.mBlockIndexCount);
|
||||||
for (uint32_t i = 0; i < aBitset.mBlockIndexCount; ++i) {
|
for (uint32_t i = 0; i < aBitset.mBlockIndexCount; ++i) {
|
||||||
// if it is missing (implicitly empty) in source, just skip
|
// if it is missing (implicitly empty) in source, just skip
|
||||||
if (blockIndex[i] == NO_BLOCK) {
|
if (blockIndex[i] == NO_BLOCK) {
|
||||||
@ -501,10 +502,9 @@ inline void gfxSparseBitSet::Union(const SharedBitSet& aBitset) {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
// else set existing target block to the union of both
|
// else set existing target block to the union of both
|
||||||
uint32_t* dst = reinterpret_cast<uint32_t*>(
|
uint32_t* dst = reinterpret_cast<uint32_t*>(&mBlocks[mBlockIndex[i]].mBits);
|
||||||
&mBlocks[mBlockIndex[i]].mBits);
|
const uint32_t* src =
|
||||||
const uint32_t* src = reinterpret_cast<const uint32_t*>(
|
reinterpret_cast<const uint32_t*>(&blocks[blockIndex[i]].mBits);
|
||||||
&blocks[blockIndex[i]].mBits);
|
|
||||||
for (uint32_t j = 0; j < BLOCK_SIZE / 4; ++j) {
|
for (uint32_t j = 0; j < BLOCK_SIZE / 4; ++j) {
|
||||||
dst[j] |= src[j];
|
dst[j] |= src[j];
|
||||||
}
|
}
|
||||||
|
@ -1763,8 +1763,7 @@ void gfxMacPlatformFontList::ActivateFontsFromDir(nsIFile* aDir) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void gfxMacPlatformFontList::GetFacesInitDataForFamily(
|
void gfxMacPlatformFontList::GetFacesInitDataForFamily(
|
||||||
const fontlist::Family* aFamily,
|
const fontlist::Family* aFamily, nsTArray<fontlist::Face::InitData>& aFaces) const {
|
||||||
nsTArray<fontlist::Face::InitData>& aFaces) const {
|
|
||||||
nsAutoreleasePool localPool;
|
nsAutoreleasePool localPool;
|
||||||
|
|
||||||
NS_ConvertUTF8toUTF16 name(aFamily->Key().AsString(SharedFontList()));
|
NS_ConvertUTF8toUTF16 name(aFamily->Key().AsString(SharedFontList()));
|
||||||
@ -1860,8 +1859,7 @@ void gfxMacPlatformFontList::ReadFaceNamesForFamily(fontlist::Family* aFamily,
|
|||||||
// of the macOS UI font; see MacOSFontEntry::GetFontRef(). We pass 16.0 in
|
// of the macOS UI font; see MacOSFontEntry::GetFontRef(). We pass 16.0 in
|
||||||
// order to get a standard text-size face in this case, although it's
|
// order to get a standard text-size face in this case, although it's
|
||||||
// unlikely to matter for the purpose of just reading family names.
|
// unlikely to matter for the purpose of just reading family names.
|
||||||
auto fe = MakeUnique<MacOSFontEntry>(name, WeightRange(FontWeight::Normal()),
|
auto fe = MakeUnique<MacOSFontEntry>(name, WeightRange(FontWeight::Normal()), false, 16.0);
|
||||||
false, 16.0);
|
|
||||||
if (!fe) {
|
if (!fe) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -1872,8 +1870,8 @@ void gfxMacPlatformFontList::ReadFaceNamesForFamily(fontlist::Family* aFamily,
|
|||||||
uint32_t dataLength;
|
uint32_t dataLength;
|
||||||
const char* nameData = hb_blob_get_data(nameTable, &dataLength);
|
const char* nameData = hb_blob_get_data(nameTable, &dataLength);
|
||||||
AutoTArray<nsCString, 4> otherFamilyNames;
|
AutoTArray<nsCString, 4> otherFamilyNames;
|
||||||
gfxFontUtils::ReadOtherFamilyNamesForFace(canonicalName, nameData, dataLength,
|
gfxFontUtils::ReadOtherFamilyNamesForFace(canonicalName, nameData, dataLength, otherFamilyNames,
|
||||||
otherFamilyNames, false);
|
false);
|
||||||
for (const auto& alias : otherFamilyNames) {
|
for (const auto& alias : otherFamilyNames) {
|
||||||
auto af = mAliasTable.LookupOrAdd(alias);
|
auto af = mAliasTable.LookupOrAdd(alias);
|
||||||
af->AppendElement(facePtrs[i]);
|
af->AppendElement(facePtrs[i]);
|
||||||
|
@ -129,8 +129,7 @@ bool RendererOGL::UpdateAndRender(const Maybe<gfx::IntSize>& aReadbackSize,
|
|||||||
MOZ_ASSERT(aReadbackSize.isSome());
|
MOZ_ASSERT(aReadbackSize.isSome());
|
||||||
MOZ_ASSERT(aReadbackFormat.isSome());
|
MOZ_ASSERT(aReadbackFormat.isSome());
|
||||||
wr_renderer_readback(mRenderer, aReadbackSize.ref().width,
|
wr_renderer_readback(mRenderer, aReadbackSize.ref().width,
|
||||||
aReadbackSize.ref().height,
|
aReadbackSize.ref().height, aReadbackFormat.ref(),
|
||||||
aReadbackFormat.ref(),
|
|
||||||
&aReadbackBuffer.ref()[0],
|
&aReadbackBuffer.ref()[0],
|
||||||
aReadbackBuffer.ref().length());
|
aReadbackBuffer.ref().length());
|
||||||
}
|
}
|
||||||
|
@ -430,7 +430,10 @@ void WebRenderAPI::Readback(const TimeStamp& aStartTime, gfx::IntSize size,
|
|||||||
explicit Readback(layers::SynchronousTask* aTask, TimeStamp aStartTime,
|
explicit Readback(layers::SynchronousTask* aTask, TimeStamp aStartTime,
|
||||||
gfx::IntSize aSize, const gfx::SurfaceFormat& aFormat,
|
gfx::IntSize aSize, const gfx::SurfaceFormat& aFormat,
|
||||||
const Range<uint8_t>& aBuffer)
|
const Range<uint8_t>& aBuffer)
|
||||||
: mTask(aTask), mStartTime(aStartTime), mSize(aSize), mFormat(aFormat),
|
: mTask(aTask),
|
||||||
|
mStartTime(aStartTime),
|
||||||
|
mSize(aSize),
|
||||||
|
mFormat(aFormat),
|
||||||
mBuffer(aBuffer) {
|
mBuffer(aBuffer) {
|
||||||
MOZ_COUNT_CTOR(Readback);
|
MOZ_COUNT_CTOR(Readback);
|
||||||
}
|
}
|
||||||
@ -1161,8 +1164,7 @@ void DisplayListBuilder::PushShadow(const wr::LayoutRect& aRect,
|
|||||||
// being re-enabled mid-shadow. The optimization is restored in PopAllShadows.
|
// being re-enabled mid-shadow. The optimization is restored in PopAllShadows.
|
||||||
SuspendClipLeafMerging();
|
SuspendClipLeafMerging();
|
||||||
wr_dp_push_shadow(mWrState, aRect, aClip, aIsBackfaceVisible,
|
wr_dp_push_shadow(mWrState, aRect, aClip, aIsBackfaceVisible,
|
||||||
&mCurrentSpaceAndClipChain, aShadow,
|
&mCurrentSpaceAndClipChain, aShadow, aShouldInflate);
|
||||||
aShouldInflate);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void DisplayListBuilder::PopAllShadows() {
|
void DisplayListBuilder::PopAllShadows() {
|
||||||
|
@ -25,8 +25,8 @@ class nsHyphenator {
|
|||||||
private:
|
private:
|
||||||
~nsHyphenator();
|
~nsHyphenator();
|
||||||
|
|
||||||
void HyphenateWord(const nsAString& aString, uint32_t aStart,
|
void HyphenateWord(const nsAString& aString, uint32_t aStart, uint32_t aLimit,
|
||||||
uint32_t aLimit, nsTArray<bool>& aHyphens);
|
nsTArray<bool>& aHyphens);
|
||||||
|
|
||||||
void* mDict;
|
void* mDict;
|
||||||
bool mHyphenateCapitalized;
|
bool mHyphenateCapitalized;
|
||||||
|
@ -69,7 +69,7 @@ ProcessRuntime::ProcessRuntime(GeckoProcessType aProcessType)
|
|||||||
}
|
}
|
||||||
nsAutoHandle curThreadImpToken(rawCurThreadImpToken);
|
nsAutoHandle curThreadImpToken(rawCurThreadImpToken);
|
||||||
|
|
||||||
#if defined(DEBUG)
|
# if defined(DEBUG)
|
||||||
// Ensure that our current token is still an impersonation token (ie, we
|
// Ensure that our current token is still an impersonation token (ie, we
|
||||||
// have not yet called RevertToSelf() on this thread).
|
// have not yet called RevertToSelf() on this thread).
|
||||||
DWORD len;
|
DWORD len;
|
||||||
@ -77,7 +77,7 @@ ProcessRuntime::ProcessRuntime(GeckoProcessType aProcessType)
|
|||||||
MOZ_ASSERT(::GetTokenInformation(rawCurThreadImpToken, TokenType,
|
MOZ_ASSERT(::GetTokenInformation(rawCurThreadImpToken, TokenType,
|
||||||
&tokenType, sizeof(tokenType), &len) &&
|
&tokenType, sizeof(tokenType), &len) &&
|
||||||
len == sizeof(tokenType) && tokenType == TokenImpersonation);
|
len == sizeof(tokenType) && tokenType == TokenImpersonation);
|
||||||
#endif // defined(DEBUG)
|
# endif // defined(DEBUG)
|
||||||
|
|
||||||
// Create an impersonation token based on the current thread's token
|
// Create an impersonation token based on the current thread's token
|
||||||
HANDLE rawMtaThreadImpToken = nullptr;
|
HANDLE rawMtaThreadImpToken = nullptr;
|
||||||
@ -89,22 +89,26 @@ ProcessRuntime::ProcessRuntime(GeckoProcessType aProcessType)
|
|||||||
nsAutoHandle mtaThreadImpToken(rawMtaThreadImpToken);
|
nsAutoHandle mtaThreadImpToken(rawMtaThreadImpToken);
|
||||||
|
|
||||||
SandboxTarget::Instance()->RegisterSandboxStartCallback([]() -> void {
|
SandboxTarget::Instance()->RegisterSandboxStartCallback([]() -> void {
|
||||||
EnsureMTA([]() -> void {
|
EnsureMTA(
|
||||||
|
[]() -> void {
|
||||||
// This is a security risk if it fails, so we release assert
|
// This is a security risk if it fails, so we release assert
|
||||||
MOZ_RELEASE_ASSERT(::RevertToSelf(),
|
MOZ_RELEASE_ASSERT(::RevertToSelf(),
|
||||||
"mscom::ProcessRuntime RevertToSelf failed");
|
"mscom::ProcessRuntime RevertToSelf failed");
|
||||||
}, EnsureMTA::Option::ForceDispatch);
|
},
|
||||||
|
EnsureMTA::Option::ForceDispatch);
|
||||||
});
|
});
|
||||||
|
|
||||||
// Impersonate and initialize.
|
// Impersonate and initialize.
|
||||||
EnsureMTA([this, rawMtaThreadImpToken]() -> void {
|
EnsureMTA(
|
||||||
|
[this, rawMtaThreadImpToken]() -> void {
|
||||||
if (!::SetThreadToken(nullptr, rawMtaThreadImpToken)) {
|
if (!::SetThreadToken(nullptr, rawMtaThreadImpToken)) {
|
||||||
mInitResult = HRESULT_FROM_WIN32(::GetLastError());
|
mInitResult = HRESULT_FROM_WIN32(::GetLastError());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
InitInsideApartment();
|
InitInsideApartment();
|
||||||
}, EnsureMTA::Option::ForceDispatch);
|
},
|
||||||
|
EnsureMTA::Option::ForceDispatch);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -3642,8 +3642,8 @@ static bool DescendIntoChild(nsDisplayListBuilder* aBuilder,
|
|||||||
}
|
}
|
||||||
|
|
||||||
nsDisplayTableBackgroundSet* tableBGs = aBuilder->GetTableBackgroundSet();
|
nsDisplayTableBackgroundSet* tableBGs = aBuilder->GetTableBackgroundSet();
|
||||||
if (tableBGs &&
|
if (tableBGs && tableBGs->GetDirtyRect().Intersects(
|
||||||
tableBGs->GetDirtyRect().Intersects(normalPositionOverflowRelativeToTable)) {
|
normalPositionOverflowRelativeToTable)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -130,7 +130,8 @@ bool RetainedDisplayListBuilder::PreProcessDisplayList(
|
|||||||
// list build if we hit them.
|
// list build if we hit them.
|
||||||
static const uint32_t kMaxEdgeRatio = 5;
|
static const uint32_t kMaxEdgeRatio = 5;
|
||||||
const bool initializeDAG = !aList->mDAG.Length();
|
const bool initializeDAG = !aList->mDAG.Length();
|
||||||
if (!aKeepLinked && !initializeDAG && aList->mDAG.mDirectPredecessorList.Length() >
|
if (!aKeepLinked && !initializeDAG &&
|
||||||
|
aList->mDAG.mDirectPredecessorList.Length() >
|
||||||
(aList->mDAG.mNodesInfo.Length() * kMaxEdgeRatio)) {
|
(aList->mDAG.mNodesInfo.Length() * kMaxEdgeRatio)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -227,7 +228,9 @@ bool RetainedDisplayListBuilder::PreProcessDisplayList(
|
|||||||
if (!PreProcessDisplayList(
|
if (!PreProcessDisplayList(
|
||||||
item->GetChildren(), SelectAGRForFrame(f, aAGR), aUpdated,
|
item->GetChildren(), SelectAGRForFrame(f, aAGR), aUpdated,
|
||||||
item->GetPerFrameKey(), aNestingDepth + 1, keepLinked)) {
|
item->GetPerFrameKey(), aNestingDepth + 1, keepLinked)) {
|
||||||
MOZ_RELEASE_ASSERT(!aKeepLinked, "Can't early return since we need to move the out list back");
|
MOZ_RELEASE_ASSERT(
|
||||||
|
!aKeepLinked,
|
||||||
|
"Can't early return since we need to move the out list back");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1201,8 +1204,7 @@ static void AddFramesForContainingBlock(nsIFrame* aBlock,
|
|||||||
// ancestors must also be visited).
|
// ancestors must also be visited).
|
||||||
static void FindContainingBlocks(nsIFrame* aFrame,
|
static void FindContainingBlocks(nsIFrame* aFrame,
|
||||||
nsTArray<nsIFrame*>& aExtraFrames) {
|
nsTArray<nsIFrame*>& aExtraFrames) {
|
||||||
for (nsIFrame* f = aFrame; f;
|
for (nsIFrame* f = aFrame; f; f = nsLayoutUtils::GetDisplayListParent(f)) {
|
||||||
f = nsLayoutUtils::GetDisplayListParent(f)) {
|
|
||||||
if (f->ForceDescendIntoIfVisible()) return;
|
if (f->ForceDescendIntoIfVisible()) return;
|
||||||
f->SetForceDescendIntoIfVisible(true);
|
f->SetForceDescendIntoIfVisible(true);
|
||||||
CRR_LOG("Considering OOFs for %p\n", f);
|
CRR_LOG("Considering OOFs for %p\n", f);
|
||||||
|
@ -3753,7 +3753,8 @@ nsCSSBorderImageRenderer::nsCSSBorderImageRenderer(
|
|||||||
const auto& width = aStyleBorder.mBorderImageWidth.Get(s);
|
const auto& width = aStyleBorder.mBorderImageWidth.Get(s);
|
||||||
switch (width.tag) {
|
switch (width.tag) {
|
||||||
case StyleBorderImageSideWidth::Tag::LengthPercentage:
|
case StyleBorderImageSideWidth::Tag::LengthPercentage:
|
||||||
value = std::max(0, width.AsLengthPercentage().Resolve(borderDimension));
|
value =
|
||||||
|
std::max(0, width.AsLengthPercentage().Resolve(borderDimension));
|
||||||
break;
|
break;
|
||||||
case StyleBorderImageSideWidth::Tag::Number:
|
case StyleBorderImageSideWidth::Tag::Number:
|
||||||
value = width.AsNumber() * borderWidths.Side(s);
|
value = width.AsNumber() * borderWidths.Side(s);
|
||||||
|
@ -1153,8 +1153,7 @@ bool CustomCounterStyle::IsBullet() {
|
|||||||
void CustomCounterStyle::GetNegative(NegativeType& aResult) {
|
void CustomCounterStyle::GetNegative(NegativeType& aResult) {
|
||||||
if (!(mFlags & FLAG_NEGATIVE_INITED)) {
|
if (!(mFlags & FLAG_NEGATIVE_INITED)) {
|
||||||
mFlags |= FLAG_NEGATIVE_INITED;
|
mFlags |= FLAG_NEGATIVE_INITED;
|
||||||
if (!Servo_CounterStyleRule_GetNegative(mRule,
|
if (!Servo_CounterStyleRule_GetNegative(mRule, &mNegative.before,
|
||||||
&mNegative.before,
|
|
||||||
&mNegative.after)) {
|
&mNegative.after)) {
|
||||||
if (IsExtendsSystem()) {
|
if (IsExtendsSystem()) {
|
||||||
GetExtends()->GetNegative(mNegative);
|
GetExtends()->GetNegative(mNegative);
|
||||||
|
@ -315,8 +315,7 @@ void FontFace::SetDisplay(const nsAString& aValue, ErrorResult& aRv) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void FontFace::DescriptorUpdated()
|
void FontFace::DescriptorUpdated() {
|
||||||
{
|
|
||||||
// If we haven't yet initialized mUserFontEntry, no need to do anything here;
|
// If we haven't yet initialized mUserFontEntry, no need to do anything here;
|
||||||
// we'll respect the updated descriptor when the time comes to create it.
|
// we'll respect the updated descriptor when the time comes to create it.
|
||||||
if (!mUserFontEntry) {
|
if (!mUserFontEntry) {
|
||||||
|
@ -1032,10 +1032,9 @@ FontFaceSet::FindOrCreateUserFontEntryFromFontFace(
|
|||||||
if (existingEntry) {
|
if (existingEntry) {
|
||||||
// aFontFace already has a user font entry, so we update its attributes
|
// aFontFace already has a user font entry, so we update its attributes
|
||||||
// rather than creating a new one.
|
// rather than creating a new one.
|
||||||
existingEntry->UpdateAttributes(weight, stretch, italicStyle,
|
existingEntry->UpdateAttributes(
|
||||||
featureSettings, variationSettings,
|
weight, stretch, italicStyle, featureSettings, variationSettings,
|
||||||
languageOverride, unicodeRanges,
|
languageOverride, unicodeRanges, fontDisplay, rangeFlags);
|
||||||
fontDisplay, rangeFlags);
|
|
||||||
// If the family name has changed, remove the entry from its current family
|
// If the family name has changed, remove the entry from its current family
|
||||||
// and clear the mFamilyName field so it can be reset when added to a new
|
// and clear the mFamilyName field so it can be reset when added to a new
|
||||||
// family.
|
// family.
|
||||||
|
@ -80,7 +80,7 @@ class WritingMode;
|
|||||||
class ServoElementSnapshotTable;
|
class ServoElementSnapshotTable;
|
||||||
enum class StyleContentType : uint8_t;
|
enum class StyleContentType : uint8_t;
|
||||||
|
|
||||||
template<typename T>
|
template <typename T>
|
||||||
struct StyleForgottenArcSlicePtr;
|
struct StyleForgottenArcSlicePtr;
|
||||||
|
|
||||||
struct AnimationPropertySegment;
|
struct AnimationPropertySegment;
|
||||||
|
@ -171,7 +171,8 @@ enum class StyleScrollbarWidth : uint8_t {
|
|||||||
// Shape source type
|
// Shape source type
|
||||||
enum class StyleShapeSourceType : uint8_t {
|
enum class StyleShapeSourceType : uint8_t {
|
||||||
None,
|
None,
|
||||||
Image, // shape-outside / clip-path only, and clip-path only uses it for <url>s
|
Image, // shape-outside / clip-path only, and clip-path only uses it for
|
||||||
|
// <url>s
|
||||||
Shape,
|
Shape,
|
||||||
Box,
|
Box,
|
||||||
Path, // SVG path function
|
Path, // SVG path function
|
||||||
|
@ -29,7 +29,7 @@ class FontSlantStyle;
|
|||||||
namespace dom {
|
namespace dom {
|
||||||
class Document;
|
class Document;
|
||||||
class Element;
|
class Element;
|
||||||
}
|
} // namespace dom
|
||||||
} // namespace mozilla
|
} // namespace mozilla
|
||||||
|
|
||||||
// Style utility functions
|
// Style utility functions
|
||||||
|
@ -55,11 +55,13 @@ void SVGImageContext::MaybeStoreContextPaint(Maybe<SVGImageContext>& aContext,
|
|||||||
haveContextPaint = true;
|
haveContextPaint = true;
|
||||||
contextPaint->SetStroke(style->mStroke.GetColor(aFromComputedStyle));
|
contextPaint->SetStroke(style->mStroke.GetColor(aFromComputedStyle));
|
||||||
}
|
}
|
||||||
if (style->mMozContextProperties.bits & StyleContextPropertyBits_FILL_OPACITY) {
|
if (style->mMozContextProperties.bits &
|
||||||
|
StyleContextPropertyBits_FILL_OPACITY) {
|
||||||
haveContextPaint = true;
|
haveContextPaint = true;
|
||||||
contextPaint->SetFillOpacity(style->mFillOpacity);
|
contextPaint->SetFillOpacity(style->mFillOpacity);
|
||||||
}
|
}
|
||||||
if (style->mMozContextProperties.bits & StyleContextPropertyBits_STROKE_OPACITY) {
|
if (style->mMozContextProperties.bits &
|
||||||
|
StyleContextPropertyBits_STROKE_OPACITY) {
|
||||||
haveContextPaint = true;
|
haveContextPaint = true;
|
||||||
contextPaint->SetStrokeOpacity(style->mStrokeOpacity);
|
contextPaint->SetStrokeOpacity(style->mStrokeOpacity);
|
||||||
}
|
}
|
||||||
|
@ -1234,7 +1234,8 @@ static nsSVGPaintingProperty* GetOrCreateClipPathObserver(
|
|||||||
if (svgStyleReset->mClipPath.GetType() != StyleShapeSourceType::Image) {
|
if (svgStyleReset->mClipPath.GetType() != StyleShapeSourceType::Image) {
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
const css::URLValue* url = svgStyleReset->mClipPath.ShapeImage().GetURLValue();
|
const css::URLValue* url =
|
||||||
|
svgStyleReset->mClipPath.ShapeImage().GetURLValue();
|
||||||
MOZ_ASSERT(url);
|
MOZ_ASSERT(url);
|
||||||
RefPtr<URLAndReferrerInfo> pathURI =
|
RefPtr<URLAndReferrerInfo> pathURI =
|
||||||
ResolveURLUsingLocalRef(aClippedFrame, url);
|
ResolveURLUsingLocalRef(aClippedFrame, url);
|
||||||
|
@ -240,8 +240,8 @@ void nsTableRowGroupFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||||||
DisplayOutsetBoxShadow(aBuilder, aLists.BorderBackground());
|
DisplayOutsetBoxShadow(aBuilder, aLists.BorderBackground());
|
||||||
|
|
||||||
for (nsTableRowFrame* row = GetFirstRow(); row; row = row->GetNextRow()) {
|
for (nsTableRowFrame* row = GetFirstRow(); row; row = row->GetNextRow()) {
|
||||||
if (!aBuilder->GetDirtyRect().Intersects(
|
if (!aBuilder->GetDirtyRect().Intersects(row->GetVisualOverflowRect() +
|
||||||
row->GetVisualOverflowRect() + row->GetNormalPosition())) {
|
row->GetNormalPosition())) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
row->PaintCellBackgroundsForFrame(this, aBuilder, aLists,
|
row->PaintCellBackgroundsForFrame(this, aBuilder, aLists,
|
||||||
|
@ -45,9 +45,9 @@
|
|||||||
#if ARCH_AARCH64 == 1
|
#if ARCH_AARCH64 == 1
|
||||||
// Those values are copied from the auto generated
|
// Those values are copied from the auto generated
|
||||||
// config file produced by stand alone dav1d build.
|
// config file produced by stand alone dav1d build.
|
||||||
#define HAVE_AS_FUNC 0
|
# define HAVE_AS_FUNC 0
|
||||||
#define HAVE_GETAUXVAL 1
|
# define HAVE_GETAUXVAL 1
|
||||||
#define PIC 3
|
# define PIC 3
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// The following macros are defined from autoconf
|
// The following macros are defined from autoconf
|
||||||
|
@ -1618,7 +1618,6 @@ class HashTable : private AllocPolicy {
|
|||||||
|
|
||||||
static char* createTable(AllocPolicy& aAllocPolicy, uint32_t aCapacity,
|
static char* createTable(AllocPolicy& aAllocPolicy, uint32_t aCapacity,
|
||||||
FailureBehavior aReportFailure = ReportFailure) {
|
FailureBehavior aReportFailure = ReportFailure) {
|
||||||
|
|
||||||
FakeSlot* fake =
|
FakeSlot* fake =
|
||||||
aReportFailure
|
aReportFailure
|
||||||
? aAllocPolicy.template pod_malloc<FakeSlot>(aCapacity)
|
? aAllocPolicy.template pod_malloc<FakeSlot>(aCapacity)
|
||||||
|
@ -45,42 +45,41 @@ namespace recordreplay {
|
|||||||
(JSContext * aCx, JSObject * aObj), (aCx, aObj))
|
(JSContext * aCx, JSObject * aObj), (aCx, aObj))
|
||||||
|
|
||||||
#define FOR_EACH_INTERFACE_VOID(Macro) \
|
#define FOR_EACH_INTERFACE_VOID(Macro) \
|
||||||
|
Macro(InternalBeginOrderedAtomicAccess, (const void* aValue), \
|
||||||
|
(aValue)) Macro(InternalEndOrderedAtomicAccess, (), ()) \
|
||||||
|
Macro(InternalBeginPassThroughThreadEvents, (), ()) Macro( \
|
||||||
|
InternalEndPassThroughThreadEvents, (), \
|
||||||
|
()) Macro(InternalBeginDisallowThreadEvents, (), \
|
||||||
|
()) Macro(InternalEndDisallowThreadEvents, (), \
|
||||||
|
()) Macro(InternalRecordReplayBytes, \
|
||||||
|
(void* aData, size_t aSize), \
|
||||||
|
(aData, aSize)) \
|
||||||
Macro( \
|
Macro( \
|
||||||
InternalBeginOrderedAtomicAccess, (const void* aValue), \
|
InternalInvalidateRecording, (const char* aWhy), \
|
||||||
(aValue)) Macro(InternalEndOrderedAtomicAccess, (), \
|
(aWhy)) Macro(InternalDestroyPLDHashTableCallbacks, \
|
||||||
()) Macro(InternalBeginPassThroughThreadEvents, (), \
|
|
||||||
()) Macro(InternalEndPassThroughThreadEvents, \
|
|
||||||
(), ()) \
|
|
||||||
Macro(InternalBeginDisallowThreadEvents, (), ()) Macro( \
|
|
||||||
InternalEndDisallowThreadEvents, (), \
|
|
||||||
()) Macro(InternalRecordReplayBytes, (void* aData, size_t aSize), \
|
|
||||||
(aData, aSize)) Macro(InternalInvalidateRecording, \
|
|
||||||
(const char* aWhy), (aWhy)) \
|
|
||||||
Macro(InternalDestroyPLDHashTableCallbacks, \
|
|
||||||
(const PLDHashTableOps* aOps), \
|
(const PLDHashTableOps* aOps), \
|
||||||
(aOps)) Macro(InternalMovePLDHashTableContents, \
|
(aOps)) Macro(InternalMovePLDHashTableContents, \
|
||||||
(const PLDHashTableOps* aFirstOps, \
|
(const PLDHashTableOps* aFirstOps, \
|
||||||
const PLDHashTableOps* aSecondOps), \
|
const PLDHashTableOps* aSecondOps), \
|
||||||
(aFirstOps, \
|
(aFirstOps, aSecondOps)) \
|
||||||
aSecondOps)) Macro(SetWeakPointerJSRoot, \
|
Macro(SetWeakPointerJSRoot, \
|
||||||
(const void* aPtr, \
|
(const void* aPtr, JSObject* aJSObj), (aPtr, aJSObj)) \
|
||||||
JSObject* aJSObj), \
|
|
||||||
(aPtr, aJSObj)) \
|
|
||||||
Macro(RegisterTrigger, \
|
Macro(RegisterTrigger, \
|
||||||
(void* aObj, const std::function<void()>& aCallback), \
|
(void* aObj, const std::function<void()>& aCallback), \
|
||||||
(aObj, aCallback)) Macro(UnregisterTrigger, (void* aObj), \
|
(aObj, \
|
||||||
(aObj)) \
|
aCallback)) Macro(UnregisterTrigger, (void* aObj), \
|
||||||
Macro(ActivateTrigger, (void* aObj), (aObj)) Macro( \
|
(aObj)) Macro(ActivateTrigger, \
|
||||||
ExecuteTriggers, (), \
|
(void* aObj), (aObj)) \
|
||||||
()) Macro(InternalRecordReplayAssert, \
|
Macro(ExecuteTriggers, (), ()) Macro( \
|
||||||
|
InternalRecordReplayAssert, \
|
||||||
(const char* aFormat, va_list aArgs), \
|
(const char* aFormat, va_list aArgs), \
|
||||||
(aFormat, aArgs)) \
|
(aFormat, \
|
||||||
Macro(InternalRecordReplayAssertBytes, \
|
aArgs)) Macro(InternalRecordReplayAssertBytes, \
|
||||||
(const void* aData, size_t aSize), \
|
(const void* aData, size_t aSize), \
|
||||||
(aData, aSize)) Macro(InternalRegisterThing, \
|
(aData, aSize)) \
|
||||||
|
Macro(InternalRegisterThing, (void* aThing), \
|
||||||
|
(aThing)) Macro(InternalUnregisterThing, \
|
||||||
(void* aThing), (aThing)) \
|
(void* aThing), (aThing)) \
|
||||||
Macro(InternalUnregisterThing, (void* aThing), \
|
|
||||||
(aThing)) \
|
|
||||||
Macro(BeginContentParse, \
|
Macro(BeginContentParse, \
|
||||||
(const void* aToken, const char* aURL, \
|
(const void* aToken, const char* aURL, \
|
||||||
const char* aContentType), \
|
const char* aContentType), \
|
||||||
|
@ -326,8 +326,8 @@ bool SignedBinary::VerifySignature(const wchar_t* aFilePath) {
|
|||||||
|
|
||||||
// We can't use UniquePtr for this because the deleter function requires two
|
// We can't use UniquePtr for this because the deleter function requires two
|
||||||
// parameters.
|
// parameters.
|
||||||
auto cleanCatInfoHdl = mozilla::MakeScopeExit(
|
auto cleanCatInfoHdl =
|
||||||
[rawCatAdmin, catInfoHdl]() -> void {
|
mozilla::MakeScopeExit([rawCatAdmin, catInfoHdl]() -> void {
|
||||||
pCryptCATAdminReleaseCatalogContext(rawCatAdmin, catInfoHdl, 0);
|
pCryptCATAdminReleaseCatalogContext(rawCatAdmin, catInfoHdl, 0);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -832,7 +832,12 @@ extern "C" int wmain(int argc, wchar_t* argv[]) {
|
|||||||
#endif
|
#endif
|
||||||
TEST_DETOUR_SKIP_EXEC(kernel32.dll, BaseThreadInitThunk) &&
|
TEST_DETOUR_SKIP_EXEC(kernel32.dll, BaseThreadInitThunk) &&
|
||||||
TEST_DETOUR_SKIP_EXEC(ntdll.dll, LdrLoadDll) &&
|
TEST_DETOUR_SKIP_EXEC(ntdll.dll, LdrLoadDll) &&
|
||||||
MAYBE_TEST_HOOK_PARAMS(HasApiSetQueryApiSetPresence(), Api-ms-win-core-apiquery-l1-1-0.dll, ApiSetQueryApiSetPresence, Equals, FALSE, &gEmptyUnicodeString, &gIsPresent) &&
|
MAYBE_TEST_HOOK_PARAMS(HasApiSetQueryApiSetPresence(),
|
||||||
|
// clang-format off
|
||||||
|
Api-ms-win-core-apiquery-l1-1-0.dll,
|
||||||
|
// clang-format on
|
||||||
|
ApiSetQueryApiSetPresence, Equals, FALSE,
|
||||||
|
&gEmptyUnicodeString, &gIsPresent) &&
|
||||||
TestTenByteDetour()) {
|
TestTenByteDetour()) {
|
||||||
printf("TEST-PASS | WindowsDllInterceptor | all checks passed\n");
|
printf("TEST-PASS | WindowsDllInterceptor | all checks passed\n");
|
||||||
|
|
||||||
|
@ -71,7 +71,7 @@ DataChannelParent::SetClassifierMatchedInfo(const nsACString& aList,
|
|||||||
|
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
DataChannelParent::SetClassifierMatchedTrackingInfo(
|
DataChannelParent::SetClassifierMatchedTrackingInfo(
|
||||||
const nsACString &aLists, const nsACString &aFullHashes) {
|
const nsACString& aLists, const nsACString& aFullHashes) {
|
||||||
// nothing to do
|
// nothing to do
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
@ -71,7 +71,7 @@ FileChannelParent::SetClassifierMatchedInfo(const nsACString& aList,
|
|||||||
|
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
FileChannelParent::SetClassifierMatchedTrackingInfo(
|
FileChannelParent::SetClassifierMatchedTrackingInfo(
|
||||||
const nsACString &aLists, const nsACString &aFullHashes) {
|
const nsACString& aLists, const nsACString& aFullHashes) {
|
||||||
// nothing to do
|
// nothing to do
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
@ -75,8 +75,12 @@ class AltSvcMapping;
|
|||||||
* FRAMECHECK_STRICT - we also do not allow case 2) and 3) from
|
* FRAMECHECK_STRICT - we also do not allow case 2) and 3) from
|
||||||
* FRAMECHECK_BARELY.
|
* FRAMECHECK_BARELY.
|
||||||
*/
|
*/
|
||||||
enum FrameCheckLevel { FRAMECHECK_LAX, FRAMECHECK_BARELY,
|
enum FrameCheckLevel {
|
||||||
FRAMECHECK_STRICT_CHUNKED, FRAMECHECK_STRICT };
|
FRAMECHECK_LAX,
|
||||||
|
FRAMECHECK_BARELY,
|
||||||
|
FRAMECHECK_STRICT_CHUNKED,
|
||||||
|
FRAMECHECK_STRICT
|
||||||
|
};
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// nsHttpHandler - protocol handler for HTTP and HTTPS
|
// nsHttpHandler - protocol handler for HTTP and HTTPS
|
||||||
|
@ -1143,8 +1143,7 @@ void nsHttpTransaction::Close(nsresult reason) {
|
|||||||
// response that ends on exactly a chunk boundary also as partial.
|
// response that ends on exactly a chunk boundary also as partial.
|
||||||
// Here a response must have the last 0-size chunk.
|
// Here a response must have the last 0-size chunk.
|
||||||
if ((clevel == FRAMECHECK_STRICT) ||
|
if ((clevel == FRAMECHECK_STRICT) ||
|
||||||
(mChunkedDecoder &&
|
(mChunkedDecoder && (mChunkedDecoder->GetChunkRemaining() ||
|
||||||
(mChunkedDecoder->GetChunkRemaining() ||
|
|
||||||
(clevel == FRAMECHECK_STRICT_CHUNKED))) ||
|
(clevel == FRAMECHECK_STRICT_CHUNKED))) ||
|
||||||
(!mChunkedDecoder && !mContentDecoding && mContentDecodingCheck)) {
|
(!mChunkedDecoder && !mContentDecoding && mContentDecodingCheck)) {
|
||||||
reason = NS_ERROR_NET_PARTIAL_TRANSFER;
|
reason = NS_ERROR_NET_PARTIAL_TRANSFER;
|
||||||
|
@ -13,8 +13,7 @@
|
|||||||
// static
|
// static
|
||||||
nsHtml5HtmlAttributes* nsHtml5PlainTextUtils::NewLinkAttributes() {
|
nsHtml5HtmlAttributes* nsHtml5PlainTextUtils::NewLinkAttributes() {
|
||||||
nsHtml5HtmlAttributes* linkAttrs = new nsHtml5HtmlAttributes(0);
|
nsHtml5HtmlAttributes* linkAttrs = new nsHtml5HtmlAttributes(0);
|
||||||
nsHtml5String rel =
|
nsHtml5String rel = nsHtml5Portability::newStringFromLiteral("stylesheet");
|
||||||
nsHtml5Portability::newStringFromLiteral("stylesheet");
|
|
||||||
linkAttrs->addAttribute(nsHtml5AttributeName::ATTR_REL, rel, -1);
|
linkAttrs->addAttribute(nsHtml5AttributeName::ATTR_REL, rel, -1);
|
||||||
nsHtml5String href = nsHtml5Portability::newStringFromLiteral(
|
nsHtml5String href = nsHtml5Portability::newStringFromLiteral(
|
||||||
"resource://content-accessible/plaintext.css");
|
"resource://content-accessible/plaintext.css");
|
||||||
|
@ -31,9 +31,11 @@ static LazyLogModule gTrustDomainPRLog("CSTrustDomain");
|
|||||||
CSTrustDomain::CSTrustDomain(UniqueCERTCertList& certChain)
|
CSTrustDomain::CSTrustDomain(UniqueCERTCertList& certChain)
|
||||||
: mCertChain(certChain),
|
: mCertChain(certChain),
|
||||||
#ifdef MOZ_NEW_CERT_STORAGE
|
#ifdef MOZ_NEW_CERT_STORAGE
|
||||||
mCertBlocklist(do_GetService(NS_CERT_STORAGE_CID)) {}
|
mCertBlocklist(do_GetService(NS_CERT_STORAGE_CID)) {
|
||||||
|
}
|
||||||
#else
|
#else
|
||||||
mCertBlocklist(do_GetService(NS_CERTBLOCKLIST_CONTRACTID)) {}
|
mCertBlocklist(do_GetService(NS_CERTBLOCKLIST_CONTRACTID)) {
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
Result CSTrustDomain::GetCertTrust(EndEntityOrCA endEntityOrCA,
|
Result CSTrustDomain::GetCertTrust(EndEntityOrCA endEntityOrCA,
|
||||||
|
@ -48,16 +48,18 @@ static BOOL WINAPI patched_DuplicateHandle(
|
|||||||
dwDesiredAccess, bInheritHandle, dwOptions);
|
dwDesiredAccess, bInheritHandle, dwOptions);
|
||||||
}
|
}
|
||||||
|
|
||||||
typedef BOOL (WINAPI* ApiSetQueryApiSetPresence_func)(PCUNICODE_STRING, PBOOLEAN);
|
typedef BOOL(WINAPI* ApiSetQueryApiSetPresence_func)(PCUNICODE_STRING,
|
||||||
static WindowsDllInterceptor::FuncHookType<ApiSetQueryApiSetPresence_func> stub_ApiSetQueryApiSetPresence;
|
PBOOLEAN);
|
||||||
|
static WindowsDllInterceptor::FuncHookType<ApiSetQueryApiSetPresence_func>
|
||||||
|
stub_ApiSetQueryApiSetPresence;
|
||||||
|
|
||||||
static const WCHAR gApiSetNtUserWindowStation[] =
|
static const WCHAR gApiSetNtUserWindowStation[] =
|
||||||
L"ext-ms-win-ntuser-windowstation-l1-1-0";
|
L"ext-ms-win-ntuser-windowstation-l1-1-0";
|
||||||
|
|
||||||
static BOOL WINAPI patched_ApiSetQueryApiSetPresence(
|
static BOOL WINAPI patched_ApiSetQueryApiSetPresence(
|
||||||
PCUNICODE_STRING aNamespace, PBOOLEAN aPresent) {
|
PCUNICODE_STRING aNamespace, PBOOLEAN aPresent) {
|
||||||
if (aNamespace && aPresent && !wcsncmp(aNamespace->Buffer,
|
if (aNamespace && aPresent &&
|
||||||
gApiSetNtUserWindowStation,
|
!wcsncmp(aNamespace->Buffer, gApiSetNtUserWindowStation,
|
||||||
aNamespace->Length / sizeof(WCHAR))) {
|
aNamespace->Length / sizeof(WCHAR))) {
|
||||||
*aPresent = FALSE;
|
*aPresent = FALSE;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
@ -99,9 +101,8 @@ static void EnableApiQueryInterception() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
gApiQueryIntercept.Init(L"Api-ms-win-core-apiquery-l1-1-0.dll");
|
gApiQueryIntercept.Init(L"Api-ms-win-core-apiquery-l1-1-0.dll");
|
||||||
DebugOnly<bool> hookSetOk =
|
DebugOnly<bool> hookSetOk = stub_ApiSetQueryApiSetPresence.Set(
|
||||||
stub_ApiSetQueryApiSetPresence.Set(gApiQueryIntercept,
|
gApiQueryIntercept, "ApiSetQueryApiSetPresence",
|
||||||
"ApiSetQueryApiSetPresence",
|
|
||||||
&patched_ApiSetQueryApiSetPresence);
|
&patched_ApiSetQueryApiSetPresence);
|
||||||
MOZ_ASSERT(hookSetOk);
|
MOZ_ASSERT(hookSetOk);
|
||||||
}
|
}
|
||||||
|
@ -1763,7 +1763,8 @@ nsNavBookmarks::RemoveObserver(nsINavBookmarkObserver* aObserver) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsNavBookmarks::GetObservers(nsTArray<RefPtr<nsINavBookmarkObserver>>& aObservers) {
|
nsNavBookmarks::GetObservers(
|
||||||
|
nsTArray<RefPtr<nsINavBookmarkObserver>>& aObservers) {
|
||||||
aObservers.Clear();
|
aObservers.Clear();
|
||||||
|
|
||||||
if (!mCanNotify) return NS_OK;
|
if (!mCanNotify) return NS_OK;
|
||||||
|
@ -299,7 +299,8 @@ nsFormFillController::MarkAsLoginManagerField(HTMLInputElement* aInput) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!mLoginManagerAC) {
|
if (!mLoginManagerAC) {
|
||||||
mLoginManagerAC = do_GetService("@mozilla.org/login-manager/autocompletesearch;1");
|
mLoginManagerAC =
|
||||||
|
do_GetService("@mozilla.org/login-manager/autocompletesearch;1");
|
||||||
}
|
}
|
||||||
|
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
@ -708,7 +709,8 @@ nsFormFillController::StartSearch(const nsAString& aSearchString,
|
|||||||
// MarkAsLoginManagerField wasn't called because password manager is
|
// MarkAsLoginManagerField wasn't called because password manager is
|
||||||
// disabled.
|
// disabled.
|
||||||
if (!mLoginManagerAC) {
|
if (!mLoginManagerAC) {
|
||||||
mLoginManagerAC = do_GetService("@mozilla.org/login-manager/autocompletesearch;1");
|
mLoginManagerAC =
|
||||||
|
do_GetService("@mozilla.org/login-manager/autocompletesearch;1");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (NS_WARN_IF(!mLoginManagerAC)) {
|
if (NS_WARN_IF(!mLoginManagerAC)) {
|
||||||
@ -718,7 +720,8 @@ nsFormFillController::StartSearch(const nsAString& aSearchString,
|
|||||||
// XXX aPreviousResult shouldn't ever be a historyResult type, since we're
|
// XXX aPreviousResult shouldn't ever be a historyResult type, since we're
|
||||||
// not letting satchel manage the field?
|
// not letting satchel manage the field?
|
||||||
mLastListener = aListener;
|
mLastListener = aListener;
|
||||||
rv = mLoginManagerAC->StartSearch(aSearchString, aPreviousResult, mFocusedInput, this);
|
rv = mLoginManagerAC->StartSearch(aSearchString, aPreviousResult,
|
||||||
|
mFocusedInput, this);
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
NS_ENSURE_SUCCESS(rv, rv);
|
||||||
} else {
|
} else {
|
||||||
MOZ_LOG(sLogger, LogLevel::Debug, ("StartSearch: non-login field"));
|
MOZ_LOG(sLogger, LogLevel::Debug, ("StartSearch: non-login field"));
|
||||||
|
@ -517,4 +517,4 @@ void TabListener::RemoveListeners() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TabListener::~TabListener() { RemoveListeners();}
|
TabListener::~TabListener() { RemoveListeners(); }
|
||||||
|
@ -548,7 +548,7 @@ nsAppStartup::GetWasRestarted(bool* aResult) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsAppStartup::GetSecondsSinceLastOSRestart(int64_t *aResult) {
|
nsAppStartup::GetSecondsSinceLastOSRestart(int64_t* aResult) {
|
||||||
#if defined(XP_WIN)
|
#if defined(XP_WIN)
|
||||||
*aResult = int64_t(GetTickCount64() / 1000ull);
|
*aResult = int64_t(GetTickCount64() / 1000ull);
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
|
@ -233,7 +233,8 @@ void GetEncodedOriginStrings(
|
|||||||
nsAutoJSString jsStr;
|
nsAutoJSString jsStr;
|
||||||
ASSERT_TRUE(jsStr.init(aCx, encodingVal));
|
ASSERT_TRUE(jsStr.init(aCx, encodingVal));
|
||||||
|
|
||||||
nsPrintfCString encoding(aEncoding.get(), i % TelemetryOrigin::SizeOfPrioDatasPerMetric());
|
nsPrintfCString encoding(aEncoding.get(),
|
||||||
|
i % TelemetryOrigin::SizeOfPrioDatasPerMetric());
|
||||||
ASSERT_TRUE(NS_ConvertUTF16toUTF8(jsStr) == encoding)
|
ASSERT_TRUE(NS_ConvertUTF16toUTF8(jsStr) == encoding)
|
||||||
<< "Actual 'encoding' (" << NS_ConvertUTF16toUTF8(jsStr).get()
|
<< "Actual 'encoding' (" << NS_ConvertUTF16toUTF8(jsStr).get()
|
||||||
<< ") must match expected (" << encoding << ")";
|
<< ") must match expected (" << encoding << ")";
|
||||||
|
@ -35,10 +35,8 @@ static LazyLogModule gUrlClassifierPrefixSetLog("UrlClassifierPrefixSet");
|
|||||||
NS_IMPL_ISUPPORTS(nsUrlClassifierPrefixSet, nsIUrlClassifierPrefixSet,
|
NS_IMPL_ISUPPORTS(nsUrlClassifierPrefixSet, nsIUrlClassifierPrefixSet,
|
||||||
nsIMemoryReporter)
|
nsIMemoryReporter)
|
||||||
|
|
||||||
|
|
||||||
nsUrlClassifierPrefixSet::nsUrlClassifierPrefixSet()
|
nsUrlClassifierPrefixSet::nsUrlClassifierPrefixSet()
|
||||||
: mLock("nsUrlClassifierPrefixSet.mLock"),
|
: mLock("nsUrlClassifierPrefixSet.mLock"), mTotalPrefixes(0) {}
|
||||||
mTotalPrefixes(0) {}
|
|
||||||
|
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsUrlClassifierPrefixSet::Init(const nsACString& aName) {
|
nsUrlClassifierPrefixSet::Init(const nsACString& aName) {
|
||||||
|
@ -491,5 +491,7 @@ TEST_P(UrlClassifierPrefixSetTest, LoadSaveNoDelta) {
|
|||||||
file->Remove(false);
|
file->Remove(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
// To run the same test for different configurations of "browser_safebrowsing_prefixset_max_array_size"
|
// To run the same test for different configurations of
|
||||||
INSTANTIATE_TEST_CASE_P(UrlClassifierPrefixSetTest, UrlClassifierPrefixSetTest, ::testing::Values(0, UINT32_MAX));
|
// "browser_safebrowsing_prefixset_max_array_size"
|
||||||
|
INSTANTIATE_TEST_CASE_P(UrlClassifierPrefixSetTest, UrlClassifierPrefixSetTest,
|
||||||
|
::testing::Values(0, UINT32_MAX));
|
||||||
|
@ -170,8 +170,7 @@ struct DirtyPageSet {
|
|||||||
InfallibleVector<DirtyPage, 256, AllocPolicy<MemoryKind::DirtyPageSet>>
|
InfallibleVector<DirtyPage, 256, AllocPolicy<MemoryKind::DirtyPageSet>>
|
||||||
mPages;
|
mPages;
|
||||||
|
|
||||||
explicit DirtyPageSet(size_t aCheckpoint)
|
explicit DirtyPageSet(size_t aCheckpoint) : mCheckpoint(aCheckpoint) {}
|
||||||
: mCheckpoint(aCheckpoint) {}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// Worklist used by each snapshot thread.
|
// Worklist used by each snapshot thread.
|
||||||
|
@ -65,8 +65,7 @@ void RestoreCheckpointAndResume(size_t aCheckpoint) {
|
|||||||
MOZ_RELEASE_ASSERT(IsReplaying());
|
MOZ_RELEASE_ASSERT(IsReplaying());
|
||||||
MOZ_RELEASE_ASSERT(Thread::CurrentIsMainThread());
|
MOZ_RELEASE_ASSERT(Thread::CurrentIsMainThread());
|
||||||
MOZ_RELEASE_ASSERT(!AreThreadEventsPassedThrough());
|
MOZ_RELEASE_ASSERT(!AreThreadEventsPassedThrough());
|
||||||
MOZ_RELEASE_ASSERT(
|
MOZ_RELEASE_ASSERT(aCheckpoint == gRewindInfo->mLastCheckpoint ||
|
||||||
aCheckpoint == gRewindInfo->mLastCheckpoint ||
|
|
||||||
aCheckpoint < gRewindInfo->mLastCheckpoint);
|
aCheckpoint < gRewindInfo->mLastCheckpoint);
|
||||||
|
|
||||||
// Make sure we don't lose pending main thread callbacks due to rewinding.
|
// Make sure we don't lose pending main thread callbacks due to rewinding.
|
||||||
@ -82,8 +81,7 @@ void RestoreCheckpointAndResume(size_t aCheckpoint) {
|
|||||||
{
|
{
|
||||||
// Rewind heap memory to the target checkpoint, which must have been saved.
|
// Rewind heap memory to the target checkpoint, which must have been saved.
|
||||||
AutoDisallowMemoryChanges disallow;
|
AutoDisallowMemoryChanges disallow;
|
||||||
size_t newCheckpoint =
|
size_t newCheckpoint = gRewindInfo->mSavedCheckpoints.back().mCheckpoint;
|
||||||
gRewindInfo->mSavedCheckpoints.back().mCheckpoint;
|
|
||||||
RestoreMemoryToLastSavedCheckpoint();
|
RestoreMemoryToLastSavedCheckpoint();
|
||||||
while (aCheckpoint < newCheckpoint) {
|
while (aCheckpoint < newCheckpoint) {
|
||||||
gRewindInfo->mSavedCheckpoints.back().ReleaseContents();
|
gRewindInfo->mSavedCheckpoints.back().ReleaseContents();
|
||||||
@ -97,9 +95,8 @@ void RestoreCheckpointAndResume(size_t aCheckpoint) {
|
|||||||
FixupFreeRegionsAfterRewind();
|
FixupFreeRegionsAfterRewind();
|
||||||
|
|
||||||
double end = CurrentTime();
|
double end = CurrentTime();
|
||||||
PrintSpew("Restore #%d -> #%d %.2fs\n",
|
PrintSpew("Restore #%d -> #%d %.2fs\n", (int)gRewindInfo->mLastCheckpoint,
|
||||||
(int)gRewindInfo->mLastCheckpoint, (int)aCheckpoint,
|
(int)aCheckpoint, (end - start) / 1000000.0);
|
||||||
(end - start) / 1000000.0);
|
|
||||||
|
|
||||||
// Finally, let threads restore themselves to their stacks at the checkpoint
|
// Finally, let threads restore themselves to their stacks at the checkpoint
|
||||||
// we are rewinding to.
|
// we are rewinding to.
|
||||||
|
@ -76,8 +76,7 @@ struct SavedCheckpoint {
|
|||||||
size_t mCheckpoint;
|
size_t mCheckpoint;
|
||||||
SavedThreadStack mStacks[MaxRecordedThreadId];
|
SavedThreadStack mStacks[MaxRecordedThreadId];
|
||||||
|
|
||||||
explicit SavedCheckpoint(size_t aCheckpoint)
|
explicit SavedCheckpoint(size_t aCheckpoint) : mCheckpoint(aCheckpoint) {}
|
||||||
: mCheckpoint(aCheckpoint) {}
|
|
||||||
|
|
||||||
void ReleaseContents() {
|
void ReleaseContents() {
|
||||||
for (SavedThreadStack& stack : mStacks) {
|
for (SavedThreadStack& stack : mStacks) {
|
||||||
|
@ -224,9 +224,7 @@ void Channel::SendMessage(Message&& aMsg) {
|
|||||||
|
|
||||||
PrintMessage("SendMsg", aMsg);
|
PrintMessage("SendMsg", aMsg);
|
||||||
|
|
||||||
if (gSimulatedLatency &&
|
if (gSimulatedLatency && gSimulatedBandwidth && mSimulateDelays &&
|
||||||
gSimulatedBandwidth &&
|
|
||||||
mSimulateDelays &&
|
|
||||||
MessageSubjectToSimulatedDelay(aMsg.mType)) {
|
MessageSubjectToSimulatedDelay(aMsg.mType)) {
|
||||||
AutoEnsurePassThroughThreadEvents pt;
|
AutoEnsurePassThroughThreadEvents pt;
|
||||||
|
|
||||||
|
@ -150,8 +150,8 @@ static void ListenForCheckpointThreadMain(void*) {
|
|||||||
uint8_t data = 0;
|
uint8_t data = 0;
|
||||||
ssize_t rv = HANDLE_EINTR(read(gCheckpointReadFd, &data, 1));
|
ssize_t rv = HANDLE_EINTR(read(gCheckpointReadFd, &data, 1));
|
||||||
if (rv > 0) {
|
if (rv > 0) {
|
||||||
NS_DispatchToMainThread(NewRunnableFunction("NewCheckpoint",
|
NS_DispatchToMainThread(
|
||||||
NewCheckpoint));
|
NewRunnableFunction("NewCheckpoint", NewCheckpoint));
|
||||||
} else {
|
} else {
|
||||||
MOZ_RELEASE_ASSERT(errno == EIO);
|
MOZ_RELEASE_ASSERT(errno == EIO);
|
||||||
MOZ_RELEASE_ASSERT(HasDivergedFromRecording());
|
MOZ_RELEASE_ASSERT(HasDivergedFromRecording());
|
||||||
@ -488,8 +488,8 @@ static void PaintFromMainThread() {
|
|||||||
|
|
||||||
if (IsMainChild() && gDrawTargetBuffer) {
|
if (IsMainChild() && gDrawTargetBuffer) {
|
||||||
memcpy(gGraphicsShmem, gDrawTargetBuffer, gDrawTargetBufferSize);
|
memcpy(gGraphicsShmem, gDrawTargetBuffer, gDrawTargetBufferSize);
|
||||||
gChannel->SendMessage(PaintMessage(GetLastCheckpoint(),
|
gChannel->SendMessage(
|
||||||
gPaintWidth, gPaintHeight));
|
PaintMessage(GetLastCheckpoint(), gPaintWidth, gPaintHeight));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -313,9 +313,7 @@ void SetupDevtoolsSandbox() {
|
|||||||
InitializeScriptHits();
|
InitializeScriptHits();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool IsInitialized() {
|
bool IsInitialized() { return !!gReplay; }
|
||||||
return !!gReplay;
|
|
||||||
}
|
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
|
||||||
@ -574,8 +572,8 @@ static bool RecordReplay_AreThreadEventsDisallowed(JSContext* aCx,
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool RecordReplay_DivergeFromRecording(JSContext* aCx,
|
static bool RecordReplay_DivergeFromRecording(JSContext* aCx, unsigned aArgc,
|
||||||
unsigned aArgc, Value* aVp) {
|
Value* aVp) {
|
||||||
CallArgs args = CallArgsFromVp(aArgc, aVp);
|
CallArgs args = CallArgsFromVp(aArgc, aVp);
|
||||||
DivergeFromRecording();
|
DivergeFromRecording();
|
||||||
args.rval().setUndefined();
|
args.rval().setUndefined();
|
||||||
@ -585,7 +583,7 @@ static bool RecordReplay_DivergeFromRecording(JSContext* aCx,
|
|||||||
static bool RecordReplay_ProgressCounter(JSContext* aCx, unsigned aArgc,
|
static bool RecordReplay_ProgressCounter(JSContext* aCx, unsigned aArgc,
|
||||||
Value* aVp) {
|
Value* aVp) {
|
||||||
CallArgs args = CallArgsFromVp(aArgc, aVp);
|
CallArgs args = CallArgsFromVp(aArgc, aVp);
|
||||||
args.rval().setNumber((double) gProgressCounter);
|
args.rval().setNumber((double)gProgressCounter);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -765,8 +763,8 @@ struct ScriptHitInfo {
|
|||||||
// The most recent checkpoint prior to the hit.
|
// The most recent checkpoint prior to the hit.
|
||||||
uint32_t mCheckpoint;
|
uint32_t mCheckpoint;
|
||||||
|
|
||||||
// Index of the frame where the hit occurred, or UINT32_MAX if this represents
|
// Index of the frame where the hit occurred, or UINT32_MAX if this
|
||||||
// an aggregate set of hits after the checkpoint.
|
// represents an aggregate set of hits after the checkpoint.
|
||||||
uint32_t mFrameIndex;
|
uint32_t mFrameIndex;
|
||||||
|
|
||||||
// Progress counter when the hit occurred, invalid if this represents an
|
// Progress counter when the hit occurred, invalid if this represents an
|
||||||
@ -778,7 +776,8 @@ struct ScriptHitInfo {
|
|||||||
|
|
||||||
ScriptHit(uint32_t aCheckpoint, uint32_t aFrameIndex,
|
ScriptHit(uint32_t aCheckpoint, uint32_t aFrameIndex,
|
||||||
ProgressCounter aProgress)
|
ProgressCounter aProgress)
|
||||||
: mCheckpoint(aCheckpoint), mFrameIndex(aFrameIndex),
|
: mCheckpoint(aCheckpoint),
|
||||||
|
mFrameIndex(aFrameIndex),
|
||||||
mProgress(aProgress) {}
|
mProgress(aProgress) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -801,13 +800,14 @@ struct ScriptHitInfo {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static bool match(const ScriptHitKey& aFirst, const ScriptHitKey& aSecond) {
|
static bool match(const ScriptHitKey& aFirst, const ScriptHitKey& aSecond) {
|
||||||
return aFirst.mScript == aSecond.mScript
|
return aFirst.mScript == aSecond.mScript &&
|
||||||
&& aFirst.mOffset == aSecond.mOffset;
|
aFirst.mOffset == aSecond.mOffset;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef HashMap<ScriptHitKey, ScriptHitChunk*, ScriptHitKey,
|
typedef HashMap<ScriptHitKey, ScriptHitChunk*, ScriptHitKey,
|
||||||
AllocPolicy<MemoryKind::ScriptHits>> ScriptHitMap;
|
AllocPolicy<MemoryKind::ScriptHits>>
|
||||||
|
ScriptHitMap;
|
||||||
ScriptHitMap mTable;
|
ScriptHitMap mTable;
|
||||||
ScriptHitChunk* mFreeChunk;
|
ScriptHitChunk* mFreeChunk;
|
||||||
|
|
||||||
@ -871,8 +871,7 @@ static bool RecordReplay_AddScriptHit(JSContext* aCx, unsigned aArgc,
|
|||||||
Value* aVp) {
|
Value* aVp) {
|
||||||
CallArgs args = CallArgsFromVp(aArgc, aVp);
|
CallArgs args = CallArgsFromVp(aArgc, aVp);
|
||||||
|
|
||||||
if (!args.get(0).isNumber() ||
|
if (!args.get(0).isNumber() || !args.get(1).isNumber() ||
|
||||||
!args.get(1).isNumber() ||
|
|
||||||
!args.get(2).isNumber()) {
|
!args.get(2).isNumber()) {
|
||||||
JS_ReportErrorASCII(aCx, "Bad parameters");
|
JS_ReportErrorASCII(aCx, "Bad parameters");
|
||||||
return false;
|
return false;
|
||||||
@ -909,12 +908,12 @@ static bool RecordReplay_FindScriptHits(JSContext* aCx, unsigned aArgc,
|
|||||||
if (hit.mCheckpoint) {
|
if (hit.mCheckpoint) {
|
||||||
RootedObject hitObject(aCx, JS_NewObject(aCx, nullptr));
|
RootedObject hitObject(aCx, JS_NewObject(aCx, nullptr));
|
||||||
if (!hitObject ||
|
if (!hitObject ||
|
||||||
!JS_DefineProperty(aCx, hitObject, "checkpoint",
|
!JS_DefineProperty(aCx, hitObject, "checkpoint", hit.mCheckpoint,
|
||||||
hit.mCheckpoint, JSPROP_ENUMERATE) ||
|
JSPROP_ENUMERATE) ||
|
||||||
!JS_DefineProperty(aCx, hitObject, "progress",
|
!JS_DefineProperty(aCx, hitObject, "progress",
|
||||||
(double) hit.mProgress, JSPROP_ENUMERATE) ||
|
(double)hit.mProgress, JSPROP_ENUMERATE) ||
|
||||||
!JS_DefineProperty(aCx, hitObject, "frameIndex",
|
!JS_DefineProperty(aCx, hitObject, "frameIndex", hit.mFrameIndex,
|
||||||
hit.mFrameIndex, JSPROP_ENUMERATE) ||
|
JSPROP_ENUMERATE) ||
|
||||||
!values.append(ObjectValue(*hitObject))) {
|
!values.append(ObjectValue(*hitObject))) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -21,7 +21,7 @@ namespace recordreplay {
|
|||||||
struct Message;
|
struct Message;
|
||||||
|
|
||||||
namespace parent {
|
namespace parent {
|
||||||
class ChildProcessInfo;
|
class ChildProcessInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace js {
|
namespace js {
|
||||||
|
@ -105,9 +105,9 @@ LauncherVoidResult LauncherRegistryInfo::ReflectTelemetryPrefToRegistry(
|
|||||||
|
|
||||||
DWORD value = aEnable ? 1UL : 0UL;
|
DWORD value = aEnable ? 1UL : 0UL;
|
||||||
DWORD len = sizeof(value);
|
DWORD len = sizeof(value);
|
||||||
LSTATUS result = ::RegSetValueExW(mRegKey.get(), valueName.c_str(), 0,
|
LSTATUS result =
|
||||||
REG_DWORD, reinterpret_cast<PBYTE>(&value),
|
::RegSetValueExW(mRegKey.get(), valueName.c_str(), 0, REG_DWORD,
|
||||||
len);
|
reinterpret_cast<PBYTE>(&value), len);
|
||||||
if (result != ERROR_SUCCESS) {
|
if (result != ERROR_SUCCESS) {
|
||||||
return LAUNCHER_ERROR_FROM_WIN32(result);
|
return LAUNCHER_ERROR_FROM_WIN32(result);
|
||||||
}
|
}
|
||||||
@ -443,9 +443,9 @@ LauncherResult<bool> LauncherRegistryInfo::GetTelemetrySetting() {
|
|||||||
DWORD value;
|
DWORD value;
|
||||||
DWORD valueLen = sizeof(value);
|
DWORD valueLen = sizeof(value);
|
||||||
DWORD type;
|
DWORD type;
|
||||||
LSTATUS result = ::RegQueryValueExW(
|
LSTATUS result =
|
||||||
mRegKey.get(), telemetryValueName.c_str(), nullptr, &type,
|
::RegQueryValueExW(mRegKey.get(), telemetryValueName.c_str(), nullptr,
|
||||||
reinterpret_cast<PBYTE>(&value), &valueLen);
|
&type, reinterpret_cast<PBYTE>(&value), &valueLen);
|
||||||
if (result == ERROR_FILE_NOT_FOUND) {
|
if (result == ERROR_FILE_NOT_FOUND) {
|
||||||
// Value does not exist, treat as false
|
// Value does not exist, treat as false
|
||||||
return false;
|
return false;
|
||||||
|
@ -43,9 +43,9 @@ class LauncherRegistryInfo final {
|
|||||||
LauncherResult<EnabledState> IsEnabled();
|
LauncherResult<EnabledState> IsEnabled();
|
||||||
LauncherResult<bool> IsTelemetryEnabled();
|
LauncherResult<bool> IsTelemetryEnabled();
|
||||||
LauncherVoidResult ReflectTelemetryPrefToRegistry(const bool aEnable);
|
LauncherVoidResult ReflectTelemetryPrefToRegistry(const bool aEnable);
|
||||||
LauncherResult<ProcessType> Check(const ProcessType aDesiredType,
|
LauncherResult<ProcessType> Check(
|
||||||
const CheckOption aOption =
|
const ProcessType aDesiredType,
|
||||||
CheckOption::Default);
|
const CheckOption aOption = CheckOption::Default);
|
||||||
LauncherVoidResult DisableDueToFailure();
|
LauncherVoidResult DisableDueToFailure();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -407,7 +407,7 @@ NS_IMETHODIMP nsExtProtocolChannel::SetClassifierMatchedInfo(
|
|||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP nsExtProtocolChannel::SetClassifierMatchedTrackingInfo(
|
NS_IMETHODIMP nsExtProtocolChannel::SetClassifierMatchedTrackingInfo(
|
||||||
const nsACString &aLists, const nsACString &aFullHashes) {
|
const nsACString& aLists, const nsACString& aFullHashes) {
|
||||||
// nothing to do
|
// nothing to do
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
@ -236,17 +236,18 @@ void GfxInfo::AddCrashReportAnnotations() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// We don't support checking driver versions on Mac.
|
// We don't support checking driver versions on Mac.
|
||||||
#define IMPLEMENT_MAC_DRIVER_BLOCKLIST(os, vendor, driverVendor, device, features, blockOn, ruleId) \
|
#define IMPLEMENT_MAC_DRIVER_BLOCKLIST(os, vendor, driverVendor, device, features, blockOn, \
|
||||||
APPEND_TO_DRIVER_BLOCKLIST(os, vendor, driverVendor, device, features, blockOn, DRIVER_COMPARISON_IGNORED, \
|
ruleId) \
|
||||||
V(0, 0, 0, 0), ruleId, "")
|
APPEND_TO_DRIVER_BLOCKLIST(os, vendor, driverVendor, device, features, blockOn, \
|
||||||
|
DRIVER_COMPARISON_IGNORED, V(0, 0, 0, 0), ruleId, "")
|
||||||
|
|
||||||
const nsTArray<GfxDriverInfo>& GfxInfo::GetGfxDriverInfo() {
|
const nsTArray<GfxDriverInfo>& GfxInfo::GetGfxDriverInfo() {
|
||||||
if (!sDriverInfo->Length()) {
|
if (!sDriverInfo->Length()) {
|
||||||
IMPLEMENT_MAC_DRIVER_BLOCKLIST(
|
IMPLEMENT_MAC_DRIVER_BLOCKLIST(
|
||||||
OperatingSystem::OSX, (nsAString&)GfxDriverInfo::GetDeviceVendor(VendorATI),
|
OperatingSystem::OSX, (nsAString&)GfxDriverInfo::GetDeviceVendor(VendorATI),
|
||||||
(nsAString&)GfxDriverInfo::GetDriverVendor(DriverVendorAll),
|
(nsAString&)GfxDriverInfo::GetDriverVendor(DriverVendorAll), GfxDriverInfo::allDevices,
|
||||||
GfxDriverInfo::allDevices, nsIGfxInfo::FEATURE_WEBGL_MSAA,
|
nsIGfxInfo::FEATURE_WEBGL_MSAA, nsIGfxInfo::FEATURE_BLOCKED_OS_VERSION,
|
||||||
nsIGfxInfo::FEATURE_BLOCKED_OS_VERSION, "FEATURE_FAILURE_MAC_ATI_NO_MSAA");
|
"FEATURE_FAILURE_MAC_ATI_NO_MSAA");
|
||||||
IMPLEMENT_MAC_DRIVER_BLOCKLIST(
|
IMPLEMENT_MAC_DRIVER_BLOCKLIST(
|
||||||
OperatingSystem::OSX, (nsAString&)GfxDriverInfo::GetDeviceVendor(VendorATI),
|
OperatingSystem::OSX, (nsAString&)GfxDriverInfo::GetDeviceVendor(VendorATI),
|
||||||
(nsAString&)GfxDriverInfo::GetDriverVendor(DriverVendorAll),
|
(nsAString&)GfxDriverInfo::GetDriverVendor(DriverVendorAll),
|
||||||
|
@ -55,11 +55,7 @@ class nsMacUtilsImpl final : public nsIMacUtils {
|
|||||||
static StaticMutex sCachedAppPathMutex;
|
static StaticMutex sCachedAppPathMutex;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
enum TCSMStatus {
|
enum TCSMStatus { TCSM_Unknown = 0, TCSM_Available, TCSM_Unavailable };
|
||||||
TCSM_Unknown = 0,
|
|
||||||
TCSM_Available,
|
|
||||||
TCSM_Unavailable
|
|
||||||
};
|
|
||||||
static mozilla::Atomic<nsMacUtilsImpl::TCSMStatus> sTCSMStatus;
|
static mozilla::Atomic<nsMacUtilsImpl::TCSMStatus> sTCSMStatus;
|
||||||
|
|
||||||
static nsresult EnableTCSM();
|
static nsresult EnableTCSM();
|
||||||
|
@ -169,11 +169,12 @@ nsresult GetHDDInfo(const char* aSpecialDirName, nsAutoCString& aModel,
|
|||||||
bytesRead = 0;
|
bytesRead = 0;
|
||||||
DEVICE_SEEK_PENALTY_DESCRIPTOR seekPenaltyDescriptor = {
|
DEVICE_SEEK_PENALTY_DESCRIPTOR seekPenaltyDescriptor = {
|
||||||
sizeof(DEVICE_SEEK_PENALTY_DESCRIPTOR)};
|
sizeof(DEVICE_SEEK_PENALTY_DESCRIPTOR)};
|
||||||
if (::DeviceIoControl(handle, IOCTL_STORAGE_QUERY_PROPERTY, &queryParameters,
|
if (::DeviceIoControl(handle, IOCTL_STORAGE_QUERY_PROPERTY,
|
||||||
sizeof(queryParameters), &seekPenaltyDescriptor,
|
&queryParameters, sizeof(queryParameters),
|
||||||
sizeof(seekPenaltyDescriptor), &bytesRead, nullptr)) {
|
&seekPenaltyDescriptor, sizeof(seekPenaltyDescriptor),
|
||||||
// It is possible that the disk has TrimEnabled, but also IncursSeekPenalty;
|
&bytesRead, nullptr)) {
|
||||||
// In this case, this is an HDD
|
// It is possible that the disk has TrimEnabled, but also
|
||||||
|
// IncursSeekPenalty; In this case, this is an HDD
|
||||||
if (seekPenaltyDescriptor.IncursSeekPenalty) {
|
if (seekPenaltyDescriptor.IncursSeekPenalty) {
|
||||||
isSSD = false;
|
isSSD = false;
|
||||||
}
|
}
|
||||||
|
@ -1695,12 +1695,12 @@ nsresult nsLocalFile::CopySingleFile(nsIFile* aSourceFile, nsIFile* aDestParent,
|
|||||||
|
|
||||||
// Pass the flag COPY_FILE_NO_BUFFERING to CopyFileEx as we may be copying
|
// Pass the flag COPY_FILE_NO_BUFFERING to CopyFileEx as we may be copying
|
||||||
// to a SMBV2 remote drive. Without this parameter subsequent append mode
|
// to a SMBV2 remote drive. Without this parameter subsequent append mode
|
||||||
// file writes can cause the resultant file to become corrupt. We only need to
|
// file writes can cause the resultant file to become corrupt. We only need
|
||||||
// do this if the major version of Windows is > 5(Only Windows Vista and above
|
// to do this if the major version of Windows is > 5(Only Windows Vista and
|
||||||
// can support SMBV2). With a 7200RPM hard drive:
|
// above can support SMBV2). With a 7200RPM hard drive: Copying a 1KB file
|
||||||
// Copying a 1KB file with COPY_FILE_NO_BUFFERING takes about 30-60ms.
|
// with COPY_FILE_NO_BUFFERING takes about 30-60ms. Copying a 1KB file
|
||||||
// Copying a 1KB file without COPY_FILE_NO_BUFFERING takes < 1ms.
|
// without COPY_FILE_NO_BUFFERING takes < 1ms. So we only use
|
||||||
// So we only use COPY_FILE_NO_BUFFERING when we have a remote drive.
|
// COPY_FILE_NO_BUFFERING when we have a remote drive.
|
||||||
DWORD dwCopyFlags = COPY_FILE_ALLOW_DECRYPTED_DESTINATION;
|
DWORD dwCopyFlags = COPY_FILE_ALLOW_DECRYPTED_DESTINATION;
|
||||||
bool path1Remote, path2Remote;
|
bool path1Remote, path2Remote;
|
||||||
if (!IsRemoteFilePath(filePath.get(), path1Remote) ||
|
if (!IsRemoteFilePath(filePath.get(), path1Remote) ||
|
||||||
|
@ -14,10 +14,9 @@
|
|||||||
|
|
||||||
using namespace mozilla;
|
using namespace mozilla;
|
||||||
|
|
||||||
void PrioritizedEventQueue::PutEvent(
|
void PrioritizedEventQueue::PutEvent(already_AddRefed<nsIRunnable>&& aEvent,
|
||||||
already_AddRefed<nsIRunnable>&& aEvent, EventQueuePriority aPriority,
|
EventQueuePriority aPriority,
|
||||||
const MutexAutoLock& aProofOfLock) {
|
const MutexAutoLock& aProofOfLock) {
|
||||||
|
|
||||||
// Double check the priority with a QI.
|
// Double check the priority with a QI.
|
||||||
RefPtr<nsIRunnable> event(aEvent);
|
RefPtr<nsIRunnable> event(aEvent);
|
||||||
EventQueuePriority priority = aPriority;
|
EventQueuePriority priority = aPriority;
|
||||||
@ -256,8 +255,7 @@ already_AddRefed<nsIRunnable> PrioritizedEventQueue::GetEvent(
|
|||||||
return event.forget();
|
return event.forget();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool PrioritizedEventQueue::IsEmpty(
|
bool PrioritizedEventQueue::IsEmpty(const MutexAutoLock& aProofOfLock) {
|
||||||
const MutexAutoLock& aProofOfLock) {
|
|
||||||
// Just check IsEmpty() on the sub-queues. Don't bother checking the idle
|
// Just check IsEmpty() on the sub-queues. Don't bother checking the idle
|
||||||
// deadline since that only determines whether an idle event is ready or not.
|
// deadline since that only determines whether an idle event is ready or not.
|
||||||
return mHighQueue->IsEmpty(aProofOfLock) &&
|
return mHighQueue->IsEmpty(aProofOfLock) &&
|
||||||
@ -268,8 +266,7 @@ bool PrioritizedEventQueue::IsEmpty(
|
|||||||
mIdleQueue->IsEmpty(aProofOfLock);
|
mIdleQueue->IsEmpty(aProofOfLock);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool PrioritizedEventQueue::HasReadyEvent(
|
bool PrioritizedEventQueue::HasReadyEvent(const MutexAutoLock& aProofOfLock) {
|
||||||
const MutexAutoLock& aProofOfLock) {
|
|
||||||
mHasPendingEventsPromisedIdleEvent = false;
|
mHasPendingEventsPromisedIdleEvent = false;
|
||||||
|
|
||||||
EventQueuePriority queue = SelectQueue(false, aProofOfLock);
|
EventQueuePriority queue = SelectQueue(false, aProofOfLock);
|
||||||
@ -309,8 +306,7 @@ bool PrioritizedEventQueue::HasPendingHighPriorityEvents(
|
|||||||
return !mHighQueue->IsEmpty(aProofOfLock);
|
return !mHighQueue->IsEmpty(aProofOfLock);
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t PrioritizedEventQueue::Count(
|
size_t PrioritizedEventQueue::Count(const MutexAutoLock& aProofOfLock) const {
|
||||||
const MutexAutoLock& aProofOfLock) const {
|
|
||||||
MOZ_CRASH("unimplemented");
|
MOZ_CRASH("unimplemented");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -254,8 +254,7 @@ class ThrottledEventQueue::Inner final : public nsISupports {
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
static already_AddRefed<Inner> Create(nsISerialEventTarget* aBaseTarget,
|
static already_AddRefed<Inner> Create(nsISerialEventTarget* aBaseTarget,
|
||||||
const char* aName,
|
const char* aName, uint32_t aPriority) {
|
||||||
uint32_t aPriority) {
|
|
||||||
MOZ_ASSERT(NS_IsMainThread());
|
MOZ_ASSERT(NS_IsMainThread());
|
||||||
MOZ_ASSERT(ClearOnShutdown_Internal::sCurrentShutdownPhase ==
|
MOZ_ASSERT(ClearOnShutdown_Internal::sCurrentShutdownPhase ==
|
||||||
ShutdownPhase::NotInShutdown);
|
ShutdownPhase::NotInShutdown);
|
||||||
|
@ -68,8 +68,7 @@ class ThrottledEventQueue final : public nsISerialEventTarget {
|
|||||||
public:
|
public:
|
||||||
// Create a ThrottledEventQueue for the given target.
|
// Create a ThrottledEventQueue for the given target.
|
||||||
static already_AddRefed<ThrottledEventQueue> Create(
|
static already_AddRefed<ThrottledEventQueue> Create(
|
||||||
nsISerialEventTarget* aBaseTarget,
|
nsISerialEventTarget* aBaseTarget, const char* aName,
|
||||||
const char* aName,
|
|
||||||
uint32_t aPriority = nsIRunnablePriority::PRIORITY_NORMAL);
|
uint32_t aPriority = nsIRunnablePriority::PRIORITY_NORMAL);
|
||||||
|
|
||||||
// Determine if there are any events pending in the queue.
|
// Determine if there are any events pending in the queue.
|
||||||
|
Loading…
Reference in New Issue
Block a user