Closed
Bug 1286709
Opened 8 years ago
Closed 8 years ago
Missing return value check for GetApzc()
Categories
(Core :: Graphics: Layers, defect)
Core
Graphics: Layers
Tracking
()
RESOLVED
FIXED
mozilla50
Tracking | Status | |
---|---|---|
firefox50 | --- | fixed |
People
(Reporter: n.nethercote, Assigned: n.nethercote)
References
(Blocks 1 open bug)
Details
(Keywords: coverity, Whiteboard: CID 1363746)
Attachments
(1 file, 1 obsolete file)
1.33 KB,
patch
|
kats
:
review+
|
Details | Diff | Splinter Review |
ApplyAsyncTransformToScrollbarForContent() calls GetApzc() but doesn't null-check the result.
Assignee | ||
Comment 1•8 years ago
|
||
kats, I hope an early return is appropriate here, but I'm not certain. All the other calls to GetApzc() are null-checked.
Attachment #8770750 -
Flags: review?(bugmail)
Assignee | ||
Updated•8 years ago
|
Assignee: nobody → n.nethercote
Status: NEW → ASSIGNED
Comment 2•8 years ago
|
||
Comment on attachment 8770750 [details] [diff] [review] Add a missing null check for a GetApzc() call Review of attachment 8770750 [details] [diff] [review]: ----------------------------------------------------------------- I think it should be safe to MOZ_ASSERT that it is not null there. The LayerMetrics passed in to this function must retyrn true from IsValid(), based on the call site, and if you trace backwards all the valid LayerMetrics that reach that point must have returned true from LayerIsScrollbarTarget. That function checks that the apzc is non-null. Were you actually seeing a case where this caused a crash? If so I'll need to look more carefully but otherwise I would prefer the assert to an early return.
Attachment #8770750 -
Flags: review?(bugmail) → review-
Assignee | ||
Comment 3•8 years ago
|
||
It was static analysis (Coverity).
Attachment #8770786 -
Flags: review?(bugmail)
Assignee | ||
Updated•8 years ago
|
Attachment #8770750 -
Attachment is obsolete: true
Comment 4•8 years ago
|
||
Comment on attachment 8770786 [details] [diff] [review] Add a missing null check for a GetApzc() call Review of attachment 8770786 [details] [diff] [review]: ----------------------------------------------------------------- r=me, please update commit message also
Attachment #8770786 -
Flags: review?(bugmail) → review+
Assignee | ||
Comment 5•8 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/994235fda74bd1d05003546f98d23e46f6ceecef Bug 1286709 - Assert the non-nullness of an GetApzc() call's return value. r=kats.
Comment 6•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/994235fda74b
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla50
You need to log in
before you can comment on or make changes to this bug.
Description
•