Assignment to undeclared variable dragAfter warning.

VERIFIED FIXED

Status

()

--
trivial
VERIFIED FIXED
10 years ago
9 years ago

People

(Reporter: bwinton, Assigned: philor)

Tracking

({verified1.9.1})

1.9.1 Branch
verified1.9.1
Points:
---
Bug Flags:
in-testsuite -

Firefox Tracking Flags

(status1.9.1 .4-fixed)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Reporter)

Description

10 years ago
Created attachment 392490 [details] [diff] [review]
A patch to declare the dragAfter variable.

While customizing my toolbar in Thunderbird, I get the following warning:
JavaScript strict warning: chrome://global/content/customizeToolbar.js, line 747: assignment to undeclared variable dragAfter

This patch fixes that.
Attachment #392490 - Flags: review?(gavin.sharp)
Which version of this file are you patching? That change has already been made to mozilla-central's copy, as far as I can tell:

http://mxr.mozilla.org/mozilla-central/source/toolkit/content/customizeToolbar.js#784
(Reporter)

Updated

10 years ago
Attachment #392490 - Attachment is obsolete: true
Attachment #392490 - Flags: review?(gavin.sharp)
(Reporter)

Comment 2

10 years ago
Comment on attachment 392490 [details] [diff] [review]
A patch to declare the dragAfter variable.

Ah, that makes sense.  I'm using the copy from http://mxr.mozilla.org/mozilla1.9.1/source/toolkit/content/customizeToolbar.js#784

(I did do a search for the error message in bugzilla, but nothing showed up.)

Thanks!
We can take just that fix on the branch if you'd like.
Component: Toolbars → Toolbars and Toolbar Customization
Product: Firefox → Toolkit
QA Contact: toolbars → toolbars
Version: Trunk → 1.9.1 Branch
(Reporter)

Comment 4

10 years ago
I wouldn't bother, since it doesn't really hurt anything, it's just another debug message for me to ignore.  :)
(Assignee)

Comment 5

10 years ago
I think it's worth taking, just because of the noise involved in "is there anything in the error console?" "yeah, it says 'assignment to undeclared variable dragAfter'" "no, that's known and unrelated, is there anything else?"
(Reporter)

Comment 6

9 years ago
Phil's been here longer than I have, so I'll go with his opinion.

Can we take that fix on the branch please?

Thank you,
Blake.
(Assignee)

Comment 7

9 years ago
Created attachment 394903 [details] [diff] [review]
Just like the trunk, for 1.9.1

Well, then let's do it exactly like the trunk does (we can't take the patch that fixed it on the trunk, since that was the giant "Switch to using the new drag-drop API" patch).

Drivers: it's not just a silly "fix a warning," since having it undeclared means that if an extension stupidly uses a global named dragAfter, their value will get clobbered, but only in the miserable-to-reproduce case after a user customizes toolbars *and* drags something. There's a microscopic but non-zero chance that someone shipped an extension which is actually intending to use the accidental global dragAfter with its value after customizing (at which point it would be set to something of no use at all to anyone outside that function, so I can't picture why anyone would), but that's extremely unlikely, especially compared to the chances of someone using their own dragAfter global. (And neither use shows up in mxr-test's index of AMO addons, though I wouldn't count on that being up to date.)
Assignee: nobody → philringnalda
Status: NEW → ASSIGNED
Attachment #394903 - Flags: review?(gavin.sharp)
(Assignee)

Updated

9 years ago
OS: Mac OS X → All
Hardware: x86 → All
Attachment #394903 - Flags: review?(gavin.sharp) → review+
(Assignee)

Updated

9 years ago
Attachment #394903 - Flags: approval1.9.1.3?
(Assignee)

Updated

9 years ago
Attachment #394903 - Flags: approval1.9.1.3? → approval1.9.1.4?
(Assignee)

Updated

9 years ago
Whiteboard: [needs approval]
Comment on attachment 394903 [details] [diff] [review]
Just like the trunk, for 1.9.1

Approved for 1.9.1.4, a=dveditz for release-drivers
Attachment #394903 - Flags: approval1.9.1.4? → approval1.9.1.4+
(Assignee)

Comment 9

9 years ago
http://hg.mozilla.org/releases/mozilla-1.9.1/rev/a5d1f196ea75
Status: ASSIGNED → RESOLVED
Last Resolved: 9 years ago
status1.9.1: --- → .4-fixed
Flags: in-testsuite-
Resolution: --- → FIXED
Whiteboard: [needs approval]
Verified with Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1.4pre) Gecko/20090908 Shredder/3.0b4pre ID:20090908033759
Status: RESOLVED → VERIFIED
Keywords: verified1.9.1
You need to log in before you can comment on or make changes to this bug.