Closed Bug 723852 Opened 10 years ago Closed 10 years ago

Use a runnable for canvas.mozFetchAsStream()

Categories

(Core :: Canvas: 2D, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla13

People

(Reporter: ttaubert, Assigned: ttaubert)

References

Details

Attachments

(1 file, 1 obsolete file)

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?
Blocks: 720697
Attached patch patch v1 (obsolete) — Splinter Review
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-
Attached patch patch v2Splinter Review
Fresh patch, using the main thread.
Attachment #594102 - Attachment is obsolete: true
Attachment #594145 - Flags: review?(khuey)
https://hg.mozilla.org/integration/fx-team/rev/34b3565192dc
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → mozilla13
https://hg.mozilla.org/mozilla-central/rev/34b3565192dc
Status: ASSIGNED → RESOLVED
Closed: 10 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.