| Index: mojo/edk/system/shared_buffer_dispatcher.cc
|
| diff --git a/mojo/edk/system/shared_buffer_dispatcher.cc b/mojo/edk/system/shared_buffer_dispatcher.cc
|
| index 7e345d93f837af69627fc25920470657dff3191f..38ac39000aa418c3a3702ff024fc788a1e8d1cb4 100644
|
| --- a/mojo/edk/system/shared_buffer_dispatcher.cc
|
| +++ b/mojo/edk/system/shared_buffer_dispatcher.cc
|
| @@ -10,7 +10,7 @@
|
| #include "base/memory/scoped_ptr.h"
|
| #include "mojo/edk/embedder/platform_support.h"
|
| #include "mojo/edk/system/channel.h"
|
| -#include "mojo/edk/system/constants.h"
|
| +#include "mojo/edk/system/configuration.h"
|
| #include "mojo/edk/system/memory.h"
|
| #include "mojo/edk/system/options_validation.h"
|
| #include "mojo/public/c/system/macros.h"
|
| @@ -69,7 +69,7 @@ MojoResult SharedBufferDispatcher::Create(
|
| scoped_refptr<SharedBufferDispatcher>* result) {
|
| if (!num_bytes)
|
| return MOJO_RESULT_INVALID_ARGUMENT;
|
| - if (num_bytes > kMaxSharedMemoryNumBytes)
|
| + if (num_bytes > GetConfiguration().max_shared_memory_num_bytes)
|
| return MOJO_RESULT_RESOURCE_EXHAUSTED;
|
|
|
| scoped_refptr<embedder::PlatformSharedBuffer> shared_buffer(
|
| @@ -163,8 +163,8 @@ MojoResult SharedBufferDispatcher::ValidateDuplicateOptions(
|
| if (!reader.is_valid())
|
| return MOJO_RESULT_INVALID_ARGUMENT;
|
|
|
| - if (!OPTIONS_STRUCT_HAS_MEMBER(
|
| - MojoDuplicateBufferHandleOptions, flags, reader))
|
| + if (!OPTIONS_STRUCT_HAS_MEMBER(MojoDuplicateBufferHandleOptions, flags,
|
| + reader))
|
| return MOJO_RESULT_OK;
|
| if ((reader.options().flags & ~kKnownFlags))
|
| return MOJO_RESULT_UNIMPLEMENTED;
|
|
|