summaryrefslogtreecommitdiffstats
path: root/PRESUBMIT.py
diff options
context:
space:
mode:
authorpliard@chromium.org <pliard@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-27 15:47:17 +0000
committerpliard@chromium.org <pliard@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-27 15:47:17 +0000
commit17de2f9b82e9dd71fc88c9b81a52bc204c6efb2f (patch)
tree80a940baa2f9ff94aa2ce2ff742b586661722341 /PRESUBMIT.py
parent53d96fbbf880cad9f26d7f60941b6ea36baeb617 (diff)
downloadchromium_src-17de2f9b82e9dd71fc88c9b81a52bc204c6efb2f.zip
chromium_src-17de2f9b82e9dd71fc88c9b81a52bc204c6efb2f.tar.gz
chromium_src-17de2f9b82e9dd71fc88c9b81a52bc204c6efb2f.tar.bz2
Fix CrossProcessNotificationMultiProcessTest.Basic on Android.
On Android the ashmem API is used to deal with shared memory. This API doesn't provide any way to open a memory region created by another process for security reasons. The only way to share memory on Android is to share the underlying file descriptor between processes. This can be accomplished by: - Creating a new shared memory region in a process. Note that this region can be anonymous (i.e. the string provided to ashmem_create_region() can be empty). - Forking and keeping open both in the parent and child processes the file descriptor corresponding to the previously created memory region. - Doing an mmap() in both processes (nothing special here). The unit test was deadlocking (stuck in the while loop in the child process) since the call to CreateNamed() wasn't opening the existing shared memory region (created by the parent process) but was actually creating a new shared memory region. This means that the two processes were actually seeing different memory regions. Since this also works on POSIX platforms, the unit test was modified to follow this strategy on all POSIX systems (including Android). On Windows the old strategy (using non-anonymous shared memory) is still used. BUG=136720 Review URL: https://chromiumcodereview.appspot.com/11299159 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@169662 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'PRESUBMIT.py')
0 files changed, 0 insertions, 0 deletions