Beginning on October 25th, 2016, Persona will no longer be an option for authentication on BMO. For more details see Persona Deprecated.
Last Comment Bug 489938 - allow redirecting dump() to a file
: allow redirecting dump() to a file
Product: Core
Classification: Components
Component: DOM (show other bugs)
: unspecified
: All All
: -- normal (vote)
: ---
Assigned To: Vladimir Vukicevic [:vlad] [:vladv]
: Andrew Overholt [:overholt]
Depends on:
  Show dependency treegraph
Reported: 2009-04-23 20:03 PDT by Vladimir Vukicevic [:vlad] [:vladv]
Modified: 2009-05-19 18:20 PDT (History)
1 user (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

dump to file (1.30 KB, patch)
2009-04-23 20:03 PDT, Vladimir Vukicevic [:vlad] [:vladv]
jst: review+
jst: superreview+
Details | Diff | Splinter Review
updated patch (1.41 KB, patch)
2009-04-24 15:55 PDT, Vladimir Vukicevic [:vlad] [:vladv]
jst: review+
jst: superreview+
Details | Diff | Splinter Review

Description Vladimir Vukicevic [:vlad] [:vladv] 2009-04-23 20:03:33 PDT
Created attachment 374405 [details] [diff] [review]
dump to file

A lot of our tools rely on dump() for output, which makes it hard to get at the data on devices where we don't really have a stdout.  Here's a simple patch that adds a pref to optionally redirect dump() output to a file.

With this, and the ability to execute commands remotely with a command line (e.g. for winmo/wince, using rapi tools prun/pput/pget), we can run many of our tests on mobile devices.
Comment 1 Johnny Stenback (:jst, 2009-04-24 13:17:55 PDT
Comment on attachment 374405 [details] [diff] [review]
dump to file

+    const nsAdoptingCString& fname = 
+      nsContentUtils::GetCharPref("browser.dom.window.dump.file");
+    if (fname) {

That should be if (!fname.IsEmpty()) rather than just checking if (fname), right?

Comment 2 Vladimir Vukicevic [:vlad] [:vladv] 2009-04-24 15:55:08 PDT
Created attachment 374540 [details] [diff] [review]
updated patch

Updated patch -- this correctly closes the file only in ::ShutDown instead of in ::Cleanup, giving us a new file per run correctly.  Also uses fputs() and adds a fflush() in dump() to ensure that the output always ends up in the file.
Comment 3 Vladimir Vukicevic [:vlad] [:vladv] 2009-04-24 16:25:08 PDT


Note You need to log in before you can comment on or make changes to this bug.