Closed
Bug 453220
Opened 16 years ago
Closed 16 years ago
In <nsDragAndDrop.js>, "Error: redeclaration of const kNonStringDataLength"
Categories
(Core :: DOM: Copy & Paste and Drag & Drop, defect)
Core
DOM: Copy & Paste and Drag & Drop
Tracking
()
RESOLVED
FIXED
mozilla1.9.1b1
People
(Reporter: sgautherie, Assigned: sgautherie)
References
Details
Attachments
(1 file, 1 obsolete file)
2.19 KB,
patch
|
enndeakin
:
review+
|
Details | Diff | Splinter Review |
[Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9.1b1pre) Gecko/20080901134927 SeaMonkey/2.0a1pre] (home, optim default) (W2Ksp4) [ Error: redeclaration of const kNonStringDataLength Source File: chrome://global/content/nsDragAndDrop.js Line: 4 ] This is the only declaration of this 'const'; this file must be getting included multiple times. NB: Reported in (TB) bug 452832 comment 1 too.
Comment 1•16 years ago
|
||
Serge, thanks for quick open of separate bug for "redeclaration of const" issue. (Data in Bug 452832 which relates to this bug) Bug 452832 Comment #8 says; > same error console message as in Bug 452832 comment #1 is also seen in SeaMonkey. As I wrote Bug 452832 Comment #4, this bug started to occur with following build. Note: Bug 452832 also started to occur with same build. (Worksforme) > [App] Name=Thunderbird Version=3.0b1pre BuildID=20080824031147 (Confirmed) > [App] Name=Thunderbird Version=3.0b1pre BuildID=20080825031404 According to Bug 452832 Comment #7, list of check-in's is following. > http://hg.mozilla.org/mozilla-central/pushloghtml?startdate=2008-08-24+00%3A00%3A00&enddate=2008-08-25+06%3A00%3A00 and > http://hg.mozilla.org/comm-central/pushloghtml?startdate=2008-08-24+00%3A00%3A00&enddate=2008-08-25+06%3A00%3A00 This bug("redeclaration of const") is another regression from bug 356295? Independent regression/independent issue from Bug 452832? (Copy of Bug 452832 Comment #11 by Neil Deakin) > It looks like the wrong version of messengerdnd.js was reviewed and checked in. > Rather than: > dataTransfer.mozSetDataAt(flavor, selArray); > It should have code that iterates over the array and adds each item separately, something like the following: > var count = selArray.length; > for (var i = 0; i < count; ++i ) > dataTransfer.mozSetDataAt(flavor, selArray[i], i);
This is not only a Windows bug. I get this Error also in my Error console on Mac OS X. Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; de; rv:1.9.1b1pre) Gecko/20080905105514 Thunderbird/3.0b1pre But I get also another Error in my Error Console: << Error: Timed textboxes are deprecated. Consider using type="search" instead. Quelldatei: chrome://messenger/content/messageWindow.xul Zeile: 0 >>
Updated•16 years ago
|
OS: Windows 2000 → All
Hardware: PC → All
Comment 3•16 years ago
|
||
nsDragAndDrop.js is included in several overlays, which then collide... Mark, it'd probably worth to move abDragDrop.js from overlay files to the addressbook.xul as well, don't you think?
Assignee: nobody → mnyromyr
Attachment #337335 -
Flags: superreview?(neil)
Attachment #337335 -
Flags: review?(bugzilla)
Comment 4•16 years ago
|
||
Comment on attachment 337335 [details] [diff] [review] include nsDragAndDrop.js in main windows only >diff --git a/mailnews/addrbook/resources/content/abDirTreeOverlay.xul b/mailnews/addrbook/resources/content/abDirTreeOverlay.xul >-<script type="application/x-javascript" src="chrome://global/content/nsDragAndDrop.js"/> This "breaks" the contacts panel/addressbook sidebar, which rely on their otherwise meaningless overlay of abDirTreeOverlay.xul to include this. >diff --git a/mailnews/addrbook/resources/content/abResultsPaneOverlay.xul b/mailnews/addrbook/resources/content/abResultsPaneOverlay.xul >-<script type="application/x-javascript" src="chrome://global/content/nsDragAndDrop.js"/> This file does in fact contain a direct reference to nsDragAndDrop, and this change therefore presumably breaks the "Select Addresses" dialog.
Attachment #337335 -
Flags: superreview?(neil) → superreview-
Assignee | ||
Comment 5•16 years ago
|
||
(In reply to comment #1) > Serge, thanks for quick open of separate bug for "redeclaration of const" > issue. In fact, I filed this bug before reading your comment in that other bug ;-) What is true is that I didn't bother finding the exact checkin which "caused" this :-< I'm not sure why you quoted the part about the wrong checkin, but this bug is about the "redeclaration" error only. (In reply to comment #2) > But I get also another Error in my Error Console: > << Error: Timed textboxes are deprecated. This is an unrelated "bug/feature" currently worked on some other bug(s).
Updated•16 years ago
|
Attachment #337335 -
Flags: review?(bugzilla) → review-
Comment 6•16 years ago
|
||
Comment on attachment 337335 [details] [diff] [review] include nsDragAndDrop.js in main windows only per Neil's comments.
Comment 7•16 years ago
|
||
While the D&D issue was resolved=fixed, the redeclaration error cited in Comment #0 is still reported in the Shredder 09/22 build.
Comment 9•16 years ago
|
||
From Bug 456961 On trunk nsTransferable.js is mapped to nsDragAndDrop.js. Older code loads both to use drag and drop but Gecko 1.9 moved all the code to nsDragAndDrop.js. If older code tries to load both (actually now the same file) you could get the CONST redeclaration error. anyway your error message is due to changeset 18445:ab3c77a02ed0 in mozilla-central ================================ This occurs in SeaMonkey 2.0a because it comes with two extensions, chatzilla and venkman, both of which (for backward compatibility reasons) load nsTransferable.js as well as nsDragAndDrop.js. It was suggested in #seamonkey that since kNonStringDataLength is only referenced once, you could move the constant into the function that references this.
Assignee | ||
Updated•16 years ago
|
Assignee | ||
Comment 10•16 years ago
|
||
Fix the symptom. ***** But we may want to do more yet: see Karsten's patch.
Attachment #337335 -
Attachment is obsolete: true
Attachment #340382 -
Flags: review?(neil)
Comment 11•16 years ago
|
||
Comment on attachment 340382 [details] [diff] [review] (Bv1) Move the const [Checkin: Comment 12] Looks good to me.
Attachment #340382 -
Flags: review?(neil) → review?(enndeakin)
Updated•16 years ago
|
Attachment #340382 -
Flags: review?(enndeakin) → review+
Assignee | ||
Comment 12•16 years ago
|
||
Comment on attachment 340382 [details] [diff] [review] (Bv1) Move the const [Checkin: Comment 12] http://hg.mozilla.org/mozilla-central/rev/a714e4b0a6ed
Attachment #340382 -
Attachment description: (Bv1) Move the const → (Bv1) Move the const
[Checkin: Comment 12]
Assignee | ||
Comment 13•16 years ago
|
||
(In reply to comment #10) > But we may want to do more yet: see Karsten's patch. I filed bug 457090. (In reply to comment #9) > From Bug 456961 > > On trunk nsTransferable.js is mapped to nsDragAndDrop.js. Fwiw, http://mxr.mozilla.org/mozilla-central/search?string=nsTransferable%5C.js®exp=on&case=on
Assignee: mnyromyr → sgautherie.bz
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Assignee | ||
Updated•16 years ago
|
Attachment #337335 -
Attachment is obsolete: false
Assignee | ||
Comment 14•16 years ago
|
||
(In reply to comment #13) > http://mxr.mozilla.org/mozilla-central/search?string=nsTransferable%5C.js®exp=on&case=on http://mxr.mozilla.org/comm-central/search?string=nsTransferable%5C.js®exp=on&case=on rather.
Updated•16 years ago
|
Attachment #337335 -
Attachment is obsolete: true
Comment 15•16 years ago
|
||
> http://mxr.mozilla.org/comm-central/search?string=nsTransferable%5C.js®exp=on&case=on Isn't that what I said in Comment 9 ?
Assignee | ||
Comment 16•16 years ago
|
||
(In reply to comment #15) > Isn't that what I said in Comment 9 ? Yes, that's exactly the url to go with your comment ;->
You need to log in
before you can comment on or make changes to this bug.
Description
•