Closed Bug 793434 Opened 8 years ago Closed 8 years ago

ArchiveReaderEvent can release the nsIMIMEService off the main thread

Categories

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

x86_64
Windows 7
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla18
Tracking Status
firefox16 --- unaffected
firefox17 + fixed
firefox18 --- fixed
firefox-esr10 --- unaffected

People

(Reporter: khuey, Assigned: khuey)

References

Details

(Keywords: regression, sec-high, Whiteboard: [adv-track-main17-])

Attachments

(1 file)

Attached patch PatchSplinter Review
and it's not threadsafe.
Attachment #663738 - Flags: review?(bent.mozilla)
Comment on attachment 663738 [details] [diff] [review]
Patch


>+  if (!NS_IsMainThread()) {
>+    nsIMimeService* mimeService;
>+    mMimeService.forget(&mimeService);
>+
IMO, this would looks better
nsIMimeService* mimeService = mMimeService.forget().get();
but no need to change if you don't like that syntax.



>+    if (mimeService) {
>+      nsCOMPtr<nsIThread> mainThread;
>+      NS_GetMainThread(getter_AddRefs(mainThread));
nsCOMPtr<nsIThread> mainThread = do_GetMainThread();
is simpler
Attachment #663738 - Flags: review?(bent.mozilla) → review+
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Comment on attachment 663738 [details] [diff] [review]
Patch

[Approval Request Comment]
Bug caused by (feature/regressing bug #): Bug 772434
User impact if declined: Security bug
Testing completed (on m-c, etc.): Landed on m-c, small enough to reason through.
Risk to taking this patch (and alternatives if risky): Low risk.
String or UUID changes made by this patch: None.
Attachment #663738 - Flags: approval-mozilla-aurora?
Can we place a security rating on this bug before uplifting?
Keywords: regression
Typically we rate these as sec-high.
Keywords: sec-high
Attachment #663738 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Whiteboard: [adv-track-main17-]
Group: core-security
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.