Closed
Bug 1166243
Opened 9 years ago
Closed 9 years ago
XPCShellEnvironment.cpp and XPCShellImpl.cpp are using __DATE__ and __TIME__
Categories
(Core :: XPConnect, defect)
Core
XPConnect
Tracking
()
RESOLVED
FIXED
mozilla41
Tracking | Status | |
---|---|---|
firefox41 | --- | fixed |
People
(Reporter: glandium, Assigned: glandium)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
(deleted),
patch
|
bholley
:
review+
efaust
:
review+
|
Details | Diff | Splinter Review |
Both for the essentially the same code:
in the former:
static bool
BuildDate(JSContext *cx, unsigned argc, JS::Value *vp)
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
fprintf(stdout, "built on %s at %s\n", __DATE__, __TIME__);
args.rval().setUndefined();
return true;
}
in the latter:
static bool
BuildDate(JSContext* cx, unsigned argc, jsval* vp)
{
CallArgs args = CallArgsFromVp(argc, vp);
fprintf(gOutFile, "built on %s at %s\n", __DATE__, __TIME__);
args.rval().setUndefined();
return true;
}
This prevents reproducible builds. Is there a reason this is needed instead of using the buildid we're using for everything else?
Looks like dead code to me. https://dxr.mozilla.org/mozilla-central/search?q=regexp%3A\WBuildDate
Comment 2•9 years ago
|
||
It's exposed to JS as a build() function.
Assignee | ||
Comment 4•9 years ago
|
||
js.cpp has the same code, too.
Assignee | ||
Comment 5•9 years ago
|
||
Come to think of it, the usefulness of these functions is questionable: they don't even return anything, they only print out the build time. Which in itself is not exactly a useful information. Is it a build of code from that day, or a later build of older code? How about removing this entirely?
ni? bholley for xpcshell and jorendorf for js shell.
Flags: needinfo?(jorendorff)
Flags: needinfo?(bobbyholley)
Comment 6•9 years ago
|
||
Happy to get rid of it if it doesn't break anything.
Flags: needinfo?(bobbyholley)
Assignee | ||
Comment 7•9 years ago
|
||
Assignee: nobody → mh+mozilla
Attachment #8610922 -
Flags: review?(jorendorff)
Attachment #8610922 -
Flags: review?(bobbyholley)
Comment 8•9 years ago
|
||
Comment on attachment 8610922 [details] [diff] [review]
Remove build() function from js and xpc shells
Review of attachment 8610922 [details] [diff] [review]:
-----------------------------------------------------------------
I guess this might be useful if you have an xpcshell binary sitting around and want to know how old it is? I guess that still doesn't tell you all that much.
Attachment #8610922 -
Flags: review?(bobbyholley) → review+
Assignee | ||
Comment 9•9 years ago
|
||
The file date is presumably giving as much information :)
Comment 10•9 years ago
|
||
Comment on attachment 8610922 [details] [diff] [review]
Remove build() function from js and xpc shells
Review of attachment 8610922 [details] [diff] [review]:
-----------------------------------------------------------------
Stealing review as per request on IRC.
Attachment #8610922 -
Flags: review?(jorendorff) → review+
Comment 11•9 years ago
|
||
Comment 12•9 years ago
|
||
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox41:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla41
Assignee | ||
Updated•9 years ago
|
Flags: needinfo?(jorendorff)
You need to log in
before you can comment on or make changes to this bug.
Description
•