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

Unified Diff: third_party/WebKit/Source/platform/SharedBuffer.cpp

Issue 2253853002: Remove SharedBuffer::unlock() and keep Resource's SharedBuffer always locked (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use hasClientsOrObservers() for live_size Created 4 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 | « third_party/WebKit/Source/platform/SharedBuffer.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/SharedBuffer.cpp
diff --git a/third_party/WebKit/Source/platform/SharedBuffer.cpp b/third_party/WebKit/Source/platform/SharedBuffer.cpp
index 6ce6466b54320d0db0037e446ea4c78f831d7dcc..48d73cd612f2ab7f0075d6072ca433ad7a10c2ef 100644
--- a/third_party/WebKit/Source/platform/SharedBuffer.cpp
+++ b/third_party/WebKit/Source/platform/SharedBuffer.cpp
@@ -123,7 +123,6 @@ void SharedBuffer::append(PassRefPtr<SharedBuffer> data)
void SharedBuffer::appendInternal(const char* data, size_t length)
{
- ASSERT(isLocked());
if (!length)
return;
@@ -210,7 +209,6 @@ void SharedBuffer::mergeSegmentsIntoBuffer() const
size_t SharedBuffer::getSomeDataInternal(const char*& someData, size_t position) const
{
- ASSERT(isLocked());
size_t totalSize = size();
if (position >= totalSize) {
someData = 0;
@@ -283,22 +281,6 @@ sk_sp<SkData> SharedBuffer::getAsSkData() const
return data;
}
-bool SharedBuffer::lock()
-{
- return m_buffer.lock();
-}
-
-void SharedBuffer::unlock()
-{
- mergeSegmentsIntoBuffer();
- m_buffer.unlock();
-}
-
-bool SharedBuffer::isLocked() const
-{
- return m_buffer.isLocked();
-}
-
void SharedBuffer::onMemoryDump(const String& dumpPrefix, WebProcessMemoryDump* memoryDump) const
{
if (m_buffer.size()) {
« no previous file with comments | « third_party/WebKit/Source/platform/SharedBuffer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698