Closed Bug 1368252 Opened 7 years ago Closed 7 years ago

Check NS_FRAME_HAS_LAYER_ACTIVITY_PROPERTY bit before looking up the LayerActivityProperty()

Categories

(Core :: Layout, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla55
Tracking Status
firefox55 --- fixed

People

(Reporter: jfkthame, Assigned: jfkthame)

Details

Attachments

(1 file)

From bug 1365982 comment 14:
----------------------------
>layout/painting/ActiveLayerTracker.cpp
> static LayerActivity*
> GetLayerActivity(nsIFrame* aFrame)
> {
>   if (!aFrame->HasAnyStateBits(NS_FRAME_HAS_LAYER_ACTIVITY_PROPERTY)) {
>     return nullptr;
>   }
>+  return aFrame->GetProperty(LayerActivityProperty());
> }
> 
> static LayerActivity*
> GetLayerActivityForUpdate(nsIFrame* aFrame)
> {
>+  LayerActivity* layerActivity = aFrame->GetProperty(LayerActivityProperty());
>   if (layerActivity) {

We should probably check NS_FRAME_HAS_LAYER_ACTIVITY_PROPERTY before
calling GetProperty() in GetLayerActivityForUpdate?
Maybe they meant to call GetLayerActivity(aFrame) ?
----------------------------

Yes, looks like calling GetLayerActivity(aFrame) here would be the most logical thing.
Assignee: nobody → jfkthame
Status: NEW → ASSIGNED
Attachment #8872084 - Flags: review?(mats) → review+
Pushed by jkew@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/dc315bf0beb3
Call GetLayerActivity() instead of directly looking up frame's LayerActivityProperty(). r=mats
https://hg.mozilla.org/integration/mozilla-inbound/rev/dc315bf0beb37b169a427de86bc233f98f06c854
Bug 1368252 - Call GetLayerActivity() instead of directly looking up frame's LayerActivityProperty(). r=mats
https://hg.mozilla.org/mozilla-central/rev/dc315bf0beb3
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: