Bug 754457. Disallow copy-construction of ErrorResult, so it can only be passed by reference, not by value. r=peterv
authorBoris Zbarsky <bzbarsky@mit.edu>
Tue, 15 May 2012 14:23:29 -0400
changeset 98554 095eef67ec7baa978791459ce71e432f9653aa43
parent 98553 a23d7ab147321ae42dcd8565172cca9ea4c07ad8
child 98555 8ffae46336ed8c0cc6c48d461c212b501d5e6265
push id173
push userlsblakk@mozilla.com
push dateFri, 24 Aug 2012 15:39:16 +0000
treeherdermozilla-release@bcc45eb1fb41 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspeterv
bugs754457
milestone15.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 754457. Disallow copy-construction of ErrorResult, so it can only be passed by reference, not by value. r=peterv
dom/bindings/ErrorResult.h
--- a/dom/bindings/ErrorResult.h
+++ b/dom/bindings/ErrorResult.h
@@ -42,13 +42,17 @@ public:
   }
 
   nsresult ErrorCode() const {
     return mResult;
   }
 
 private:
   nsresult mResult;
+
+  // Not to be implemented, to make sure people always pass this by
+  // reference, not by value.
+  ErrorResult(const ErrorResult&) MOZ_DELETE;
 };
 
 } // namespace mozilla
 
 #endif /* mozilla_ErrorResult_h */