Closed Bug 717788 Opened 12 years ago Closed 12 years ago

spew ion IR to local directory instead of /tmp

Categories

(Core :: JavaScript Engine, defect)

Other Branch
All
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: masterofhats, Unassigned)

Details

Attachments

(1 file, 1 obsolete file)

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.
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?
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.
Attachment #588222 - Attachment is obsolete: true
Attachment #588249 - Flags: review?(dvander)
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)
Attachment #588249 - Flags: review?(dvander) → review+
http://hg.mozilla.org/projects/ionmonkey/rev/13cfff89b0e4
Status: UNCONFIRMED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.