Closed
Bug 281445
Opened 20 years ago
Closed 19 years ago
In <editor.js>, "Warning: redeclaration of var editor"
Categories
(Core :: DOM: Editor, defect)
Core
DOM: Editor
Tracking
()
RESOLVED
FIXED
mozilla1.9alpha1
People
(Reporter: sgautherie, Assigned: sgautherie)
References
Details
Attachments
(2 files, 1 obsolete file)
|
3.33 KB,
patch
|
neil
:
review+
neil
:
superreview+
|
Details | Diff | Splinter Review |
|
4.06 KB,
patch
|
mtschrep
:
approval1.8.1-
|
Details | Diff | Splinter Review |
[Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.8b) Gecko/20050207] (nightly) (W98SE)
{{
Warning: redeclaration of var editor
Source File: chrome://editor/content/editor.js
Line: 199, Column: 10
Source Code:
var editor = GetCurrentEditor();
}}
{{
164 jst 1.233
165 if (prefName.substr(0, kUseCssPref.length) == kUseCssPref)
166 {
167 var cmd = document.getElementById("cmd_highlight");
168 if (cmd) {
169 var prefs = GetPrefs();
170 var useCSS = prefs.getBoolPref(prefName);
171 var editor = GetCurrentEditor();
199 cmanske 1.193 var editor = GetCurrentEditor();
}}| Assignee | ||
Updated•20 years ago
|
Flags: blocking1.8b?
Target Milestone: --- → mozilla1.8beta
| Assignee | ||
Comment 1•20 years ago
|
||
Possible additional cleanup: I wonder if "all" |GetPrefs()| and |var prefs| could be replaced by |gPrefs| !?
Updated•20 years ago
|
Flags: blocking1.8b? → blocking1.8b-
| Assignee | ||
Comment 2•19 years ago
|
||
Comment on attachment 173689 [details] [diff] [review] (Av1-Bw) <editor.js> Neil: Could you have a look at my previous comment(s), and possibly take r? and sr? ? (This patch still applies cleanly))
Attachment #173689 -
Flags: superreview?(neil)
Comment 3•19 years ago
|
||
Comment on attachment 173689 [details] [diff] [review] (Av1-Bw) <editor.js> >+ var useCSS = GetPrefs().getBoolPref(prefName); Yes, this should probably use gPrefs. (I managed to use both in one patch, and you've now made me feel really stupid, but fortunately my reviewer didn't spot it either, so I'm not the only one!) >+ else if (editor && (prefName.substr(0, kCRInParagraphsPref.length) == kCRInParagraphsPref)) This doesn't need to be substr; that was only necessary for the button preferences because editor watches all the buttons at once. Here we're only watching one pref.
Attachment #173689 -
Flags: superreview?(neil) → superreview-
| Assignee | ||
Updated•19 years ago
|
Attachment #173689 -
Attachment is obsolete: true
Attachment #173689 -
Flags: review?(daniel)
| Assignee | ||
Comment 4•19 years ago
|
||
Av1-Bw, with comment 3 suggestion(s). I kept the 3 |substr()| related to buttons, and another one... (untested and not for checkin)
Attachment #216669 -
Flags: superreview?(neil)
Attachment #216669 -
Flags: review?(neil)
Updated•19 years ago
|
Attachment #216669 -
Flags: superreview?(neil)
Attachment #216669 -
Flags: superreview+
Attachment #216669 -
Flags: review?(neil)
Attachment #216669 -
Flags: review+
| Assignee | ||
Comment 5•19 years ago
|
||
Same as Av2-Bw, with full diff, for checkin.
| Assignee | ||
Comment 6•19 years ago
|
||
Comment on attachment 216779 [details] [diff] [review] (Av2) <editor.js> [Checked in: Comment 6] Checkin: { 2006-04-04 00:59 neil%parkwaycc.co.uk mozilla/editor/ui/composer/content/editor.js 1.238 } 'approval-branch-1.8.1=?': Trivial JS code cleanup, no risk.
Attachment #216779 -
Attachment description: (Av2) <editor.js> → (Av2) <editor.js>
[Checked in: Comment 6]
Attachment #216779 -
Flags: approval-branch-1.8.1?(asa)
| Assignee | ||
Updated•19 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Component: Composer → Editor
Product: Mozilla Application Suite → Core
Resolution: --- → FIXED
Target Milestone: mozilla1.8beta1 → mozilla1.9alpha
| Assignee | ||
Updated•19 years ago
|
Attachment #216779 -
Flags: approval-branch-1.8.1?(asa) → approval-branch-1.8.1?(daniel)
Updated•19 years ago
|
Attachment #216779 -
Flags: approval-branch-1.8.1?(daniel) → approval1.8.1?
Updated•19 years ago
|
Attachment #216779 -
Flags: approval1.8.1? → approval1.8.1-
Comment 7•19 years ago
|
||
Not clear why this is needed on the 1.8 branch since it is just code cleanup. Let us know if there is a functional reason you want it there.
| Assignee | ||
Comment 8•19 years ago
|
||
(In reply to comment #7) > Not clear why this is needed on the 1.8 branch since it is just code cleanup. > Let us know if there is a functional reason you want it there. To make it short, it's more a matter of synchronization/optimization than of need/functionality. Yet, what would be the reason not to have it on 1.8.1 !? (1.8.0 being left alone)
You need to log in
before you can comment on or make changes to this bug.
Description
•