Closed
Bug 785200
Opened 12 years ago
Closed 12 years ago
Remove logging from OS.File
Categories
(Toolkit Graveyard :: OS.File, defect)
Toolkit Graveyard
OS.File
Tracking
(firefox16 affected, firefox17 fixed, firefox18 fixed)
RESOLVED
FIXED
mozilla18
People
(Reporter: Yoric, Assigned: avp)
References
Details
(Whiteboard: [mentor=Yoric][lang=js][qa-])
Attachments
(2 files, 3 obsolete files)
(deleted),
patch
|
Yoric
:
review+
akeybl
:
approval-mozilla-beta+
akeybl
:
approval-mozilla-release-
|
Details | Diff | Splinter Review |
(deleted),
text/plain
|
Details |
There are still a few occurrences of LOG in OS.File. We should make these occurrences depend on constant DEBUG set to false.
Assignee | ||
Comment 1•12 years ago
|
||
Hi Yoric,
I would like to work on this bug. Could you please guide me on getting started with it....
Thanks.
Reporter | ||
Comment 2•12 years ago
|
||
Sure, Abhishek.
For this bug, you must modify the .jsm files at http://mxr.mozilla.org/mozilla-central/source/toolkit/components/osfile/
1. in osfile_shared_allthreads.jsm, add a value exports.OS.Shared.DEBUG set to false;
2. in each of the .jsm files of the directory, make any use of LOG (or exports.OS.Shared.LOG) conditioned by exports.OS.Shared.DEBUG, as follows:
if (exports.OS.Shared.DEBUG) {
LOG(...)
}
3. ensure that it does not break any of the OS.File tests, by running, from your object directory
make -C toolkit/components/osfile/ && make -C browser/ && make -C toolkit/components/osfile/tests/ && TEST_PATH=toolkit/components/osfile/tests/mochi make mochitest-chrome
Assignee: nobody → abhishekp.bugzilla
Assignee | ||
Comment 3•12 years ago
|
||
Attachment #655287 -
Flags: feedback?(dteller)
Reporter | ||
Comment 4•12 years ago
|
||
Comment on attachment 655287 [details] [diff] [review]
made the suggested changes in files in osfile directory
Review of attachment 655287 [details] [diff] [review]:
-----------------------------------------------------------------
Looks good, provided you make the following changes.
::: toolkit/components/osfile/osfile_unix_allthreads.jsm
@@ +38,5 @@
> }
> exports.OS.Shared.Unix = {};
> + if (exports.OS.Shared.DEBUG) {
> + let LOG = OS.Shared.LOG.bind(OS.Shared, "Unix", "allthreads");
> + }
No, this breaks the definition of |let LOG|. You should really try and understand how |let| works :)
Anyway, just remove this change, it should not be necessary.
::: toolkit/components/osfile/osfile_unix_back.jsm
@@ +26,5 @@
> }
> exports.OS.Unix.File = {};
> + if (exports.OS.Shared.DEBUG) {
> + let LOG = exports.OS.Shared.LOG.bind(OS.Shared, "Unix", "back");
> + }
As above, please remove that change.
::: toolkit/components/osfile/osfile_unix_front.jsm
@@ +29,5 @@
> let Const = exports.OS.Constants.libc;
> let UnixFile = exports.OS.Unix.File;
> + if (exports.OS.Shared.DEBUG) {
> + let LOG = OS.Shared.LOG.bind(OS.Shared, "Unix front-end");
> + }
Remove that one.
::: toolkit/components/osfile/osfile_win_allthreads.jsm
@@ +38,5 @@
> }
> exports.OS.Shared.Win = {};
> + if (exports.OS.Shared.DEBUG) {
> + let LOG = OS.Shared.LOG.bind(OS.Shared, "Win", "allthreads");
> + }
Please remove this change.
::: toolkit/components/osfile/osfile_win_back.jsm
@@ +44,5 @@
> }
> exports.OS.Win.File = {};
> + if (exports.OS.Shared.DEBUG) {
> + let LOG = OS.Shared.LOG.bind(OS.Shared, "Win", "back");
> + }
Please remove this change.
::: toolkit/components/osfile/osfile_win_front.jsm
@@ +31,5 @@
> let Const = exports.OS.Constants.Win;
> let WinFile = exports.OS.Win.File;
> + if (exports.OS.Shared.DEBUG) {
> + let LOG = OS.Shared.LOG.bind(OS.Shared, "Win front-end");
> + }
Please remove this change.
Attachment #655287 -
Flags: feedback?(dteller) → feedback+
Assignee | ||
Comment 5•12 years ago
|
||
Attachment #655287 -
Attachment is obsolete: true
Attachment #655295 -
Flags: feedback?(dteller)
Reporter | ||
Comment 7•12 years ago
|
||
Comment on attachment 655295 [details] [diff] [review]
made the suggested changes in files in osfile directory
Review of attachment 655295 [details] [diff] [review]:
-----------------------------------------------------------------
This patch looks good. However, there are occurrences of |LOG| still missing, e.g. in |declareFFI|, |projector|, perhaps others.
Could you please make sure that you have all the occurrences of |LOG|?
::: toolkit/components/osfile/osfile_win_allthreads.jsm
@@ +133,4 @@
> });
>
> exports.OS.Shared.Win.Error = OSError;
> +})(this);
I can't see what you changed in this file. If there is no change in this file, could you remove it from the patch?
::: toolkit/components/osfile/osfile_win_back.jsm
@@ +46,3 @@
> let LOG = OS.Shared.LOG.bind(OS.Shared, "Win", "back");
> let libc = exports.OS.Shared.Win.libc;
>
Here, too, if you have not changed anything in this file, could you remove it from the patch?
Attachment #655295 -
Flags: feedback?(dteller) → feedback+
Assignee | ||
Comment 8•12 years ago
|
||
Sorry Yoric, I should I have removed the unedited files from the patch, it really did not occur to me at that time........
Now I am experiencing a new problem, I had run the hg pull -u command to update my mozilla central directory recently (after the previous patch), today I checked the previous patch and all my previous edits have been reverted to the original file and also some files I had changed in my previous patch seem to have been modified
for eg: I had added a if condition in /toolkit/components/osfile/osfile_unix_front.jsm for a LOG statement and now I dont see the LOG statement at all.....has that file been updated....how do I check that out ? also is there a way I can manage to update files without the changes made by me being overwritten ?
Assignee | ||
Comment 9•12 years ago
|
||
Attachment #655295 -
Attachment is obsolete: true
Attachment #656371 -
Flags: feedback?(dteller)
Reporter | ||
Comment 10•12 years ago
|
||
Comment on attachment 656371 [details] [diff] [review]
Conditioned logging in osfiles with exports.OS.Shared.DEBUG
Review of attachment 656371 [details] [diff] [review]:
-----------------------------------------------------------------
Looks good to me. Could you make the minor change suggested below and we will proceed to landing the patch?
::: toolkit/components/osfile/osfile_shared_allthreads.jsm
@@ +45,5 @@
> };
> }
> + if (exports.OS.Shared.DEBUG) {
> + exports.OS.Shared.LOG = LOG;
> + }
I would remove this |if (...)| as this will make things a bit harder if we ever decide to make |exports.OS.Shared.DEBUG| something more complicated than a constant (e.g. a preference).
Attachment #656371 -
Flags: feedback?(dteller) → review+
Reporter | ||
Comment 11•12 years ago
|
||
Actually, I will handle that.
Reporter | ||
Comment 12•12 years ago
|
||
Assignee | ||
Comment 13•12 years ago
|
||
Thanks a lot Yoric ! :)
Reporter | ||
Updated•12 years ago
|
Keywords: checkin-needed
Comment 14•12 years ago
|
||
(In reply to David Rajchenbach Teller [:Yoric] from comment #12)
> https://tbpl.mozilla.org/?tree=Try&rev=1a5267984f80
Green on Try. Thanks for the patch, Abhishek!
https://hg.mozilla.org/integration/mozilla-inbound/rev/84103a267a9e
Flags: in-testsuite-
Keywords: checkin-needed
Comment 15•12 years ago
|
||
Of course, this Try run only tested opt builds, and debug mochitests all broke. Backed out.
https://hg.mozilla.org/integration/mozilla-inbound/rev/6137cbeffb2
https://tbpl.mozilla.org/php/getParsedLog.php?id=14818876&tree=Mozilla-Inbound
12917 ERROR TEST-UNEXPECTED-FAIL | chrome://mochitests/content/chrome/toolkit/components/osfile/tests/mochi/test_osfile_back.xul | an unexpected uncaught JS exception reported through window.onerror - OS.Shared.LOG is undefined at resource://gre/modules/osfile/osfile_unix_allthreads.jsm:41
12921 ERROR TEST-UNEXPECTED-FAIL | chrome://mochitests/content/chrome/toolkit/components/osfile/tests/mochi/test_osfile_comms.xul | an unexpected uncaught JS exception reported through window.onerror - TypeError: OS.Shared.LOG is undefined at resource:///modules/osfile/osfile_unix_allthreads.jsm:41
12922 ERROR TEST-UNEXPECTED-FAIL | chrome://mochitests/content/chrome/toolkit/components/osfile/tests/mochi/test_osfile_comms.xul | Test timed out.
12931 ERROR TEST-UNEXPECTED-FAIL | chrome://mochitests/content/chrome/toolkit/components/osfile/tests/mochi/test_osfile_front.xul | TypeError: OS.Shared.LOG is undefined
Comment 17•12 years ago
|
||
We need to get the fix to Aurora too, right?
Reporter | ||
Comment 18•12 years ago
|
||
My bad for fixing the issue and not attaching the fix.
Here we go.
Attachment #656371 -
Attachment is obsolete: true
Attachment #656789 -
Flags: review+
Reporter | ||
Comment 19•12 years ago
|
||
(In reply to Olli Pettay [:smaug] from comment #17)
> We need to get the fix to Aurora too, right?
Indeed.
Reporter | ||
Updated•12 years ago
|
Keywords: checkin-needed
Comment 20•12 years ago
|
||
Comment 21•12 years ago
|
||
I also get stuff like the attached file semi-regularly in an opt build. Should it be there? (I can spin it off to a new bug if necessary.)
Reporter | ||
Comment 22•12 years ago
|
||
(In reply to Nicholas Nethercote [:njn] from comment #21)
> Created attachment 657073 [details]
> more console spam
>
> I also get stuff like the attached file semi-regularly in an opt build.
> Should it be there? (I can spin it off to a new bug if necessary.)
This seems unrelated to OS.File. It should probably go to another bug.
Comment 23•12 years ago
|
||
(In reply to Ryan VanderMeulen from comment #20)
> https://tbpl.mozilla.org/?tree=Try&rev=d377932cacd1
Green on Try (the m-oth failure was from another patch).
https://hg.mozilla.org/integration/mozilla-inbound/rev/f68d4b2ac619
Keywords: checkin-needed
Comment 24•12 years ago
|
||
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla18
Comment 25•12 years ago
|
||
Should we fix aurora and beta too?
status-firefox16:
--- → affected
status-firefox17:
--- → affected
Comment 26•12 years ago
|
||
Yes please; 16.0b2 is extra verbose here... i'll try to backport the commit as-is to aurora/beta if noone beats me to it.
Comment 27•12 years ago
|
||
16.0 candidate build 1 still shows this issue... do we want to ship 16.0 to the end users with extra verbose debugging enabled by default ?
Reporter | ||
Comment 28•12 years ago
|
||
(In reply to Mats Palmgren [:mats] from comment #25)
> Should we fix aurora and beta too?
Yes, by all means!
Reporter | ||
Comment 29•12 years ago
|
||
Sorry about that, mats' bugmail got lost in ~2100 bugmails. So yes, by all means, we want to backport it.
Reporter | ||
Comment 30•12 years ago
|
||
Comment on attachment 656789 [details] [diff] [review]
Remove OS.File logging
[Approval Request Comment]
Bug caused by (feature/regressing bug #): Bug 707679
User impact if declined: console spam at startup
Testing completed (on m-c, etc.): has been on m-c for 1 month
Risk to taking this patch (and alternatives if risky): none that I can think of
String or UUID changes made by this patch: none
Attachment #656789 -
Flags: approval-mozilla-beta?
Attachment #656789 -
Flags: approval-mozilla-aurora?
Reporter | ||
Comment 31•12 years ago
|
||
Comment on attachment 656789 [details] [diff] [review]
Remove OS.File logging
[Approval Request Comment]
Regression caused by (bug #):
User impact if declined:
Testing completed (on m-c, etc.):
Risk to taking this patch (and alternatives if risky):
Attachment #656789 -
Flags: approval-mozilla-release?
Reporter | ||
Comment 32•12 years ago
|
||
Comment on attachment 656789 [details] [diff] [review]
Remove OS.File logging
(removing approval-mozilla-aurora: patch is already in Aurora)
Attachment #656789 -
Flags: approval-mozilla-aurora?
Comment 33•12 years ago
|
||
Comment on attachment 656789 [details] [diff] [review]
Remove OS.File logging
Almost a no-op, early enough in the cycle to approve for Beta.
Attachment #656789 -
Flags: approval-mozilla-release?
Attachment #656789 -
Flags: approval-mozilla-release-
Attachment #656789 -
Flags: approval-mozilla-beta?
Attachment #656789 -
Flags: approval-mozilla-beta+
Comment 35•12 years ago
|
||
Comment 38•12 years ago
|
||
Still present in 16.0.2 release :(
Reporter | ||
Comment 39•12 years ago
|
||
Yes, I got approval-mozilla-release- :(
Updated•2 years ago
|
Product: Toolkit → Toolkit Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•