Closed
Bug 67789
Opened 24 years ago
Closed 23 years ago
javascript strict warnings in contentAreaDD.js
Categories
(Core :: DOM: Copy & Paste and Drag & Drop, defect)
Core
DOM: Copy & Paste and Drag & Drop
Tracking
()
RESOLVED
FIXED
People
(Reporter: bugzilla, Assigned: maolson)
Details
Attachments
(1 file, 1 obsolete file)
|
654 bytes,
patch
|
bzbarsky
:
review+
alecf
:
superreview+
scc
:
approval+
|
Details | Diff | Splinter Review |
JavaScript strict warning:
chrome://communicator/content/contentAreaDD.js line 138: anonymous function does
not always return a value
Comment 1•24 years ago
|
||
over to ben, adding alecf; two recent owners of this file.
Assignee: vishy → ben
Comment 2•24 years ago
|
||
Any volunteers up to fix this, mao?
| Reporter | ||
Comment 3•24 years ago
|
||
The error has now changed to:
JavaScript strict warning:
chrome://communicator/content/contentAreaDD.js line 146: anonymous function does
not always return a value
Newbie would like to help. Looks like "return true" or "return false" is needed
between lines 145 and 146. Don't know what "onDragStart: function (aEvent,
aXferData, aDragAction)" is supposed to return.
Is there documentation? How to submit the updated file?
if possible, please get cvs tools (try wincvs.org, cvshome.org)
read http://www.mozilla.org/cvs.html
change the file
run cvs diff -u > mychanges.patch
attach that file.
on Events usually return false to indicate an abort condition
and true is often returned to indicate that an event was handled by the handler
not sure which is correct in this case.
you should probably try both return values and see which one is less broken.
Keywords: helpwanted
| Assignee | ||
Comment 6•24 years ago
|
||
Comment 7•24 years ago
|
||
I think there are other functions in that file that doesn't always return a
value as well. Can you fix them too? r=hwaara
| Assignee | ||
Comment 8•24 years ago
|
||
hwaara, the other functions are fine as is.
Comment 9•24 years ago
|
||
->d'n'd. i think. punt back if that's the wrong component!
Assignee: ben → blakeross
Component: XP Apps → XP Apps: Drag and Drop
QA Contact: sairuh → tpreston
Comment 11•24 years ago
|
||
Warning now is:
Warning: anonymous function does not always return a value
Source File: chrome://communicator/content/contentAreaDD.js
Line: 151, Column: 4
Source Code:
},
Comment 12•23 years ago
|
||
No sign of this warning in Mozilla/5.0 (Windows; U; Win98; en-US; rv:0.9.7+)
Gecko/20020105
It's been six months since anyone commented on this bug. Can someone tell me
how to reproduce this strict warning?
Comment 13•23 years ago
|
||
If I add to my preferences
user_pref("javascript.options.strict", true);
user_pref("javascript.options.werror", false);
then I see errors and warnings such as:
Error: redeclaration of const hide
Source File: chrome://wallet/content/walletOverlay.js
Line: 1
Warning: assignment to undeclared variable showMiscellaneousSeparator
Source File: chrome://navigator/content/linkToolbarItem.js
Line: 266
Warning: assignment to undeclared variable LinkToolbarUI
Source File: chrome://navigator/content/linkToolbarOverlay.js
Line: 50
I could NOT reproduce the original error.
I think maybe this bug is not so much concerned with the specific error but with
the fact there is some kind of error in the JavaScript console.
If you click on the error then the javascript source file opens. Quite nice!
Comment 14•23 years ago
|
||
Using today's trunk build, I'm getting:
Warning: trailing comma is not legal in ECMA-262 object initializers
Source File: chrome://communicator/content/contentAreaDD.js
Line: 83
Source Code:
};
| Reporter | ||
Comment 15•23 years ago
|
||
Attachment #27862 -
Attachment is obsolete: true
Comment 17•23 years ago
|
||
Comment on attachment 73380 [details] [diff] [review]
path to fix strict warn
r=bzbarsky
Attachment #73380 -
Flags: review+
Comment 18•23 years ago
|
||
Comment on attachment 73380 [details] [diff] [review]
path to fix strict warn
sr=alecf
Attachment #73380 -
Flags: superreview+
Comment 19•23 years ago
|
||
Comment on attachment 73380 [details] [diff] [review]
path to fix strict warn
a=scc
Attachment #73380 -
Flags: approval+
Comment 20•23 years ago
|
||
Checked in. Thanks Henrik!
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•