Note: There are a few cases of duplicates in user autocompletion which are being worked on.

DeviceStorage - Add onchange notifications for volume state changes

RESOLVED FIXED in mozilla17

Status

()

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

People

(Reporter: dougt, Assigned: dougt)

Tracking

Trunk
mozilla17
All
Gonk (Firefox OS)
Points:
---

Firefox Tracking Flags

(blocking-basecamp:+)

Details

Attachments

(2 attachments)

Comment hidden (empty)
(Assignee)

Comment 1

5 years ago
Created attachment 649365 [details] [diff] [review]
patch v.1
Attachment #649365 - Flags: review?(jonas)
(Assignee)

Comment 2

5 years ago
Created attachment 649366 [details] [diff] [review]
-w patch - same as v.1
(Assignee)

Updated

5 years ago
Depends on: 780693
Comment on attachment 649365 [details] [diff] [review]
patch v.1

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

::: dom/devicestorage/nsDeviceStorage.cpp
@@ +1563,5 @@
> +  nsCOMPtr<nsIDOMEvent> event;
> +  NS_NewDOMDeviceStorageChangeEvent(getter_AddRefs(event), nullptr, nullptr);
> +
> +  nsCOMPtr<nsIDOMDeviceStorageChangeEvent> ce = do_QueryInterface(event);
> +  nsresult rv = ce->InitDeviceStorageChangeEvent(NS_LITERAL_STRING("change"),

I actually tend to prefer to fire different events for enabled/disabled-like things, so here separate events for "mounted" and "unmounted". But I think this is fine for now.

@@ +1608,5 @@
> +    NS_NewLocalFile(filepath, false, getter_AddRefs(f));
> + 
> +    nsCString creason;
> +    creason.AssignWithConversion(reason);
> +    CopyUTF16toUTF8(reason, creason);

You're assigning twice. Remove the .AssignWithConversion line.
Attachment #649365 - Flags: review?(jonas) → review+
blocking-basecamp: --- → +
(Assignee)

Comment 4

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

Comment 5

5 years ago
https://hg.mozilla.org/mozilla-central/rev/cc583bf8519c
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.