Closed Bug 871287 Opened 12 years ago Closed 12 years ago

Move DeviceStorage to WebIDL

Categories

(Core :: DOM: Device Interfaces, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla24

People

(Reporter: Ms2ger, Assigned: Ms2ger)

References

(Blocks 1 open bug)

Details

Attachments

(3 files, 1 obsolete file)

No description provided.
Attached patch Patch v1 (obsolete) — Splinter Review
Attachment #748716 - Flags: review?(doug.turner)
Attachment #748716 - Flags: review?(doug.turner) → review?(bugs)
Comment on attachment 748716 [details] [diff] [review] Patch v1 > class nsDOMDeviceStorage MOZ_FINAL > : public nsDOMEventTargetHelper > , public nsIDOMDeviceStorage > , public nsIObserver > { >+ typedef mozilla::ErrorResult ErrorResult; >+ typedef mozilla::dom::DeviceStorageEnumerationParameters >+ EnumerationParameters; >+ typedef mozilla::dom::DOMCursor DOMCursor; >+ typedef mozilla::dom::DOMRequest DOMRequest; Not sure I like these typedefs, but ok. >+ already_AddRefed<DOMRequest> >+ FreeSpace(ErrorResult& aRv); >+ already_AddRefed<DOMRequest> >+ UsedSpace(ErrorResult& aRv); >+ already_AddRefed<DOMRequest> >+ Available(ErrorResult& aRv); This is hard to read. Please add some newlines, or just put return value to the same line with method name, if there is enough space. > NS_IMETHODIMP > nsDOMDeviceStorage::Add(nsIDOMBlob *aBlob, nsIDOMDOMRequest * *_retval) Could you rename _retval > nsDOMDeviceStorage::AddNamed(nsIDOMBlob *aBlob, > const nsAString & aPath, > nsIDOMDOMRequest * *_retval) ditto > nsDOMDeviceStorage::FreeSpace(nsIDOMDOMRequest** aRetval) > { >+ ErrorResult rv; >+ nsRefPtr<DOMRequest> request = FreeSpace(rv); >+ request.forget(aRetval); I think I'd write this and other similar cases like *aRetVal = FreeSpace(rv).get(); But if you prefer using forget, that is ok. >+++ b/dom/interfaces/devicestorage/nsIDOMDeviceStorage.idl update uuid but apparently new patch coming.
Attachment #748716 - Flags: review?(bugs)
Attachment #753821 - Flags: review?(doug.turner)
Second try
Attachment #748716 - Attachment is obsolete: true
Attachment #753826 - Flags: review?(bugs)
Comment on attachment 753826 [details] [diff] [review] Part c: Move DeviceStorage to Paris bindings (v2) Still not right... Apparently nsRefPtr<DOMRequest> request = new DOMRequest(win); nsCOMPtr<nsIRunnable> r = new PostErrorEvent(request, POST_ERROR_EVENT_UNKNOWN); will leave |request| null.
Attachment #753826 - Flags: review?(bugs)
Attachment #753826 - Attachment description: Part b: Move DeviceStorage to Paris bindings (v2) → Part c: Move DeviceStorage to Paris bindings (v2)
Attachment #753826 - Flags: review?(bugs)
Attachment #754222 - Flags: review?(doug.turner)
Attachment #754222 - Flags: review?(doug.turner) → review?(dhylands)
Attachment #753821 - Flags: review?(doug.turner) → review?(dhylands)
Comment on attachment 753826 [details] [diff] [review] Part c: Move DeviceStorage to Paris bindings (v2) I hope we have some tests for enumerate*
Attachment #753826 - Flags: review?(bugs) → review+
Comment on attachment 753821 [details] [diff] [review] Part a: Random cleanup Review of attachment 753821 [details] [diff] [review]: ----------------------------------------------------------------- r=me with prototype cleanup ::: dom/devicestorage/DeviceStorage.h @@ +194,5 @@ > nsIDOMDOMRequest** aRetval, > bool aEditable); > > + void > + GetInternal(nsPIDOMWindow* aWin, const nsAString& aPath, DOMRequest* aRequest, nit: The other prototypes here have the return type on the same line as the function name. This should follow suit.
Attachment #753821 - Flags: review?(dhylands) → review+
Attachment #754222 - Flags: review?(dhylands) → review+
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Flags: in-testsuite-
Resolution: --- → FIXED
Target Milestone: --- → mozilla24
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: