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