Closed
Bug 1435637
Opened 7 years ago
Closed 7 years ago
Minimally cleanup nsRefreshDriver.
Categories
(Core :: Layout, enhancement)
Core
Layout
Tracking
()
RESOLVED
FIXED
mozilla60
Tracking | Status | |
---|---|---|
firefox60 | --- | fixed |
People
(Reporter: emilio, Assigned: emilio)
Details
Attachments
(1 file)
Just use more ranged loops on locals and such.
Comment hidden (mozreview-request) |
Assignee | ||
Comment 2•7 years ago
|
||
mozreview-review |
Comment on attachment 8948284 [details]
Bug 1435637: Minimally tidy nsRefreshDriver.
https://reviewboard.mozilla.org/r/217784/#review223508
::: layout/base/nsRefreshDriver.cpp:1863
(Diff revision 1)
>
> // Resize events should be fired before layout flushes or
> // calling animation frame callbacks.
> AutoTArray<nsIPresShell*, 16> observers;
> observers.AppendElements(mResizeEventFlushObservers);
> - for (uint32_t i = observers.Length(); i; --i) {
> + for (nsIPresShell* shell : observers) {
This needs to use Reversed.
Comment hidden (mozreview-request) |
Comment 4•7 years ago
|
||
mozreview-review |
Comment on attachment 8948284 [details]
Bug 1435637: Minimally tidy nsRefreshDriver.
https://reviewboard.mozilla.org/r/217784/#review223510
::: layout/base/nsRefreshDriver.cpp:1641
(Diff revision 2)
> // Hold all AnimationEventDispatcher in mAnimationEventFlushObservers as
> // a RefPtr<> array since each AnimationEventDispatcher might be destroyed
> // during processing the previous dispatcher.
> - size_t len = mAnimationEventFlushObservers.Length();
> AutoTArray<RefPtr<AnimationEventDispatcher>, 16> dispatchers;
> - RefPtr<AnimationEventDispatcher>* elems = dispatchers.AppendElements(len);
> + dispatchers.AppendElements(mAnimationEventFlushObservers);
Oh, I didn't know that AppendElements works between RefPtr<> and raw pointer.
::: layout/base/nsRefreshDriver.cpp:1975
(Diff revision 2)
> }
>
> #ifdef MOZ_XUL
> // Update any popups that may need to be moved or hidden due to their
> // anchor changing.
> - nsXULPopupManager* pm = nsXULPopupManager::GetInstance();
> + if (nsXULPopupManager* pm = nsXULPopupManager::GetInstance()) {
Though this isn't related to this bug, I am OK with this. :)
Attachment #8948284 -
Flags: review?(hikezoe) → review+
Pushed by ecoal95@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/b3319e229c7d
Minimally tidy nsRefreshDriver. r=hiro
Comment 6•7 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox60:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla60
You need to log in
before you can comment on or make changes to this bug.
Description
•