Closed Bug 1551929 Opened 5 years ago Closed 5 years ago

Connection::ExecuteAsync seems to make assumptions that may not hold

Categories

(Toolkit :: Storage, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla68
Tracking Status
firefox68 --- fixed

People

(Reporter: bzbarsky, Assigned: bzbarsky)

Details

Attachments

(1 file)

The code gets an array of mozIStorageBaseStatement and does this:

    nsCOMPtr<StorageBaseStatementInternal> stmt =
        do_QueryInterface(aStatements[i]);

and then assumes stmt is not null. But there's nothing guaranteeing that. In particular, mozIStorageBaseStatement is not builtinclass, so the caller could be passing a JS implementation.

I suspect that mozIStorageBaseStatement (and mozIStorageAsyncStatement and mozIStorageStatement) should be builtinclass, right?

Flags: needinfo?(bugmail)

Yes. All mozIStorage interfaces should be builtinclass.

Flags: needinfo?(bugmail)
Pushed by bzbarsky@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/41f28d23024e
Mark some storage interfaces builtinclass, since we assume there are no JS implementations already.  r=asuth
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68
Assignee: nobody → bzbarsky
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: