Closed Bug 910827 Opened 11 years ago Closed 11 years ago

OS.File starts worker thread immediately if logging is enabled

Categories

(Toolkit Graveyard :: OS.File, defect)

defect
Not set
minor

Tracking

(Not tracked)

RESOLVED FIXED
mozilla27

People

(Reporter: Irving, Assigned: Yoric)

References

Details

(Whiteboard: [mentor=Yoric][lang=js][mentored bug but not a simple bug])

Attachments

(1 file, 1 obsolete file)

When OS.File is started with preference toolkit.osfile.log = 'true', the code at https://hg.mozilla.org/mozilla-central/file/21b5af569ca2/toolkit/components/osfile/modules/osfile_async_front.jsm#l226 posts the debugging message at startup time, which causes _PromiseWorker.jsm to instantiate the ChromeWorker.

Not a huge deal, but it makes it rather difficult to use OS.File logging to determine what other code is causing the ChromeWorker to start.
This can be a nice mentored bug for someone who already understands workers.
Whiteboard: [mentor=Yoric][lang=js][mentored bug but not a simple bug]
This could be a good first bug to start, can anyone assign this bug to me?
Here we go. If you have any question, don't hesitate to ask (preferably on #introduction).
Assignee: nobody → brunoschneider17
Ah, it turns out that I'll need to fix this one quickly. Sorry, Bruss, I'll need to take over this bug.
Assignee: brunoschneider17 → dteller
Here we go. This should also fix bug 845190.
Attachment #804872 - Flags: review?(nfroyd)
(at least the test_logging.js part of that bug)
Comment on attachment 804872 [details] [diff] [review]
Setting OS.File DEBUG will not automatically start the OS.File thread

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

::: toolkit/components/osfile/tests/xpcshell/xpcshell.ini
@@ -7,5 @@
>  [test_osfile_async.js]
>  [test_profiledir.js]
>  [test_logging.js]
> -# bug 845190 - thread pool wasn't shutdown assertions
> -skip-if = (os == "win" || "linux") && debug

Can you put this in a separate bug (bug 845190 seems like a good candidate!)?
Attachment #804872 - Flags: review?(nfroyd) → review+
Same code, minus patch to xpcshell.ini.
Attachment #804872 - Attachment is obsolete: true
Attachment #808574 - Flags: review+
https://hg.mozilla.org/integration/fx-team/rev/426c0629a3dd
Keywords: checkin-needed
Whiteboard: [mentor=Yoric][lang=js][mentored bug but not a simple bug] → [mentor=Yoric][lang=js][mentored bug but not a simple bug][fixed-in-fx-team]
https://hg.mozilla.org/mozilla-central/rev/426c0629a3dd
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Whiteboard: [mentor=Yoric][lang=js][mentored bug but not a simple bug][fixed-in-fx-team] → [mentor=Yoric][lang=js][mentored bug but not a simple bug]
Target Milestone: --- → mozilla27
Product: Toolkit → Toolkit Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: