Usually we have already_AddRefed<T> return values for forget() methods in
scoped refcounting systems so this is a bit different if the result is ever
assigned to another similar auto-refcount object. The return value is in fact
not used, so use "mFile.forget()" to simplify things and either return its
result directly or make the function return type void.
>+ operator void*() { return mFile; }
Making this "operator nsILocalFile*()" would be more explicit.
Comment on attachment 575899
Bug 635918 Part 1 - Make nsISound::Play use libcanberra on Linux rather than esound (v3)
I didn't know the nsLocalFile implementation was thread safe, but yay it is: mxr.mozilla. org/mozilla- central/ source/ xpcom/io/ nsLocalFileUnix .cpp#287
http://
>+ nsILocalFile* forget() {
>+ nsILocalFile *tmp;
>+ mFile.forget(&tmp);
>+ return tmp;
>+ }
Usually we have already_AddRefed<T> return values for forget() methods in
scoped refcounting systems so this is a bit different if the result is ever
assigned to another similar auto-refcount object. The return value is in fact
not used, so use "mFile.forget()" to simplify things and either return its
result directly or make the function return type void.
>+ operator void*() { return mFile; }
Making this "operator nsILocalFile*()" would be more explicit.