Fix dereference of NULL host in VersionUpdater::Create.
[chromium-blink-merge.git] / mojo / platform_handle / platform_handle_functions.h
blobdec5d1f187492ddb558d4c3424875fda68639118
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef MOJO_PLATFORM_HANDLE_PLATFORM_HANDLE_FUNCTIONS_H_
6 #define MOJO_PLATFORM_HANDLE_PLATFORM_HANDLE_FUNCTIONS_H_
8 #include "mojo/platform_handle/platform_handle.h"
9 #include "mojo/platform_handle/platform_handle_exports.h"
10 #include "third_party/mojo/src/mojo/public/c/system/types.h"
12 extern "C" {
14 // Wraps |platform_handle| in a MojoHandle so that it can transported, returns
15 // true on success. This takes ownership of |platform_handle|, regardless of
16 // whether this succeeds.
17 PLATFORM_HANDLE_EXPORT MojoResult
18 MojoCreatePlatformHandleWrapper(MojoPlatformHandle platform_handle,
19 MojoHandle* wrapper);
21 PLATFORM_HANDLE_EXPORT MojoResult
22 MojoExtractPlatformHandle(MojoHandle wrapper,
23 MojoPlatformHandle* platform_handle);
25 } // extern "C"
27 #endif // MOJO_PLATFORM_HANDLE_PLATFORM_HANDLE_FUNCTIONS_H_