mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-07 18:04:46 +00:00
Bug 1287006 - Don't pass Maybe by value in miscellaneous places. r=froydnj
--HG-- extra : rebase_source : 145f2fc605ff917d3067826a9daebdce07bde02a
This commit is contained in:
parent
965f401e22
commit
ca2e1ac4c0
@ -574,7 +574,7 @@ class FulfillUnregisterPromiseRunnable final : public WorkerRunnable
|
||||
Maybe<bool> mState;
|
||||
public:
|
||||
FulfillUnregisterPromiseRunnable(PromiseWorkerProxy* aProxy,
|
||||
Maybe<bool> aState)
|
||||
const Maybe<bool>& aState)
|
||||
: WorkerRunnable(aProxy->GetWorkerPrivate())
|
||||
, mPromiseWorkerProxy(aProxy)
|
||||
, mState(aState)
|
||||
@ -631,7 +631,7 @@ private:
|
||||
{}
|
||||
|
||||
void
|
||||
Finish(Maybe<bool> aState)
|
||||
Finish(const Maybe<bool>& aState)
|
||||
{
|
||||
AssertIsOnMainThread();
|
||||
if (!mPromiseWorkerProxy) {
|
||||
|
@ -56,7 +56,7 @@ struct DecoderFinalStatus final
|
||||
|
||||
struct DecoderTelemetry final
|
||||
{
|
||||
DecoderTelemetry(Maybe<Telemetry::ID> aSpeedHistogram,
|
||||
DecoderTelemetry(const Maybe<Telemetry::ID>& aSpeedHistogram,
|
||||
size_t aBytesDecoded,
|
||||
uint32_t aChunkCount,
|
||||
TimeDuration aDecodeTime)
|
||||
|
@ -376,10 +376,10 @@ CheckGeneratedPalettedImage(Decoder* aDecoder, const IntRect& aRect)
|
||||
void
|
||||
CheckWritePixels(Decoder* aDecoder,
|
||||
SurfaceFilter* aFilter,
|
||||
Maybe<IntRect> aOutputRect /* = Nothing() */,
|
||||
Maybe<IntRect> aInputRect /* = Nothing() */,
|
||||
Maybe<IntRect> aInputWriteRect /* = Nothing() */,
|
||||
Maybe<IntRect> aOutputWriteRect /* = Nothing() */,
|
||||
const Maybe<IntRect>& aOutputRect /* = Nothing() */,
|
||||
const Maybe<IntRect>& aInputRect /* = Nothing() */,
|
||||
const Maybe<IntRect>& aInputWriteRect /* = Nothing() */,
|
||||
const Maybe<IntRect>& aOutputWriteRect /* = Nothing() */,
|
||||
uint8_t aFuzz /* = 0 */)
|
||||
{
|
||||
IntRect outputRect = aOutputRect.valueOr(IntRect(0, 0, 100, 100));
|
||||
@ -423,10 +423,10 @@ CheckWritePixels(Decoder* aDecoder,
|
||||
void
|
||||
CheckPalettedWritePixels(Decoder* aDecoder,
|
||||
SurfaceFilter* aFilter,
|
||||
Maybe<IntRect> aOutputRect /* = Nothing() */,
|
||||
Maybe<IntRect> aInputRect /* = Nothing() */,
|
||||
Maybe<IntRect> aInputWriteRect /* = Nothing() */,
|
||||
Maybe<IntRect> aOutputWriteRect /* = Nothing() */,
|
||||
const Maybe<IntRect>& aOutputRect /* = Nothing() */,
|
||||
const Maybe<IntRect>& aInputRect /* = Nothing() */,
|
||||
const Maybe<IntRect>& aInputWriteRect /* = Nothing() */,
|
||||
const Maybe<IntRect>& aOutputWriteRect /* = Nothing() */,
|
||||
uint8_t aFuzz /* = 0 */)
|
||||
{
|
||||
IntRect outputRect = aOutputRect.valueOr(IntRect(0, 0, 100, 100));
|
||||
|
@ -354,10 +354,10 @@ void CheckGeneratedPalettedImage(Decoder* aDecoder, const gfx::IntRect& aRect);
|
||||
*/
|
||||
void CheckWritePixels(Decoder* aDecoder,
|
||||
SurfaceFilter* aFilter,
|
||||
Maybe<gfx::IntRect> aOutputRect = Nothing(),
|
||||
Maybe<gfx::IntRect> aInputRect = Nothing(),
|
||||
Maybe<gfx::IntRect> aInputWriteRect = Nothing(),
|
||||
Maybe<gfx::IntRect> aOutputWriteRect = Nothing(),
|
||||
const Maybe<gfx::IntRect>& aOutputRect = Nothing(),
|
||||
const Maybe<gfx::IntRect>& aInputRect = Nothing(),
|
||||
const Maybe<gfx::IntRect>& aInputWriteRect = Nothing(),
|
||||
const Maybe<gfx::IntRect>& aOutputWriteRect = Nothing(),
|
||||
uint8_t aFuzz = 0);
|
||||
|
||||
/**
|
||||
@ -367,10 +367,10 @@ void CheckWritePixels(Decoder* aDecoder,
|
||||
*/
|
||||
void CheckPalettedWritePixels(Decoder* aDecoder,
|
||||
SurfaceFilter* aFilter,
|
||||
Maybe<gfx::IntRect> aOutputRect = Nothing(),
|
||||
Maybe<gfx::IntRect> aInputRect = Nothing(),
|
||||
Maybe<gfx::IntRect> aInputWriteRect = Nothing(),
|
||||
Maybe<gfx::IntRect> aOutputWriteRect = Nothing(),
|
||||
const Maybe<gfx::IntRect>& aOutputRect = Nothing(),
|
||||
const Maybe<gfx::IntRect>& aInputRect = Nothing(),
|
||||
const Maybe<gfx::IntRect>& aInputWriteRect = Nothing(),
|
||||
const Maybe<gfx::IntRect>& aOutputWriteRect = Nothing(),
|
||||
uint8_t aFuzz = 0);
|
||||
|
||||
|
||||
|
@ -2254,7 +2254,7 @@ nsWindowWatcher::SizeOpenedWindow(nsIDocShellTreeOwner* aTreeOwner,
|
||||
mozIDOMWindowProxy* aParent,
|
||||
bool aIsCallerChrome,
|
||||
const SizeSpec& aSizeSpec,
|
||||
Maybe<float> aOpenerFullZoom)
|
||||
const Maybe<float>& aOpenerFullZoom)
|
||||
{
|
||||
// We should only be sizing top-level windows if we're in the parent
|
||||
// process.
|
||||
|
@ -117,7 +117,7 @@ protected:
|
||||
mozIDOMWindowProxy* aParent,
|
||||
bool aIsCallerChrome,
|
||||
const SizeSpec& aSizeSpec,
|
||||
mozilla::Maybe<float> aOpenerFullZoom =
|
||||
const mozilla::Maybe<float>& aOpenerFullZoom =
|
||||
mozilla::Nothing());
|
||||
static void GetWindowTreeItem(mozIDOMWindowProxy* aWindow,
|
||||
nsIDocShellTreeItem** aResult);
|
||||
|
@ -114,7 +114,7 @@ public:
|
||||
{ }
|
||||
|
||||
void readType(const char* keyedBy, const char* name,
|
||||
const char* location, Maybe<unsigned> lineno) override {
|
||||
const char* location, const Maybe<unsigned>& lineno) override {
|
||||
if (!mStartedTypeList) {
|
||||
mStartedTypeList = true;
|
||||
mWriter.StartObjectElement();
|
||||
|
@ -1373,7 +1373,7 @@ GfxInfoBase::InitFeatureObject(JSContext* aCx,
|
||||
JS::Handle<JSObject*> aContainer,
|
||||
const char* aName,
|
||||
int32_t aFeature,
|
||||
Maybe<mozilla::gfx::FeatureStatus> aFeatureStatus,
|
||||
const Maybe<mozilla::gfx::FeatureStatus>& aFeatureStatus,
|
||||
JS::MutableHandle<JSObject*> aOutObj)
|
||||
{
|
||||
JS::Rooted<JSObject*> obj(aCx, JS_NewPlainObject(aCx));
|
||||
|
@ -118,7 +118,7 @@ protected:
|
||||
JS::Handle<JSObject*> aContainer,
|
||||
const char* aName,
|
||||
int32_t aFeature,
|
||||
Maybe<mozilla::gfx::FeatureStatus> aKnownStatus,
|
||||
const Maybe<mozilla::gfx::FeatureStatus>& aKnownStatus,
|
||||
JS::MutableHandle<JSObject*> aOutObj);
|
||||
|
||||
NS_IMETHOD ControlGPUProcessForXPCShell(bool aEnable, bool *_retval) override;
|
||||
|
Loading…
Reference in New Issue
Block a user