Closed Bug 189430 Opened 22 years ago Closed 21 years ago

In <chrome://messenger/content/msgMail3PaneWindow.js>, "Warning: reference to undefined property window.arguments[2]"

Categories

(SeaMonkey :: MailNews: Message Display, defect)

defect
Not set
minor

Tracking

(Not tracked)

RESOLVED FIXED
mozilla1.7alpha

People

(Reporter: bugzilla, Assigned: sgautherie)

Details

Attachments

(5 obsolete files)

Warning: reference to undefined property window.arguments[2]
Source File: chrome://messenger/content/msgMail3PaneWindow.js
Line: 634

seems to happen when you double click on a newsgroup server so that you have two
open mail windows

20030116
Summary: strict javascript warning in msgMail3PaneWindow.js → In <chrome://messenger/content/msgMail3PaneWindow.js>, "Warning: reference to undefined property window.arguments[2]"; (strict javascript warning)
Could you check with a recent version, like v1.4rc3 ?
I can reproduce with build 2003082004, although double-clicking does not open
two windows.
Attached patch (Av1) <msgMail3PaneWindow.js> (obsolete) — Splinter Review
Attachment #138047 - Flags: review?(sspitzer)
[Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.6) Gecko/20040113] (W98SE)

Re comment 2:

Confirmed:
It happens on 'Open in New Mail Window' (double click / context menu / ...),
whether the folder is newsgroup / pop3 / ...;
I believe the reporter meant '2 = initial window + new window' ;->

Line number changed:
{
Warning: reference to undefined property window.arguments[2]
Source File: chrome://messenger/content/msgMail3PaneWindow.js
Line: 650
}
Comment on attachment 138047 [details] [diff] [review]
(Av1) <msgMail3PaneWindow.js>


That's the idea, but
Allow me to rewrite it some more.
Attachment #138047 - Attachment description: patch to fix the warning → (Av1) <msgMail3PaneWindow.js>
Attachment #138047 - Attachment is obsolete: true
Attachment #138047 - Flags: review?(sspitzer)
Assignee: sspitzer → gautheri
Severity: normal → trivial
OS: Windows XP → All
Hardware: PC → All
Status: NEW → ASSIGNED
Summary: In <chrome://messenger/content/msgMail3PaneWindow.js>, "Warning: reference to undefined property window.arguments[2]"; (strict javascript warning) → In <chrome://messenger/content/msgMail3PaneWindow.js>, "Warning: reference to undefined property window.arguments[2]"
Target Milestone: --- → mozilla1.7alpha
Comment on attachment 138047 [details] [diff] [review]
(Av1) <msgMail3PaneWindow.js>

>+    gStartMsgKey = [1] in window.arguments ? window.arguments[1] : null;

(for the record)
It seems that |gStartMsgKey| should not be |null|.
Attachment #138047 - Flags: review-
Attached patch (Av2) <msgMail3PaneWindow.js> (obsolete) — Splinter Review
Test successful (after deleting XUL.mfl).
Attachment #139577 - Flags: superreview?(sspitzer)
Attachment #139577 - Flags: review?(neil.parkwaycc.co.uk)
Comment on attachment 139577 [details] [diff] [review]
(Av2) <msgMail3PaneWindow.js>

I think you should be checking window.arguments.length instead.
Attachment #139577 - Flags: review?(neil.parkwaycc.co.uk) → review-
Attachment #139577 - Attachment is obsolete: true
Attachment #139577 - Flags: superreview?(sspitzer)
Av2, with comment 8 suggestion(s).
Attachment #139626 - Flags: superreview?(sspitzer)
Attachment #139626 - Flags: review?(neil.parkwaycc.co.uk)
Attachment #139626 - Attachment description: (Av3) <msgMail3PaneWindow.js> → (Av3) <msgMail3PaneWindow.js> (== Av2 :-()
Attachment #139626 - Attachment is obsolete: true
Attachment #139626 - Flags: superreview?(sspitzer)
Attachment #139626 - Flags: review?(neil.parkwaycc.co.uk)
Attached patch (Av3b) <msgMail3PaneWindow.js> (obsolete) — Splinter Review
Av3 with correct file :->
Attachment #139627 - Flags: superreview?(sspitzer)
Attachment #139627 - Flags: review?(neil.parkwaycc.co.uk)
Comment on attachment 139627 [details] [diff] [review]
(Av3b) <msgMail3PaneWindow.js>

Would you mind using .length for all three cases? Also, please make the : line
up with the ?
Attachment #139627 - Flags: review?(neil.parkwaycc.co.uk) → review-
Attachment #139627 - Attachment is obsolete: true
Attachment #139627 - Flags: superreview?(sspitzer)
Av3b, with comment 11 suggestion(s).

I was keeping [0] from the current code...
I forgot to update the line up from Av2 -> Av3b :-(
Attachment #139690 - Flags: review?(neil.parkwaycc.co.uk)
Attachment #139690 - Flags: review?(neil.parkwaycc.co.uk) → review+
Attachment #139690 - Flags: superreview?(sspitzer)
Attachment #139690 - Flags: superreview?(sspitzer) → superreview?(mscott)
Attachment #139690 - Flags: superreview?(mscott) → superreview+
Fix checked in.
Status: ASSIGNED → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Attachment #139690 - Attachment description: (Av4) <msgMail3PaneWindow.js> → (Av4) <msgMail3PaneWindow.js> [Checked in: Comment 13]
Attachment #139690 - Attachment is obsolete: true
Severity: trivial → minor
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: