summaryrefslogtreecommitdiff
path: root/core/fxcrt/widestring.h
diff options
context:
space:
mode:
Diffstat (limited to 'core/fxcrt/widestring.h')
-rw-r--r--core/fxcrt/widestring.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/core/fxcrt/widestring.h b/core/fxcrt/widestring.h
index cefdfabcd0..b668b0292c 100644
--- a/core/fxcrt/widestring.h
+++ b/core/fxcrt/widestring.h
@@ -17,7 +17,7 @@
#include "core/fxcrt/string_data_template.h"
#include "core/fxcrt/string_view_template.h"
#include "third_party/base/optional.h"
-
+#include "third_party/base/span.h"
namespace fxcrt {
@@ -171,7 +171,10 @@ class WideString {
void TrimRight(const WideStringView& targets);
void Reserve(size_t len);
- wchar_t* GetBuffer(size_t len);
+
+ // Note: any modification of the string (including ReleaseBuffer()) may
+ // invalidate the span, which must not outlive its buffer.
+ pdfium::span<wchar_t> GetBuffer(size_t len);
void ReleaseBuffer(size_t len);
int GetInteger() const;