Closed Bug 433456 Opened 16 years ago Closed 15 years ago

mozIStorageFunction should be a [function]

Categories

(Toolkit :: Storage, defect)

defect
Not set
trivial

Tracking

()

RESOLVED FIXED
mozilla1.9.2b1
Tracking Status
status1.9.1 --- .4-fixed

People

(Reporter: Mook, Assigned: kitallis)

References

()

Details

(Keywords: dev-doc-complete, verified1.9.1)

Attachments

(1 file)

mozIStorageFunction is, as its name states, a (callback) function; it has exactly one method and no attributes, and its sole purpose in life is to be a callback.

It should be tagged as [function] to be easier to use from JS.  There's seriously no point it not being one.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Whiteboard: [good first bug]
Attachment #391591 - Flags: review?(sdwilsh)
Assignee: nobody → kitallis
Comment on attachment 391591 [details] [diff] [review]
|function| added
[Checkin: Comment 3 & 13]

r=sdwilsh
Attachment #391591 - Flags: review?(sdwilsh) → review+
Comment on attachment 391591 [details] [diff] [review]
|function| added
[Checkin: Comment 3 & 13]


http://hg.mozilla.org/mozilla-central/rev/0dd522c0975c

"approval1.9.1.3=?":
Trivial, 0 risk.
Attachment #391591 - Attachment description: |function| added. → |function| added [Checkin: Comment 3]
Attachment #391591 - Flags: approval1.9.1.3?
Severity: enhancement → trivial
Status: NEW → RESOLVED
Closed: 15 years ago
Keywords: checkin-needed
Hardware: x86 → All
Resolution: --- → FIXED
Whiteboard: [good first bug]
Target Milestone: --- → mozilla1.9.2b1
Does the uuid need to be changed for this? If so, and maybe even if not, this isn't a trivial patch and can't be accepted on branch unless another interface is created, which probably isn't worth it...
Comment on attachment 391591 [details] [diff] [review]
|function| added
[Checkin: Comment 3 & 13]

Approved for 1.9.1.4, a=dveditz for release-drivers
Attachment #391591 - Flags: approval1.9.1.3? → approval1.9.1.4+
(In reply to comment #4)

> Does the uuid need to be changed for this? If so, and maybe even if not, this

To be explicit, this patch does _not_ change the uuid.

> isn't a trivial patch and can't be accepted on branch unless another interface
> is created, which probably isn't worth it...

Shawn, what about that? (I'm confused.)
Flags: in-testsuite-
Someone said on irc that the uuid doesn't need to be changed - it's only looked at by xpconnect and it doesn't impact native code callers (who care about the uuid).

This patch is fine as is (hence the r+).
To be explicit, I was asking for a confirmation that the patch was good for m-1.9.1...
Whiteboard: [c-n: m-1.9.2]
Whiteboard: [c-n: m-1.9.2] → [c-n: m-1.9.1]
How does this affect usage? Want to be sure I get this change properly documented. At immediate glance, it doesn't look like there's really much to do other than update the most recently updated version number in the doc.
(In reply to comment #9)
> How does this affect usage?
In the example on the mozIStorageFunction page, it can now be written as:

dbConn.createFunction("square", 1, function(aArguments) let (value = aArguments.getInt32(0)) value * value );

You can now pass in a function directly, instead of an object with a onFunctionCall property; this is similar to how DOM event listeners can be functions, and not objects with a handleEvent property.
Thanks for the tip; now I understand what this means. I suspected that's what it was but needed to be sure, obviously.

Updated the doc here with a second, revised, sample; would appreciate it if someone could confirm that it looks right:

https://developer.mozilla.org/en/mozIStorageFunction
Tweaked the code sample slightly to be a little more clear.
Attachment #391591 - Attachment description: |function| added [Checkin: Comment 3] → |function| added [Checkin: Comment 3 & 13]
Verified checked into 1.9.1 for 1.9.1.4 by looking at source.
Keywords: verified1.9.1
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: