JS shell does not show help for profiling functions

RESOLVED FIXED in mozilla8

Status

()

Core
JavaScript Engine
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: sfink, Assigned: sfink)

Tracking

unspecified
mozilla8
x86_64
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [inbound])

Attachments

(1 attachment)

(Assignee)

Description

6 years ago
Created attachment 547842 [details] [diff] [review]
Recover the missing help messages

help() in the JS shell only prints out the help for the functions defined directly in shell/js.cpp, not all the help messages that are defined.
Attachment #547842 - Flags: review?(cdleary)
Comment on attachment 547842 [details] [diff] [review]
Recover the missing help messages

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

::: js/src/shell/js.cpp
@@ +5100,5 @@
>  
>      fprintf(gOutFile, "%s\n", JS_GetImplementationVersion());
>      if (argc == 0) {
>          fputs(shell_help_header, gOutFile);
> +        for (i = 0; i < (sizeof(shell_help_messages) / sizeof(shell_help_messages[0])); ++i)

JS_ARRAY_SIZE macro does exactly this, IIRC.

@@ +5123,3 @@
>                      return JS_FALSE;
> +                for (j = 0; j < (sizeof(shell_help_messages) / sizeof(shell_help_messages[0])); ++j)
> +                {

Ditto on the limit, brace on same line?
Attachment #547842 - Flags: review?(cdleary) → review+
(Assignee)

Comment 2

6 years ago
Fixed nits, thanks. (JS_ARRAY_LENGTH, btw.)

http://hg.mozilla.org/integration/mozilla-inbound/rev/97cc7ab517e0
Whiteboard: [inbound]
http://hg.mozilla.org/mozilla-central/rev/97cc7ab517e0
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla8

Updated

6 years ago
Depends on: 684713
Assignee: general → sphink
You need to log in before you can comment on or make changes to this bug.