Closed
Bug 347683
Opened 18 years ago
Closed 18 years ago
strict warnings
Categories
(Firefox :: General, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: csthomas, Assigned: csthomas)
References
Details
Attachments
(2 files, 1 obsolete file)
1.63 KB,
patch
|
asaf
:
review+
|
Details | Diff | Splinter Review |
1.15 KB,
patch
|
asaf
:
review+
|
Details | Diff | Splinter Review |
JavaScript strict warning: chrome://browser/content/browser.js, line 6646: trailing comma is not legal in ECMA-262 object initializers JavaScript strict warning: chrome://browser/content/places/toolbar.xml, line 623: function TBV_DO_onDragStart does not always return a value
Assignee | ||
Comment 1•18 years ago
|
||
return a value consistently, and remove spurious commas
Attachment #232475 -
Flags: review?(mconnor)
Updated•18 years ago
|
Status: NEW → ASSIGNED
Component: General → Places
QA Contact: general → places
Assignee | ||
Comment 2•18 years ago
|
||
When dropping a tab after the last tab, the old code resulted in an out-of-bounds array access. Using .item() avoids the warning and returns null more cleanly.
Attachment #232476 -
Flags: review?(mconnor)
Updated•18 years ago
|
Component: Places → General
QA Contact: places → general
Comment 3•18 years ago
|
||
(In reply to comment #2) > Created an attachment (id=232476) [edit] > fix another one > > When dropping a tab after the last tab, the old code resulted in an > out-of-bounds array access. Using .item() avoids the warning and returns null > more cleanly. This one affects the 1.8 branch, too. Might want to request approval1.8.1 on it (couldn't hurt!). :)
Comment 4•18 years ago
|
||
I'm not entirely certain [] and .item() aren't synonymous, and if I'm right this looks like a bug.
Comment 5•18 years ago
|
||
(In reply to comment #4) >I'm not entirely certain [] and .item() aren't synonymous, and if I'm right >this looks like a bug. FYI foo[a] is roughly equivalent to 0 <= a && a < foo.length ? foo.item(a) : (report_strict_warning(), undefined);
Assignee | ||
Updated•18 years ago
|
Whiteboard: [cst: r?]
Assignee | ||
Comment 6•18 years ago
|
||
Comment on attachment 232475 [details] [diff] [review] patch [checked in] Trying a different reviewer.
Attachment #232475 -
Flags: review?(mconnor) → review?(mano)
Assignee | ||
Updated•18 years ago
|
Attachment #232476 -
Flags: review?(mconnor) → review?(mano)
Comment 7•18 years ago
|
||
Comment on attachment 232476 [details] [diff] [review] fix another one If there's an out-of-bounds issue here, let's fix that instead.
Attachment #232476 -
Flags: review?(mano) → review-
Comment 8•18 years ago
|
||
Comment on attachment 232475 [details] [diff] [review] patch [checked in] r=mano
Attachment #232475 -
Flags: review?(mano) → review+
Assignee | ||
Updated•18 years ago
|
Attachment #232475 -
Attachment description: patch → patch [checked in]
Assignee | ||
Comment 9•18 years ago
|
||
Added comment explaining why you need to use .item so nobody "cleans up" this code in the future.
Attachment #232476 -
Attachment is obsolete: true
Attachment #243144 -
Flags: review?(mano)
Comment 10•18 years ago
|
||
Comment on attachment 243144 [details] [diff] [review] fix another one, with comment explaining why this is correct [checked in] ok, r=mano.
Attachment #243144 -
Flags: review?(mano) → review+
Assignee | ||
Updated•18 years ago
|
Attachment #243144 -
Attachment description: fix another one, with comment explaining why this is correct → fix another one, with comment explaining why this is correct [checked in]
Assignee | ||
Updated•18 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Whiteboard: [cst: r?]
You need to log in
before you can comment on or make changes to this bug.
Description
•