Closed Bug 902362 Opened 12 years ago Closed 12 years ago

DOMRequestHelper specifies _requests as array, but should be object

Categories

(Core :: XPCOM, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla26

People

(Reporter: janjongboom, Assigned: janjongboom)

Details

Attachments

(2 files)

In base/dom/DOMRequestHelper.jsm, this._requests is defined as an array. However the variable is never used as an array because non-numeric keys are set and thus it's an object in disguise. I think we should change it to an object.
Fabrice, can you ni? this to someone who could verify this?
Flags: needinfo?(fabrice)
Yes, it looks like we should change that. Do you mind writing the patch?
Flags: needinfo?(fabrice)
Assignee: nobody → janjongboom
Attached patch 902362.diffSplinter Review
I have done a `grep _requests -R .` in mozilla-central and so far I can only see the mozKeyboard using DOMRequestHelper.prototype._requests directly. And that already handles it correctly. So I think it's safe.
Attachment #787379 - Flags: review?(fabrice)
Comment on attachment 787379 [details] [diff] [review] 902362.diff Review of attachment 787379 [details] [diff] [review]: ----------------------------------------------------------------- r=me on this patch. The code using _requests directly in mozKeyboard.js should be changed though.
Attachment #787379 - Flags: review?(fabrice) → review+
Checkin needed for 'Patch including commit message'
Keywords: checkin-needed
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla26
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: