Last Comment Bug 717788 - spew ion IR to local directory instead of /tmp
: spew ion IR to local directory instead of /tmp
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: JavaScript Engine (show other bugs)
: Other Branch
: All Windows 7
: -- normal (vote)
: ---
Assigned To: general
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-01-12 15:57 PST by Stephan Herhut [:masterofhats]
Modified: 2012-01-12 17:24 PST (History)
2 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
patch to use local directory for IR spewing (738 bytes, patch)
2012-01-12 15:57 PST, Stephan Herhut [:masterofhats]
no flags Details | Diff | Review
only change spewing directory on windows (1.21 KB, patch)
2012-01-12 17:12 PST, Stephan Herhut [:masterofhats]
dvander: review+
Details | Diff | Review

Description Stephan Herhut [:masterofhats] 2012-01-12 15:57:53 PST
Created attachment 588222 [details] [diff] [review]
patch to use local directory for IR spewing

Currently, the spew file for IonMonkey IR spewing is hardwired to /tmp/ion.*, which does not work on Windows. This should either be changed to use the platform's default temporary directory or the local directory. The latter is implemented by the attached patch.
Comment 1 Sean Stangl [:sstangl] 2012-01-12 16:08:32 PST
Using the platform's default temporary directory is personally preferred, since I tend to run the shell from a bunch of various locations, and am not diligent about temporary file cleanup (if I'll even remember at all!).

Could we instead use |#if defined(_WIN32)| to give Windows working behavior?
Comment 2 Stephan Herhut [:masterofhats] 2012-01-12 17:12:44 PST
Created attachment 588249 [details] [diff] [review]
only change spewing directory on windows

Using the local directory on windows only works for me, too. 

I now check for _WIN32 or _WIN64. Defining ION_SPEW_DIR can further overide the platform default.
Comment 3 David Anderson [:dvander] 2012-01-12 17:18:29 PST
Comment on attachment 588249 [details] [diff] [review]
only change spewing directory on windows

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

::: js/src/ion/IonSpewer.cpp
@@ +43,5 @@
>  
>  #include "IonSpewer.h"
>  
> +#ifndef ION_SPEW_DIR
> +#if defined(_WIN32) || defined(_WIN64)

(for what it's worth, _WIN32 is defined on _WIN64)
Comment 4 David Anderson [:dvander] 2012-01-12 17:24:13 PST
http://hg.mozilla.org/projects/ionmonkey/rev/13cfff89b0e4

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