Use a runnable for canvas.mozFetchAsStream()

RESOLVED FIXED in mozilla13

Status

()

Core
Canvas: 2D
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: ttaubert, Assigned: ttaubert)

Tracking

Trunk
mozilla13
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

6 years ago
Bug 720697 comment #12:

> >+nsHTMLCanvasElement::MozFetchAsStream(nsIInputStreamCallback *aCallback,
> 
> >+  return aCallback->OnInputStreamReady(asyncData);
> 
> It's generally a bad idea to design an API to be async-friendly, but then
> invoke the callback synchronously - people can start depending on that,
> making your life difficult when it comes time to change it in the future.
> Can you use a runnable here?
(Assignee)

Updated

6 years ago
Blocks: 720697
(Assignee)

Comment 1

6 years ago
Created attachment 594102 [details] [diff] [review]
patch v1
Attachment #594102 - Flags: feedback?(khuey)
Comment on attachment 594102 [details] [diff] [review]
patch v1

Dispatching the callback on another thread is absolutely not what we want here.
Attachment #594102 - Flags: feedback?(khuey) → feedback-
(Assignee)

Comment 3

6 years ago
Created attachment 594145 [details] [diff] [review]
patch v2

Fresh patch, using the main thread.
Attachment #594102 - Attachment is obsolete: true
Attachment #594145 - Flags: review?(khuey)
Attachment #594145 - Flags: review?(khuey) → review+
(Assignee)

Comment 4

6 years ago
https://hg.mozilla.org/integration/fx-team/rev/34b3565192dc
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → mozilla13
(Assignee)

Comment 5

6 years ago
https://hg.mozilla.org/mozilla-central/rev/34b3565192dc
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
You need to log in before you can comment on or make changes to this bug.