Closed Bug 1015333 Opened 7 years ago Closed 7 years ago

Stop using nsIScriptContext in ImageEncoder's EncodingCompleteEvent

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla33

People

(Reporter: Ms2ger, Assigned: Ms2ger)

Details

Attachments

(2 files)

Attached patch Patch v1Splinter Review
No description provided.
Attachment #8427875 - Flags: review?(bobbyholley)
Comment on attachment 8427875 [details] [diff] [review]
Patch v1

Review of attachment 8427875 [details] [diff] [review]:
-----------------------------------------------------------------

Per IRC discussion, this is a rooting hazard. I think we should pass an nsIGlobalObject.

::: content/canvas/src/ImageEncoder.cpp
@@ +38,5 @@
>        nsRefPtr<nsDOMMemoryFile> blob =
>          new nsDOMMemoryFile(mImgData, mImgSize, mType);
>  
> +      {
> +        AutoSafeJSContext cx;

Let's use an AutoJSAPI here.
Attachment #8427875 - Flags: review?(bobbyholley) → review-
Attached patch Patch v2Splinter Review
Attachment #8447887 - Flags: review?(bobbyholley)
Attachment #8447887 - Flags: review?(bobbyholley) → review+
https://hg.mozilla.org/mozilla-central/rev/90ae2dfb0496
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla33
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.