Index: third_party/WebKit/Source/core/mojo/Mojo.cpp |
diff --git a/third_party/WebKit/Source/core/mojo/Mojo.cpp b/third_party/WebKit/Source/core/mojo/Mojo.cpp |
index 8cddb115bec3e534445f178ef9bafefa5c1b989b..f06dc11939b90f6c1bec17ae4f74b19623573478 100644 |
--- a/third_party/WebKit/Source/core/mojo/Mojo.cpp |
+++ b/third_party/WebKit/Source/core/mojo/Mojo.cpp |
@@ -5,6 +5,7 @@ |
#include "core/mojo/Mojo.h" |
#include "core/mojo/MojoCreateMessagePipeResult.h" |
+#include "core/mojo/MojoCreateSharedBufferResult.h" |
#include "core/mojo/MojoHandle.h" |
namespace blink { |
@@ -27,4 +28,18 @@ void Mojo::createMessagePipe(MojoCreateMessagePipeResult& resultDict) { |
} |
} |
+// static |
+void Mojo::createSharedBuffer(unsigned numBytes, |
+ MojoCreateSharedBufferResult& resultDict) { |
+ MojoCreateSharedBufferOptions* options = nullptr; |
+ mojo::Handle handle; |
+ MojoResult result = |
+ MojoCreateSharedBuffer(options, numBytes, handle.mutable_value()); |
+ |
+ resultDict.setResult(result); |
+ if (result == MOJO_RESULT_OK) { |
+ resultDict.setHandle(MojoHandle::create(mojo::MakeScopedHandle(handle))); |
+ } |
+} |
+ |
} // namespace blink |