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

Unified Diff: Source/wtf/ArrayBuffer.cpp

Issue 148283013: Blink JavaScript shared memory prototype. Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Tweaks Created 6 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 | « Source/wtf/ArrayBuffer.h ('k') | Source/wtf/ArrayBufferContents.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/wtf/ArrayBuffer.cpp
diff --git a/Source/wtf/ArrayBuffer.cpp b/Source/wtf/ArrayBuffer.cpp
index cfbdc9de1418bca9204a2a7a94e37116d28251ac..3eb4420eef997e067ce1e7ea0fee6ab0474bf5fd 100644
--- a/Source/wtf/ArrayBuffer.cpp
+++ b/Source/wtf/ArrayBuffer.cpp
@@ -40,6 +40,11 @@ bool ArrayBuffer::transfer(ArrayBufferContents& result)
return false;
}
+ if (m_contents.shared()) {
+ m_contents.transfer(result);
+ return true;
+ }
+
bool allViewsAreNeuterable = true;
for (ArrayBufferView* i = m_firstView; i; i = i->m_nextView) {
if (!i->isNeuterable())
« no previous file with comments | « Source/wtf/ArrayBuffer.h ('k') | Source/wtf/ArrayBufferContents.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698