Closed Bug 895137 Opened 11 years ago Closed 11 years ago

At debug-build startup: "JavaScript strict warning: chrome://browser/content/browser.js, line 10632: in strict mode code, functions may be declared only at top level or immediately within another function"

Categories

(Firefox :: Search, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 25

People

(Reporter: dholbert, Assigned: dholbert)

References

Details

Attachments

(1 file)

STR:
 1. Start a debug build. Watch the terminal-spew.

ACTUAL RESULTS:
This warning appears:
  JavaScript strict warning: chrome://browser/content/browser.js, line 10632: in
  strict mode code, functions may be declared only at top level or immediately
  within another function

If I visit  chrome://browser/content/browser.js and go to line 10632, it points to the function "updateSearchEngine", which was added last month for bug 860119, here:
  http://hg.mozilla.org/mozilla-central/rev/c164a4079878#l3.17
ugh, I missed that in the review, it may be changed to:
let updateSearchEngine = function() {
Seems reasonable. Here's a patch to do that.
Attachment #777429 - Flags: review?(mak77)
Comment on attachment 777429 [details] [diff] [review]
fix v1: use 'let'

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

Thanks, I didn't expect a so quick turnaround :)
Attachment #777429 - Flags: review?(mak77) → review+
Thanks! Sanity-check try run, before landing:
  https://tbpl.mozilla.org/?tree=Try&rev=18790ca2b13c
Assignee: nobody → dholbert
Daniel, thanks for catching this and pardon for making you spend time on it! Silly mistake on my part.

Patch looks good and tests are green :)
Status: NEW → ASSIGNED
No worries!

Inbound is closed at the moment; setting checkin-needed so that a sheriff will land this at some point. (thanks in advance, sheriff!)
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/6a5270b729e9
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 25
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: