summaryrefslogtreecommitdiffstats
path: root/ipc
diff options
context:
space:
mode:
authorscottmg <scottmg@chromium.org>2015-06-19 15:46:44 -0700
committerCommit bot <commit-bot@chromium.org>2015-06-19 22:47:28 +0000
commit6035df80f37efa71e92990e6461b85f2c1e92289 (patch)
tree7042ccf5f4997ece1f2c8cf30fca40320d8bba10 /ipc
parente7cdb77e1d0e7057306ac624a2407cf8de312c36 (diff)
downloadchromium_src-6035df80f37efa71e92990e6461b85f2c1e92289.zip
chromium_src-6035df80f37efa71e92990e6461b85f2c1e92289.tar.gz
chromium_src-6035df80f37efa71e92990e6461b85f2c1e92289.tar.bz2
Revert of Make SharedMemoryHandle a class on Mac. (patchset #20 id:580001 of https://codereview.chromium.org/1163943004/)
Reason for revert: Possibly breaking Mac build: FAILED: cd ../../third_party/libyuv; export BUILT_PRODUCTS_DIR=/b/build/slave/GPU_Mac_Builder/build/src/out/Release; export CONFIGURATION=Release; export PRODUCT_NAME=libyuv_nacl; export SDKROOT=/Applications/Xcode5.1.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk; export SRCROOT=/b/build/slave/GPU_Mac_Builder/build/src/out/Release/../../third_party/libyuv; export SOURCE_ROOT="${SRCROOT}"; export TARGET_BUILD_DIR=/b/build/slave/GPU_Mac_Builder/build/src/out/Release; export TEMP_DIR="${TMPDIR}";python ../../native_client/build/build_nexe.py --root ../.. --product-dir ../../out/Release/xyz --config-name Release -t ../../native_client/toolchain/ --arch pnacl --build newlib_plib --name ../../out/Release/gen/tc_pnacl_newlib/lib/libyuv_nacl.a --objdir ../../out/Release/obj/third_party/libyuv/libyuv_nacl.gen/pnacl_newlib-pnacl/libyuv_nacl "--include-dirs=../../out/Release/gen/tc_pnacl_newlib/include ../.. \"../../out/Release/gen\" include" "--compile_flags=-O2 -g -Wall -fdiagnostics-show-option -Werror -Wno-unused-function -Wno-char-subscripts -Wno-c++11-extensions -Wno-unnamed-type-template-args -Wno-extra-semi -Wno-unused-private-field -Wno-char-subscripts -Wno-unused-function \"-std=gnu++11\" " --gomadir /b/build/goma "--defines=\"__STDC_LIMIT_MACROS=1\" \"__STDC_FORMAT_MACROS=1\" \"_GNU_SOURCE=1\" \"_DEFAULT_SOURCE=1\" \"_BSD_SOURCE=1\" \"_POSIX_C_SOURCE=199506\" \"_XOPEN_SOURCE=600\" \"DYNAMIC_ANNOTATIONS_ENABLED=1\" \"DYNAMIC_ANNOTATIONS_PREFIX=NACL_\" \"NACL_BUILD_ARCH=x86\" V8_DEPRECATION_WARNINGS \"__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORE=0\" CHROMIUM_BUILD \"CR_CLANG_REVISION=239765-1\" \"USE_LIBJPEG_TURBO=1\" ENABLE_ONE_CLICK_SIGNIN ENABLE_PRE_SYNC_BACKUP \"ENABLE_REMOTING=1\" \"ENABLE_WEBRTC=1\" \"ENABLE_MEDIA_ROUTER=1\" USE_PROPRIETARY_CODECS ENABLE_PEPPER_CDMS ENABLE_CONFIGURATION_POLICY ENABLE_NOTIFICATIONS \"ENABLE_HIDPI=1\" SYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE DONT_EMBED_BUILD_METADATA \"DCHECK_ALWAYS_ON=1\" \"ENABLE_TASK_MANAGER=1\" \"ENABLE_EXTENSIONS=1\" \"ENABLE_PLUGIN_INSTALLATION=1\" \"ENABLE_PLUGINS=1\" \"ENABLE_SESSION_SERVICE=1\" \"ENABLE_THEMES=1\" \"ENABLE_AUTOFILL_DIALOG=1\" \"ENABLE_BACKGROUND=1\" \"ENABLE_GOOGLE_NOW=1\" \"CLD_VERSION=2\" \"ENABLE_PRINTING=1\" \"ENABLE_BASIC_PRINTING=1\" \"ENABLE_PRINT_PREVIEW=1\" \"ENABLE_SPELLCHECK=1\" \"ENABLE_CAPTIVE_PORTAL_DETECTION=1\" \"ENABLE_APP_LIST=1\" \"ENABLE_SETTINGS_APP=1\" \"ENABLE_SUPERVISED_USERS=1\" \"ENABLE_SERVICE_DISCOVERY=1\" \"ENABLE_WIFI_BOOTSTRAPPING=1\" V8_USE_EXTERNAL_STARTUP_DATA FULL_SAFE_BROWSING SAFE_BROWSING_CSD SAFE_BROWSING_DB_LOCAL SAFE_BROWSING_SERVICE \"USE_LIBPCI=1\" \"USE_OPENSSL=1\"" "--link_flags=-B../../out/Release/gen/tc_pnacl_newlib/lib " "--source-list=../../out/gypfiles/third_party/libyuv/pnacl_newlib.libyuv_nacl.source_list.gypcmd" source/row_any.cc:13:10: fatal error: 'memory.h' file not found #include <memory.h> // for memcpy() ^ 1 error generated. FAILED with 1: /b/build/goma/gomacc ../../native_client/toolchain/mac_x86/pnacl_newlib/bin/pnacl-clang++ -c source/row_any.cc -o ../../out/Release/obj/third_party/libyuv/libyuv_nacl.gen/pnacl_newlib-pnacl/libyuv_nacl/row_any_67f422e1.o -MD -MF ../../out/Release/obj/third_party/libyuv/libyuv_nacl.gen/pnacl_newlib-pnacl/libyuv_nacl/row_any_67f422e1.o.d -O2 -g -Wall -fdiagnostics-show-option -Werror -Wno-unused-function -Wno-char-subscripts -Wno-c++11-extensions -Wno-unnamed-type-template-args -Wno-extra-semi -Wno-unused-private-field -Wno-char-subscripts -Wno-unused-function -std=gnu++11 -D__STDC_LIMIT_MACROS=1 -D__STDC_FORMAT_MACROS=1 -D_GNU_SOURCE=1 -D_DEFAULT_SOURCE=1 -D_BSD_SOURCE=1 -D_POSIX_C_SOURCE=199506 -D_XOPEN_SOURCE=600 -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DDYNAMIC_ANNOTATIONS_PREFIX=NACL_ -DV8_DEPRECATION_WARNINGS -D__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORE=0 -DCHROMIUM_BUILD -DCR_CLANG_REVISION=239765-1 -DUSE_LIBJPEG_TURBO=1 -DENABLE_ONE_CLICK_SIGNIN -DENABLE_PRE_SYNC_BACKUP -DENABLE_REMOTING=1 -DENABLE_WEBRTC=1 -DENABLE_MEDIA_ROUTER=1 -DUSE_PROPRIETARY_CODECS -DENABLE_PEPPER_CDMS -DENABLE_CONFIGURATION_POLICY -DENABLE_NOTIFICATIONS -DENABLE_HIDPI=1 -DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE -DDONT_EMBED_BUILD_METADATA -DDCHECK_ALWAYS_ON=1 -DENABLE_TASK_MANAGER=1 -DENABLE_EXTENSIONS=1 -DENABLE_PLUGIN_INSTALLATION=1 -DENABLE_PLUGINS=1 -DENABLE_SESSION_SERVICE=1 -DENABLE_THEMES=1 -DENABLE_AUTOFILL_DIALOG=1 -DENABLE_BACKGROUND=1 -DENABLE_GOOGLE_NOW=1 -DCLD_VERSION=2 -DENABLE_PRINTING=1 -DENABLE_BASIC_PRINTING=1 -DENABLE_PRINT_PREVIEW=1 -DENABLE_SPELLCHECK=1 -DENABLE_CAPTIVE_PORTAL_DETECTION=1 -DENABLE_APP_LIST=1 -DENABLE_SETTINGS_APP=1 -DENABLE_SUPERVISED_USERS=1 -DENABLE_SERVICE_DISCOVERY=1 -DENABLE_WIFI_BOOTSTRAPPING=1 -DV8_USE_EXTERNAL_STARTUP_DATA -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DSAFE_BROWSING_SERVICE -DUSE_LIBPCI=1 -DUSE_OPENSSL=1 -DNACL_WINDOWS=0 -DNACL_OSX=0 -DNACL_LINUX=0 -DNACL_ANDROID=0 -DNACL_BUILD_ARCH=pnacl -I../../out/Release/gen/tc_pnacl_newlib/include -I../.. -I../../out/Release/gen -Iinclude -DNDEBUG -std=gnu++0x -Wno-deprecated-register Compile options: ['-O2', '-g', '-Wall', '-fdiagnostics-show-option', '-Werror', '-Wno-unused-function', '-Wno-char-subscripts', '-Wno-c++11-extensions', '-Wno-unnamed-type-template-args', '-Wno-extra-semi', '-Wno-unused-private-field', '-Wno-char-subscripts', '-Wno-unused-function', '-std=gnu++11', '-D__STDC_LIMIT_MACROS=1', '-D__STDC_FORMAT_MACROS=1', '-D_GNU_SOURCE=1', '-D_DEFAULT_SOURCE=1', '-D_BSD_SOURCE=1', '-D_POSIX_C_SOURCE=199506', '-D_XOPEN_SOURCE=600', '-DDYNAMIC_ANNOTATIONS_ENABLED=1', '-DDYNAMIC_ANNOTATIONS_PREFIX=NACL_', '-DV8_DEPRECATION_WARNINGS', '-D__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORE=0', '-DCHROMIUM_BUILD', '-DCR_CLANG_REVISION=239765-1', '-DUSE_LIBJPEG_TURBO=1', '-DENABLE_ONE_CLICK_SIGNIN', '-DENABLE_PRE_SYNC_BACKUP', '-DENABLE_REMOTING=1', '-DENABLE_WEBRTC=1', '-DENABLE_MEDIA_ROUTER=1', '-DUSE_PROPRIETARY_CODECS', '-DENABLE_PEPPER_CDMS', '-DENABLE_CONFIGURATION_POLICY', '-DENABLE_NOTIFICATIONS', '-DENABLE_HIDPI=1', '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE', '-DDONT_EMBED_BUILD_METADATA', '-DDCHECK_ALWAYS_ON=1', '-DENABLE_TASK_MANAGER=1', '-DENABLE_EXTENSIONS=1', '-DENABLE_PLUGIN_INSTALLATION=1', '-DENABLE_PLUGINS=1', '-DENABLE_SESSION_SERVICE=1', '-DENABLE_THEMES=1', '-DENABLE_AUTOFILL_DIALOG=1', '-DENABLE_BACKGROUND=1', '-DENABLE_GOOGLE_NOW=1', '-DCLD_VERSION=2', '-DENABLE_PRINTING=1', '-DENABLE_BASIC_PRINTING=1', '-DENABLE_PRINT_PREVIEW=1', '-DENABLE_SPELLCHECK=1', '-DENABLE_CAPTIVE_PORTAL_DETECTION=1', '-DENABLE_APP_LIST=1', '-DENABLE_SETTINGS_APP=1', '-DENABLE_SUPERVISED_USERS=1', '-DENABLE_SERVICE_DISCOVERY=1', '-DENABLE_WIFI_BOOTSTRAPPING=1', '-DV8_USE_EXTERNAL_STARTUP_DATA', '-DFULL_SAFE_BROWSING', '-DSAFE_BROWSING_CSD', '-DSAFE_BROWSING_DB_LOCAL', '-DSAFE_BROWSING_SERVICE', '-DUSE_LIBPCI=1', '-DUSE_OPENSSL=1', '-DNACL_WINDOWS=0', '-DNACL_OSX=0', '-DNACL_LINUX=0', '-DNACL_ANDROID=0', '-DNACL_BUILD_ARCH=pnacl', '-I../../out/Release/gen/tc_pnacl_newlib/include', '-I../..', '-I../../out/Release/gen', '-Iinclude', '-DNDEBUG'] Linker options: ['-B../../out/Release/gen/tc_pnacl_newlib/lib'] Traceback (most recent call last): File "../../native_client/build/build_nexe.py", line 849, in CompileProcess output_queue.put((filename, build.Compile(filename))) File "../../native_client/build/build_nexe.py", line 579, in Compile raise Error('FAILED with %d: %s' % (err, ' '.join(cmd_line))) Error: FAILED with 1: /b/build/goma/gomacc ../../native_client/toolchain/mac_x86/pnacl_newlib/bin/pnacl-clang++ -c source/row_any.cc -o ../../out/Release/obj/third_party/libyuv/libyuv_nacl.gen/pnacl_newlib-pnacl/libyuv_nacl/row_any_67f422e1.o -MD -MF ../../out/Release/obj/third_party/libyuv/libyuv_nacl.gen/pnacl_newlib-pnacl/libyuv_nacl/row_any_67f422e1.o.d -O2 -g -Wall -fdiagnostics-show-option -Werror -Wno-unused-function -Wno-char-subscripts -Wno-c++11-extensions -Wno-unnamed-type-template-args -Wno-extra-semi -Wno-unused-private-field -Wno-char-subscripts -Wno-unused-function -std=gnu++11 -D__STDC_LIMIT_MACROS=1 -D__STDC_FORMAT_MACROS=1 -D_GNU_SOURCE=1 -D_DEFAULT_SOURCE=1 -D_BSD_SOURCE=1 -D_POSIX_C_SOURCE=199506 -D_XOPEN_SOURCE=600 -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DDYNAMIC_ANNOTATIONS_PREFIX=NACL_ -DV8_DEPRECATION_WARNINGS -D__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORE=0 -DCHROMIUM_BUILD -DCR_CLANG_REVISION=239765-1 -DUSE_LIBJPEG_TURBO=1 -DENABLE_ONE_CLICK_SIGNIN -DENABLE_PRE_SYNC_BACKUP -DENABLE_REMOTING=1 -DENABLE_WEBRTC=1 -DENABLE_MEDIA_ROUTER=1 -DUSE_PROPRIETARY_CODECS -DENABLE_PEPPER_CDMS -DENABLE_CONFIGURATION_POLICY -DENABLE_NOTIFICATIONS -DENABLE_HIDPI=1 -DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE -DDONT_EMBED_BUILD_METADATA -DDCHECK_ALWAYS_ON=1 -DENABLE_TASK_MANAGER=1 -DENABLE_EXTENSIONS=1 -DENABLE_PLUGIN_INSTALLATION=1 -DENABLE_PLUGINS=1 -DENABLE_SESSION_SERVICE=1 -DENABLE_THEMES=1 -DENABLE_AUTOFILL_DIALOG=1 -DENABLE_BACKGROUND=1 -DENABLE_GOOGLE_NOW=1 -DCLD_VERSION=2 -DENABLE_PRINTING=1 -DENABLE_BASIC_PRINTING=1 -DENABLE_PRINT_PREVIEW=1 -DENABLE_SPELLCHECK=1 -DENABLE_CAPTIVE_PORTAL_DETECTION=1 -DENABLE_APP_LIST=1 -DENABLE_SETTINGS_APP=1 -DENABLE_SUPERVISED_USERS=1 -DENABLE_SERVICE_DISCOVERY=1 -DENABLE_WIFI_BOOTSTRAPPING=1 -DV8_USE_EXTERNAL_STARTUP_DATA -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DSAFE_BROWSING_SERVICE -DUSE_LIBPCI=1 -DUSE_OPENSSL=1 -DNACL_WINDOWS=0 -DNACL_OSX=0 -DNACL_LINUX=0 -DNACL_ANDROID=0 -DNACL_BUILD_ARCH=pnacl -I../../out/Release/gen/tc_pnacl_newlib/include -I../.. -I../../out/Release/gen -Iinclude -DNDEBUG -std=gnu++0x -Wno-deprecated-register ninja: build stopped: subcommand failed. Original issue's description: > Mac: Make SharedMemoryHandle its own class. > > This is in prepration for allowing SharedMemoryHandle to be backed by both Mach > primitives and POSIX fds. Other than a slight change in the wire format for > SharedMemoryHandle on Mac, there are no other intended behavior changes. > > This CL makes a new file shared_memory_handle.h to hold the now expanded logic > for SharedMemoryHandle. This CL forks the file shared_memory_posix.cc to > shared_memory_mac.cc, since the implementations are about to heavily diverge. > > BUG=466437 > NOPRESUBMIT=true > > Committed: https://crrev.com/cc9f9127f979acd6eb22103656057a655a0e76a6 > Cr-Commit-Position: refs/heads/master@{#335360} TBR=dalecurtis@chromium.org,piman@chromium.org,rsesek@chromium.org,thakis@chromium.org,tsepez@chromium.org,mcasas@chromium.org,reveman@chromium.org,erikchen@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=466437 Review URL: https://codereview.chromium.org/1200473003 Cr-Commit-Position: refs/heads/master@{#335374}
Diffstat (limited to 'ipc')
-rw-r--r--ipc/ipc_message_utils.cc56
-rw-r--r--ipc/ipc_message_utils.h14
2 files changed, 0 insertions, 70 deletions
diff --git a/ipc/ipc_message_utils.cc b/ipc/ipc_message_utils.cc
index b6b9792..f86022c 100644
--- a/ipc/ipc_message_utils.cc
+++ b/ipc/ipc_message_utils.cc
@@ -20,10 +20,6 @@
#include "ipc/ipc_platform_file_attachment_posix.h"
#endif
-#if defined(OS_MACOSX) && !defined(OS_IOS)
-#include "base/memory/shared_memory_handle.h"
-#endif // defined(OS_MACOSX) && !defined(OS_IOS)
-
#if defined(OS_WIN)
#include <tchar.h>
#endif
@@ -520,58 +516,6 @@ void ParamTraits<base::FileDescriptor>::Log(const param_type& p,
}
#endif // defined(OS_POSIX)
-#if defined(OS_MACOSX) && !defined(OS_IOS)
-void ParamTraits<base::SharedMemoryHandle>::Write(Message* m,
- const param_type& p) {
- m->WriteInt(p.GetType());
-
- if (p.GetType() == base::SharedMemoryHandle::POSIX)
- ParamTraits<base::FileDescriptor>::Write(m, p.GetFileDescriptor());
-}
-
-bool ParamTraits<base::SharedMemoryHandle>::Read(const Message* m,
- base::PickleIterator* iter,
- param_type* r) {
- base::SharedMemoryHandle::TypeWireFormat type;
- if (!iter->ReadInt(&type))
- return false;
-
- base::SharedMemoryHandle::Type shm_type = base::SharedMemoryHandle::POSIX;
- switch (type) {
- case base::SharedMemoryHandle::POSIX:
- case base::SharedMemoryHandle::MACH: {
- shm_type = static_cast<base::SharedMemoryHandle::Type>(type);
- break;
- }
- default:
- return false;
- }
-
- if (shm_type == base::SharedMemoryHandle::POSIX) {
- base::FileDescriptor file_descriptor;
-
- bool success =
- ParamTraits<base::FileDescriptor>::Read(m, iter, &file_descriptor);
- if (!success)
- return false;
-
- *r = base::SharedMemoryHandle(file_descriptor.fd,
- file_descriptor.auto_close);
- return true;
- }
-
- return true;
-}
-
-void ParamTraits<base::SharedMemoryHandle>::Log(const param_type& p,
- std::string* l) {
- if (p.GetType() == base::SharedMemoryHandle::POSIX) {
- l->append(base::StringPrintf("Mechanism POSIX Fd"));
- ParamTraits<base::FileDescriptor>::Log(p.GetFileDescriptor(), l);
- }
-}
-#endif // defined(OS_MACOSX) && !defined(OS_IOS)
-
void ParamTraits<base::FilePath>::Write(Message* m, const param_type& p) {
p.WriteToPickle(m);
}
diff --git a/ipc/ipc_message_utils.h b/ipc/ipc_message_utils.h
index 96bb689..9465141 100644
--- a/ipc/ipc_message_utils.h
+++ b/ipc/ipc_message_utils.h
@@ -57,10 +57,6 @@ class TimeDelta;
class TimeTicks;
class TraceTicks;
struct FileDescriptor;
-
-#if defined(OS_MACOSX) && !defined(OS_IOS)
-class SharedMemoryHandle;
-#endif // defined(OS_MACOSX) && !defined(OS_IOS)
}
namespace IPC {
@@ -471,16 +467,6 @@ struct IPC_EXPORT ParamTraits<base::FileDescriptor> {
};
#endif // defined(OS_POSIX)
-#if defined(OS_MACOSX) && !defined(OS_IOS)
-template <>
-struct IPC_EXPORT ParamTraits<base::SharedMemoryHandle> {
- typedef base::SharedMemoryHandle param_type;
- static void Write(Message* m, const param_type& p);
- static bool Read(const Message* m, base::PickleIterator* iter, param_type* r);
- static void Log(const param_type& p, std::string* l);
-};
-#endif
-
template <>
struct IPC_EXPORT ParamTraits<base::FilePath> {
typedef base::FilePath param_type;