Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1547)

Unified Diff: Source/core/platform/SharedBuffer.h

Issue 22900016: x (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/fetch/ImageResource.cpp ('k') | Source/core/platform/graphics/BitmapImage.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/platform/SharedBuffer.h
diff --git a/Source/core/platform/SharedBuffer.h b/Source/core/platform/SharedBuffer.h
index 4e6dcf8b869bcf840db02993cf2021d32f8db6ad..fca55d796f1ca0a04accbacced57019ea7ec9c77 100644
--- a/Source/core/platform/SharedBuffer.h
+++ b/Source/core/platform/SharedBuffer.h
@@ -33,6 +33,7 @@
#include "wtf/RefCounted.h"
#include "wtf/Vector.h"
#include "wtf/text/WTFString.h"
+#include "core/platform/chromium/TraceEvent.h"
namespace WebCore {
@@ -97,6 +98,9 @@ public:
// ArrayBuffer without merging segmented buffers into a flat buffer.
PassRefPtr<ArrayBuffer> getAsArrayBuffer() const;
+ void setDebug(const String& debug) { m_debug = debug; }
+ String debug() const { return m_debug; }
+
private:
SharedBuffer();
explicit SharedBuffer(size_t);
@@ -114,8 +118,11 @@ private:
mutable Vector<char> m_buffer;
mutable Vector<char*> m_segments;
mutable OwnPtr<PurgeableBuffer> m_purgeableBuffer;
+ String m_debug;
};
+inline const char *debug(const SharedBuffer* b) { return TRACE_STR_COPY(b ? b->debug().ascii().data() : "NO-DATA"); }
+
} // namespace WebCore
#endif // SharedBuffer_h
« no previous file with comments | « Source/core/fetch/ImageResource.cpp ('k') | Source/core/platform/graphics/BitmapImage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698