Closed
Bug 1218488
Opened 10 years ago
Closed 10 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•10 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•10 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•10 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•10 years ago
|
||
| bugherder | ||
Status: NEW → RESOLVED
Closed: 10 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
•