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)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: bugzilla, Assigned: maolson)

Details

Attachments

(1 file, 1 obsolete file)

JavaScript strict warning: chrome://communicator/content/contentAreaDD.js line 138: anonymous function does not always return a value
over to ben, adding alecf; two recent owners of this file.
Assignee: vishy → ben
Any volunteers up to fix this, mao?
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
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
hwaara, the other functions are fine as is.
->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
-> Mark
Assignee: blakeross → maolson
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: },
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?
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!
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: };
Attachment #27862 - Attachment is obsolete: true
now we just need r, sr, a and checkin...
Keywords: helpwanted
Comment on attachment 73380 [details] [diff] [review] path to fix strict warn r=bzbarsky
Attachment #73380 - Flags: review+
Comment on attachment 73380 [details] [diff] [review] path to fix strict warn sr=alecf
Attachment #73380 - Flags: superreview+
Comment on attachment 73380 [details] [diff] [review] path to fix strict warn a=scc
Attachment #73380 - Flags: approval+
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.

Attachment

General

Creator:
Created:
Updated:
Size: