mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1038727 - Convert APZ from nsAutoPtr to UniquePtr. r=kats
--HG-- rename : browser/components/loop/content/shared/js/views.jsx => browser/components/loop/content/shared/js/views.js rename : toolkit/webapps/tests/test_custom_origin_uninstall_install.xul => toolkit/webapps/tests/test_custom_origin.xul extra : rebase_source : 2448597696cbf24512b54b6acbdfb52b71995dde
This commit is contained in:
parent
60e200d97f
commit
af1d060475
@ -1950,9 +1950,9 @@ void AsyncPanZoomController::RequestContentRepaint(FrameMetrics& aFrameMetrics)
|
||||
SendAsyncScrollEvent();
|
||||
mPaintThrottler.PostTask(
|
||||
FROM_HERE,
|
||||
NewRunnableMethod(this,
|
||||
UniquePtr<CancelableTask>(NewRunnableMethod(this,
|
||||
&AsyncPanZoomController::DispatchRepaintRequest,
|
||||
aFrameMetrics),
|
||||
aFrameMetrics)),
|
||||
GetFrameTime());
|
||||
|
||||
aFrameMetrics.SetPresShellId(mLastContentPaintMetrics.GetPresShellId());
|
||||
|
@ -18,7 +18,7 @@ TaskThrottler::TaskThrottler(const TimeStamp& aTimeStamp)
|
||||
|
||||
void
|
||||
TaskThrottler::PostTask(const tracked_objects::Location& aLocation,
|
||||
CancelableTask* aTask, const TimeStamp& aTimeStamp)
|
||||
UniquePtr<CancelableTask> aTask, const TimeStamp& aTimeStamp)
|
||||
{
|
||||
aTask->SetBirthPlace(aLocation);
|
||||
|
||||
@ -26,11 +26,10 @@ TaskThrottler::PostTask(const tracked_objects::Location& aLocation,
|
||||
if (mQueuedTask) {
|
||||
mQueuedTask->Cancel();
|
||||
}
|
||||
mQueuedTask = aTask;
|
||||
mQueuedTask = Move(aTask);
|
||||
} else {
|
||||
mStartTime = aTimeStamp;
|
||||
aTask->Run();
|
||||
delete aTask;
|
||||
mOutstanding = true;
|
||||
}
|
||||
}
|
||||
|
@ -12,7 +12,7 @@
|
||||
#include "mozilla/TimeStamp.h" // for TimeDuration, TimeStamp
|
||||
#include "mozilla/RollingMean.h" // for RollingMean
|
||||
#include "mozilla/mozalloc.h" // for operator delete
|
||||
#include "nsAutoPtr.h" // for nsAutoPtr
|
||||
#include "mozilla/UniquePtr.h" // for UniquePtr
|
||||
#include "nsTArray.h" // for nsTArray
|
||||
|
||||
namespace tracked_objects {
|
||||
@ -47,7 +47,7 @@ public:
|
||||
* obsolete or the TaskThrottler is destructed.
|
||||
*/
|
||||
void PostTask(const tracked_objects::Location& aLocation,
|
||||
CancelableTask* aTask, const TimeStamp& aTimeStamp);
|
||||
UniquePtr<CancelableTask> aTask, const TimeStamp& aTimeStamp);
|
||||
/**
|
||||
* Mark the task as complete and process the next queued task.
|
||||
*/
|
||||
@ -90,7 +90,7 @@ public:
|
||||
|
||||
private:
|
||||
bool mOutstanding;
|
||||
nsAutoPtr<CancelableTask> mQueuedTask;
|
||||
UniquePtr<CancelableTask> mQueuedTask;
|
||||
TimeStamp mStartTime;
|
||||
RollingMean<TimeDuration, TimeDuration> mMean;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user