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

Unified Diff: third_party/WebKit/Source/wtf/typed_arrays/ArrayBufferContents.cpp

Issue 1993623002: Move adjustAmountOfExternalMemory after allocation call (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/wtf/typed_arrays/ArrayBufferContents.cpp
diff --git a/third_party/WebKit/Source/wtf/typed_arrays/ArrayBufferContents.cpp b/third_party/WebKit/Source/wtf/typed_arrays/ArrayBufferContents.cpp
index 466d5ed12744f7850d6da0a274a0695cc69ab427..722a5ecfaca3c58b14ca01e4367ea42c330ae7f1 100644
--- a/third_party/WebKit/Source/wtf/typed_arrays/ArrayBufferContents.cpp
+++ b/third_party/WebKit/Source/wtf/typed_arrays/ArrayBufferContents.cpp
@@ -139,11 +139,11 @@ void ArrayBufferContents::DataHolder::allocateNew(unsigned sizeInBytes, SharingT
{
ASSERT(!m_data);
void* data = nullptr;
- if (s_adjustAmountOfExternalAllocatedMemoryFunction)
- s_adjustAmountOfExternalAllocatedMemoryFunction(static_cast<int>(sizeInBytes));
allocateMemory(sizeInBytes, policy, data);
m_data = data;
m_sizeInBytes = data ? sizeInBytes : 0;
+ if (s_adjustAmountOfExternalAllocatedMemoryFunction)
+ s_adjustAmountOfExternalAllocatedMemoryFunction(static_cast<int>(m_sizeInBytes));
m_isShared = isShared;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698