Check NS_FRAME_HAS_LAYER_ACTIVITY_PROPERTY bit before looking up the LayerActivityProperty()

RESOLVED FIXED in Firefox 55

Status

()

enhancement
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: jfkthame, Assigned: jfkthame)

Tracking

unspecified
mozilla55
Points:
---

Firefox Tracking Flags

(firefox55 fixed)

Details

Attachments

(1 attachment)

Assignee

Description

2 years ago
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

Updated

2 years ago
Assignee: nobody → jfkthame
Status: NEW → ASSIGNED

Updated

2 years ago
Attachment #8872084 - Flags: review?(mats) → review+

Comment 2

2 years ago
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
Assignee

Comment 3

2 years ago
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: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in before you can comment on or make changes to this bug.