Closed Bug 555260 Opened 14 years ago Closed 10 years ago

Async statement callback throws an error if handleCompletion() is not implemented

Categories

(Toolkit :: Storage, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: ancestor.ak, Unassigned)

Details

Attachments

(1 file)

656 bytes, application/x-javascript
Details
Attached file testcase
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.3a4pre) Gecko/20100325 Minefield/3.7a4pre

Consumers should be able to skip callback methods they don't need. Yet, in this testcase I get the following exception:

Error: [Exception... "'JavaScript component does not have a method named: "handleCompletion"' when calling method: [mozIStorageStatementCallback::handleCompletion]"  nsresult: "0x80570030 (NS_ERROR_XPC_JSOBJECT_HAS_NO_FUNCTION_NAMED)"  location: "<unknown>"  data: no]
This is due to XPConnect and storage cannot do anything about it.
Component: Storage → XPConnect
Product: Toolkit → Core
QA Contact: storage → xpconnect
> Consumers should be able to skip callback methods they don't need.

If you want that, then the callback API needs to be something different from just an interface implementation.  Interface implementations cannot, in fact, skip implementing part of the interface.

storage could do something about this by defining a different callback API of some sort, but given the way its declared right now xpconnect's behavior is correct.
Component: XPConnect → Storage
Product: Core → Toolkit
QA Contact: xpconnect → storage
It's not an actual error that propagates to anything, just the console.  Storage doesn't care if you don't implement all parts of the callback either.  At this point, I'm leaning to WONTFIX.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: