Closed Bug 1249451 Opened 8 years ago Closed 8 years ago

nsCycleCollector::ScanRoots may cause some unexpected purple buffer usage

Categories

(Core :: XPCOM, defect)

36 Branch
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla47
Tracking Status
firefox47 --- fixed

People

(Reporter: smaug, Assigned: smaug)

References

Details

Attachments

(3 files, 2 obsolete files)

Attached patch patch (obsolete) — Splinter Review
See https://treeherder.mozilla.org/logviewer.html#?job_id=16876870&repo=try from bug 1249226

-w patch coming too.

I think timeLog.Checkpoint("ScanRoots::listener"); doesn't provide anything useful, given that it depends on IO. And keeping to to work would have make the changes larger.
Attachment #8721039 - Flags: review?(continuation)
Attached patch -w (obsolete) — Splinter Review
Or, hmm, do we want to be safer and run the nsConsoleService::LogStringMessage asynchronously.
Comment on attachment 8721039 [details] [diff] [review]
patch

I guess we do want the async handling.
Attachment #8721039 - Flags: review?(continuation)
(In reply to Olli Pettay [:smaug] (HIGH REVIEW LOAD) from comment #0)
> I think timeLog.Checkpoint("ScanRoots::listener"); doesn't provide anything
> useful, given that it depends on IO. And keeping to to work would have make
> the changes larger.

That's fine. Profiling our logging hasn't been anything we've needed to do so far.
Attached patch patchSplinter Review
Using nsCancelableRunnable so that the code supports workers, whether or not that is needed atm.
Assignee: nobody → bugs
Attachment #8721039 - Attachment is obsolete: true
Attachment #8721040 - Attachment is obsolete: true
Attachment #8721053 - Flags: review?(continuation)
Comment on attachment 8721053 [details] [diff] [review]
patch

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

Thanks for fixing this.

::: xpcom/base/nsCycleCollector.cpp
@@ +1714,5 @@
> +    logFileFinalDestination->GetPath(logPath);
> +    nsAutoString msg = aCollectorKind +
> +      NS_LITERAL_STRING(" Collector log dumped to ") + logPath;
> +
> +    RefPtr<LogStringMessageAsync> log = new LogStringMessageAsync(msg);

Please add a comment about why you are doing this async.
Attachment #8721053 - Flags: review?(continuation) → review+
Attached patch +commentSplinter Review
and no reason why backed out :/
Ah, right, you need an "explicit" on the ctor for LogStringMessageAsync.
https://hg.mozilla.org/mozilla-central/rev/146d77b3931d
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla47
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: