stop returning arrays from DeviceStorage.getDeviceStorage()

RESOLVED FIXED in mozilla17

Status

()

Core
DOM: Device Interfaces
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: dougt, Assigned: dougt)

Tracking

unspecified
mozilla17
x86
Mac OS X
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

22.65 KB, patch
Ben Turner (not reading bugmail, use the needinfo flag!)
: review+
Details | Diff | Splinter Review
(Assignee)

Description

5 years ago
Created attachment 645511 [details] [diff] [review]
patch v.1

Passing arrays back from:

 getDeviceStorage(DOMString type);

sounded like it was the right thing to do, but it isn't.  Instead we should have different 'types' for shared directories (like "sharedpictures") or something.

Currently we don't even support anything other than returning one DeviceStorage anyhow.

Lets restore DeviceStorage to what we had.
(Assignee)

Updated

5 years ago
Assignee: nobody → doug.turner
(Assignee)

Updated

5 years ago
Attachment #645511 - Flags: review?(jonas)
(Assignee)

Updated

5 years ago
Attachment #645511 - Flags: review?(jonas) → review?(bent.mozilla)
Attachment #645511 - Attachment is patch: true
Comment on attachment 645511 [details] [diff] [review]
patch v.1

Review of attachment 645511 [details] [diff] [review]:
-----------------------------------------------------------------

::: dom/devicestorage/nsDeviceStorage.cpp
@@ +1412,4 @@
>  {
> +  nsRefPtr<nsDOMDeviceStorage> storage = new nsDOMDeviceStorage();
> +  if (NS_SUCCEEDED(storage->Init(aWin, aType))) {
> +    NS_ADDREF(*aStore = storage);

Nit: |storage.forget(aStore)| should work.

::: dom/interfaces/devicestorage/nsIDOMNavigatorDeviceStorage.idl
@@ +7,5 @@
>  
>  /**
>   * Property that extends the navigator object.
>   */
>  [scriptable, uuid(A4B2831D-6065-472F-8A6D-2C9085C74C15)]

Need to bump the IID
Attachment #645511 - Flags: review?(bent.mozilla) → review+
(Assignee)

Comment 2

5 years ago
> Nit: |storage.forget(aStore)| should work.


Everywhere in this file we use the macros NS_ADDREF or NS_IF_ADDREF.  Maybe as a follow up we can convert these all over to something more modern?

> Need to bump the IID

Thanks!
(Assignee)

Comment 3

5 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/cb017d051029

Comment 4

5 years ago
https://hg.mozilla.org/mozilla-central/rev/cb017d051029
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla17
You need to log in before you can comment on or make changes to this bug.