Stop using [deprecated] Storage methods (testpilot)

RESOLVED FIXED

Status

defect
RESOLVED FIXED
9 years ago
3 years ago

People

(Reporter: sdwilsh, Assigned: jono)

Tracking

Details

Attachments

(1 attachment, 1 obsolete attachment)

Posted patch v1.0 (obsolete) — Splinter Review
These are going away in bug 645049, so we need to update our code to the new
world order.
Attachment #521870 - Flags: review?(dtownsend)
Summary: Stop using [deprecated] Storage methods → Stop using [deprecated] Storage methods (testpilot)
Whiteboard: [needs review Mossop]
Looks ok to me however I don't think we're updating the in-tree version at this point. Jono should take this and land it in the main repo for the extension.
Whiteboard: [needs review Mossop]
Attachment #521870 - Flags: review?(dtownsend) → review+
Jono, can you clarify what needs to be done with this patch please?
My only concern is whether this change breaks backwards compatibility with Firefox 3.6.  When was the new API introduced?
The new API was introduced in 4.0 (albeit, very early in the cycle).  If this needs to work with 3.6 still, we can just change the call to stmt.params[index] = value which works all the way back to 3.5.
Although I am looking forward to not having to support older versions, Jinghua and i had a discussion about dropping support for 3.6 and decided it wasn't time yet.

So is it OK to use stmt.params[index] = value?  There's no security concerns, or issues with getting an unwanted data type conversion?
(In reply to comment #5)
> So is it OK to use stmt.params[index] = value?  There's no security concerns,
> or issues with getting an unwanted data type conversion?
You'll still want to do the string escaping there that you currently do, but otherwise it's identical (and syntactically nicer to use).  It's what I actually encourage JS consumers to do.
Whiteboard: [needs input jono]
Done in http://hg.mozilla.org/labs/testpilot/rev/50d150fa6116
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
(This version of the patch uses the backwards-compatible API)
Assignee: sdwilsh → jdicarlo
Attachment #521870 - Attachment is obsolete: true
Status: RESOLVED → REOPENED
Attachment #524917 - Flags: review?(mark.finkle)
Resolution: FIXED → ---
Whiteboard: [needs input jono] → needs-integration
Attachment #524917 - Flags: review?(mark.finkle) → review+
Landed on m-c as a part of http://hg.mozilla.org/mozilla-central/rev/f6152e382b94
Status: REOPENED → RESOLVED
Closed: 9 years ago8 years ago
Resolution: --- → FIXED
Whiteboard: needs-integration
Product: Mozilla Labs → Mozilla Labs Graveyard
You need to log in before you can comment on or make changes to this bug.