Bug 1123114 - Mark DOMString::mStringBuffer as unsafe; r=smaug
authorEhsan Akhgari <ehsan@mozilla.com>
Sun, 18 Jan 2015 14:15:48 -0500
changeset 224468 9604119ee9d31d583cb4473e3578c622c43adf26
parent 224467 7e6b191f83f739289756fae6590082be792a4a0e
child 224469 953aecc38f56cf797438209af38be82a574e4d8b
push id28131
push usercbook@mozilla.com
push dateMon, 19 Jan 2015 15:10:25 +0000
treeherdermozilla-central@f8e4fdb89a05 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs1123114
milestone38.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 1123114 - Mark DOMString::mStringBuffer as unsafe; r=smaug
dom/bindings/DOMString.h
--- a/dom/bindings/DOMString.h
+++ b/dom/bindings/DOMString.h
@@ -170,17 +170,19 @@ public:
   }
 
 private:
   // We need to be able to act like a string as needed
   Maybe<nsAutoString> mString;
 
   // For callees that know we exist, we can be a stringbuffer/length/null-flag
   // triple.
-  nsStringBuffer* mStringBuffer;
+  nsStringBuffer* MOZ_UNSAFE_REF("The ways in which this can be safe are "
+                                 "documented above and enforced through "
+                                 "assertions") mStringBuffer;
   uint32_t mLength;
   bool mIsNull;
 };
 
 } // namespace dom
 } // namespace mozilla
 
 #endif // mozilla_dom_DOMString_h