Closed
Bug 1218488
Opened 9 years ago
Closed 9 years ago
clarify buffer ownership for nsICanvasRenderingContextInternal::GetBuffer
Categories
(Core :: General, defect)
Core
General
Tracking
()
RESOLVED
FIXED
mozilla44
Tracking | Status | |
---|---|---|
firefox44 | --- | fixed |
People
(Reporter: froydnj, Assigned: froydnj)
Details
Attachments
(1 file)
31.89 KB,
patch
|
bas.schouten
:
review+
baku
:
review+
|
Details | Diff | Splinter Review |
This patch started life as making ImageEncoder.cpp:EncodingRunnable not use nsAutoArrayPtr, but the API effects rippled out from there. On the whole, I think using UniquePtr throughout has made the code clearer.
Assignee | ||
Comment 1•9 years ago
|
||
Bas for the gfx/ parts (and the Windows widget parts, if he feels comfortable with them), baku for the dom/ parts.
Attachment #8679014 -
Flags: review?(bas)
Attachment #8679014 -
Flags: review?(amarchesini)
Comment 2•9 years ago
|
||
Comment on attachment 8679014 [details] [diff] [review] clarify buffer ownership for nsICanvasRenderingContextInternal::GetBuffer Review of attachment 8679014 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/canvas/CanvasRenderingContextHelper.cpp @@ +49,5 @@ > return; > } > } > > + UniquePtr<uint8_t[]> imageBuffer = nullptr; remove '= nullptr' ::: dom/canvas/WebGLContext.cpp @@ +1061,5 @@ > bool premult; > RefPtr<SourceSurface> snapshot = > GetSurfaceSnapshot(mOptions.premultipliedAlpha ? nullptr : &premult); > if (!snapshot) > + return nullptr; if (!snapshot) { return; }
Attachment #8679014 -
Flags: review?(amarchesini) → review+
Comment 3•9 years ago
|
||
Comment on attachment 8679014 [details] [diff] [review] clarify buffer ownership for nsICanvasRenderingContextInternal::GetBuffer Review of attachment 8679014 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/canvas/WebGLContext.cpp @@ +1061,5 @@ > bool premult; > RefPtr<SourceSurface> snapshot = > GetSurfaceSnapshot(mOptions.premultipliedAlpha ? nullptr : &premult); > if (!snapshot) > + return nullptr; Wait.. what? You can't return nothing from this function.. can you?
Attachment #8679014 -
Flags: review?(bas) → review+
Comment 5•9 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/53952bbfad9a
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox44:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla44
You need to log in
before you can comment on or make changes to this bug.
Description
•