summaryrefslogtreecommitdiffstats
path: root/mojo/public/cpp/bindings
Commit message (Collapse)AuthorAgeFilesLines
* [mojo-sdk] Disable the RunnableAdapter constructor if the sink is a Runnable*.amistry2016-03-231-1/+18
| | | | | | | | | | | This allows the user to pass a Runnable* to the Callback's constructor without explicitly down casting it to a Runnable*. BUG=None Review URL: https://codereview.chromium.org/1813383003 Cr-Commit-Position: refs/heads/master@{#382946}
* Mojo C++ bindings: some MultiplexRouter optimization.yzshen2016-03-232-49/+86
| | | | | | | | | | | | | This CL: - reduces post tasks; - reduces map lookups; - removes unnecessary lock and state check when sending messages. BUG= Review URL: https://codereview.chromium.org/1831513002 Cr-Commit-Position: refs/heads/master@{#382933}
* Mojo bindings: Fix typemap includes.sammc2016-03-239-87/+145
| | | | | | | | | | | | | | | | | | | | | | | Previously, a header defining a StructTraits specialization could not include its corresponding generated mojom header, due to the mojom header including the StructTraits header. This required a brittle set of forward declarations to correctly avoid this; in practice, this mostly led to StructTraits that were nominally for a particular variant, but included the generated mojom header from the default variant. This CL fixes the issue by splitting typemap headers into public_headers, which define the native type and are included by the generated mojom header, and headers which define the StructTraits specialization for the native type and are only included by the generated mojom source file, allowing the StructTraits header to include the generated mojom header. BUG=596202 CQ_INCLUDE_TRYBOTS=tryserver.chromium.win:win_optional_gpu_tests_rel Review URL: https://codereview.chromium.org/1821073002 Cr-Commit-Position: refs/heads/master@{#382893}
* Make ChannelMojo Send thread-saferockot2016-03-234-0/+15
| | | | | | | | | | | | | | | | Changes ChannelMojo to write outgoing Receive requests directly to the pipe rather than using its AssociatedInterfacePtr. The associated interface ID is still included in each outgoing message. This lets us mark ChannelMojo::Send as thread-safe, avoiding a thread-hop when sending IPCs through IPC::ChannelProxy. BUG=595082 Review URL: https://codereview.chromium.org/1825543002 Cr-Commit-Position: refs/heads/master@{#382762}
* Make mojo::Callback safe to copy across threads and destroy on any thread.amistry2016-03-215-26/+90
| | | | | | | | | | This brings the behaviour of mojo::Callback close to that of base::Callback. BUG=595939 Review URL: https://codereview.chromium.org/1819463002 Cr-Commit-Position: refs/heads/master@{#382349}
* Mojo C++ bindings: assume that all imported mojoms have the same variant as ↵yzshen2016-03-191-3/+6
| | | | | | | | | | | | current mojom. This CL also disable struct_traits_unittest because variant+typemap is not supported currently. BUG=596202,596162 Review URL: https://codereview.chromium.org/1816703002 Cr-Commit-Position: refs/heads/master@{#382143}
* Mojo C++ bindings: fix sanity check of wtf string serialization.yzshen2016-03-181-11/+10
| | | | | | | | | | | | | | | | | Previously the code had a check that we use exactly the same WTF::String object for GetSerializedSize_ and Serialize_ call. However, because WTF::String is ref-counted, we may end up using different WTF::String objects referring to the same contents. That may happen, e.g., when moving WTF::String to a different container. This CL changes the sanity check to verify that the size of WTF::String remains unchanged. BUG=595791 Review URL: https://codereview.chromium.org/1810253002 Cr-Commit-Position: refs/heads/master@{#381880}
* Mojo C++ bindigns: fix generated namespace when variant is specified.yzshen2016-03-171-0/+1
| | | | | | | | | | | | | This fixed the issue that enum generated code didn't work when variant is specified. This is a quick fix, we need more fundermental improvement for variant handling code. BUG=595791 Review URL: https://codereview.chromium.org/1811853004 Cr-Commit-Position: refs/heads/master@{#381760}
* Mojo C++ bindings: MultiplexRouter more aggressively dispatch queued messages.yzshen2016-03-162-13/+8
| | | | | | | | | | | | | | | This CL allows MultiplexRouter to dispatch multiple queued messages to clients without returning to the message loop. This way we may starve other tasks on the same thread, but we have been doing the same thing in the non-associated-interface case (see Connector::ReadAllAvailableMessages). So it is probably okay. BUG=590495 Review URL: https://codereview.chromium.org/1808583003 Cr-Commit-Position: refs/heads/master@{#381514}
* Mojo C++ bindings: introduce mojo::WTFArray.yzshen2016-03-1514-404/+845
| | | | | | | | | | | | mojo::WTFArray is a thin wrapper around WTF::Vector. It is move-only and can express null array. You can move WTF::Vector in/out of mojo::WTFArray. If "--for_blink" is specified for the bindings generator, the generator will map mojo array to mojo::WTFArray BUG=583738 Review URL: https://codereview.chromium.org/1766093002 Cr-Commit-Position: refs/heads/master@{#381265}
* Mojo C++ bindings: fix the for_blink_tests target.Yuzhu Shen2016-03-151-1/+0
| | | | | | | | | | | | It depends on mojo_public_test_support, which is unnecessary and broke blink_platform_unittests in isolated mode. BUG=583738 TBR=rockot@chromium.org Review URL: https://codereview.chromium.org/1800843003 . Cr-Commit-Position: refs/heads/master@{#381164}
* [mojo-sdk] Cache the connector's weak self to avoid a malloc/free on every ↵amistry2016-03-142-3/+7
| | | | | | | | | | incoming message. BUG=None Review URL: https://codereview.chromium.org/1802443002 Cr-Commit-Position: refs/heads/master@{#381100}
* Mojo C++ bindings: support mapping mojo string to WTF::String.yzshen2016-03-1414-30/+389
| | | | | | | | | | The generator now supports a "--for_blink" flag. When it is specified, the generator will map mojo string to WTF::String. BUG=583738 Review URL: https://codereview.chromium.org/1751563002 Cr-Commit-Position: refs/heads/master@{#381091}
* [mojo] Implement pipe fusion APIrockot2016-03-142-0/+46
| | | | | | | | | | | | | | | Sometimes it's desirable to fuse two pipes together. This is particularly useful when a service provides some kind of interface pipe later than its consumers would like to have such a pipe available. Rather than require the service to be rewritten to accommodate such cases, a consumer could create its own disconnected pipe and fuse it lazily with a service endpoint. BUG=591742 Review URL: https://codereview.chromium.org/1785843002 Cr-Commit-Position: refs/heads/master@{#380964}
* [mojo-sdk] Remove mojo_ignore_result and move C++ macros.h to bindings ↵amistry2016-03-1122-18/+114
| | | | | | | | | | | | internal code. The one macro remaining in macros.h is only used by generated C++ code. BUG=534695 Review URL: https://codereview.chromium.org/1784743003 Cr-Commit-Position: refs/heads/master@{#380556}
* Mojo C++ bindings: remove the utility/ folder.yzshen2016-03-101-2/+0
| | | | | | | | BUG=570102 Review URL: https://codereview.chromium.org/1784643002 Cr-Commit-Position: refs/heads/master@{#380472}
* [mojo-sdk] Replace assert() usage in bindings with DCHECK.amistry2016-03-102-9/+8
| | | | | | | | BUG=None Review URL: https://codereview.chromium.org/1773403006 Cr-Commit-Position: refs/heads/master@{#380357}
* Mojo C++ bindings: error notification behavior related to sync calls.yzshen2016-03-094-10/+152
| | | | | | | | | | | | | This CL changes the behavior to: - connection error handler doesn't reenter ongoing sync calls. - connection error handler is delayed until all queued asynchronous messages are processed. BUG=577699 Review URL: https://codereview.chromium.org/1781573004 Cr-Commit-Position: refs/heads/master@{#380259}
* Mojo C++ bindings: remove the concept of "GenericInterface".yzshen2016-03-0811-122/+135
| | | | | | | | | | | | | | | | Previously, if a variant Foo1 was generated for mojom interface Foo. Foo1::GenericInterface was defined as a typedef of the non-variant version Foo. This required the non-variant version to be generated and depended on by all variants. The purpose was to make different variants use the same [Associated]Interface{PtrInfo,Request} types. In fact, this is not very useful in real-world use cases. It should be very rare that users need to deal with multiple variants of the same mojom interface in a single same app. This change removes GenericInterface and makes [Associated]Interface{PtrInfo, Request} directly use Foo1 instead of Foo1::GenericInterface. BUG=590329 Review URL: https://codereview.chromium.org/1775613003 Cr-Commit-Position: refs/heads/master@{#379970}
* Remove Mojo bindings environment.Yuzhu Shen2016-03-081-2/+0
| | | | | | | | | BUG=585942 R=ben@chromium.org Review URL: https://codereview.chromium.org/1765243002 . Cr-Commit-Position: refs/heads/master@{#379839}
* Mojo C++ bindings: add empty() for Array and Map.yzshen2016-03-084-1/+43
| | | | | | | | BUG=None Review URL: https://codereview.chromium.org/1776583002 Cr-Commit-Position: refs/heads/master@{#379804}
* Add an end-to-end, multi-process perftest of using Mojo with the C++ bindings.amistry2016-03-082-0/+199
| | | | | | | | BUG=582823 Review URL: https://codereview.chromium.org/1764023002 Cr-Commit-Position: refs/heads/master@{#379717}
* Fix mojo_public_bindings_perftests and add GN build rules.amistry2016-03-071-4/+8
| | | | | | | | BUG=582823 Review URL: https://codereview.chromium.org/1768883002 Cr-Commit-Position: refs/heads/master@{#379633}
* [mojo-bindings] Use Watch API instead of MessagePumpMojorockot2016-03-073-30/+22
| | | | | | | | | | | | | | | | | | | | | | | This removes the C++ bindings dependency on MessagePumpMojo, consuming the new Watch API instead. For convenience a new mojo::Watcher is added to the public Mojo C++ API library, and this is used by Connector. BUG=590495 R=yzshen@chromium.org TBR=blundell@chromium.org for rename affecting components/message_port.gypi TBR=jam@chromium.org - added a missing header to new url tests Committed: https://crrev.com/d06373e7cd8b4ad725ed5c64c958f2de13585add Cr-Commit-Position: refs/heads/master@{#379402} Committed: https://crrev.com/2cdb2f677c68f06b3bc54cd40f000ab961a09bbb Cr-Commit-Position: refs/heads/master@{#379463} Review URL: https://codereview.chromium.org/1759783003 Cr-Commit-Position: refs/heads/master@{#379508}
* Revert of [mojo-bindings] Use Watch API instead of MessagePumpMojo (patchset ↵Ken Rockot2016-03-063-22/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | #12 id:210001 of https://codereview.chromium.org/1759783003/ ) Reason for revert: one more time. mojo_app_tests flake Original issue's description: > [mojo-bindings] Use Watch API instead of MessagePumpMojo > > This removes the C++ bindings dependency on MessagePumpMojo, > consuming the new Watch API instead. > > For convenience a new mojo::Watcher is added to the public > Mojo C++ API library, and this is used by Connector. > > BUG=590495 > R=yzshen@chromium.org > TBR=blundell@chromium.org for rename affecting components/message_port.gypi > TBR=jam@chromium.org - added a missing header to new url tests > > Committed: https://crrev.com/d06373e7cd8b4ad725ed5c64c958f2de13585add > Cr-Commit-Position: refs/heads/master@{#379402} > > Committed: https://crrev.com/2cdb2f677c68f06b3bc54cd40f000ab961a09bbb > Cr-Commit-Position: refs/heads/master@{#379463} TBR=jam@chromium.org,yzshen@chromium.org # Not skipping CQ checks because original CL landed more than 1 days ago. BUG=590495 Review URL: https://codereview.chromium.org/1772503002 . Cr-Commit-Position: refs/heads/master@{#379492}
* [mojo-bindings] Use Watch API instead of MessagePumpMojorockot2016-03-053-30/+22
| | | | | | | | | | | | | | | | | | | | This removes the C++ bindings dependency on MessagePumpMojo, consuming the new Watch API instead. For convenience a new mojo::Watcher is added to the public Mojo C++ API library, and this is used by Connector. BUG=590495 R=yzshen@chromium.org TBR=blundell@chromium.org for rename affecting components/message_port.gypi TBR=jam@chromium.org - added a missing header to new url tests Committed: https://crrev.com/d06373e7cd8b4ad725ed5c64c958f2de13585add Cr-Commit-Position: refs/heads/master@{#379402} Review URL: https://codereview.chromium.org/1759783003 Cr-Commit-Position: refs/heads/master@{#379463}
* Revert of [mojo-bindings] Use Watch API instead of MessagePumpMojo (patchset ↵rockot2016-03-053-22/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | #10 id:180001 of https://codereview.chromium.org/1759783003/ ) Reason for revert: Breaks iOS GN which is apparently a tree closer despite having no CQ coverage Original issue's description: > [mojo-bindings] Use Watch API instead of MessagePumpMojo > > This removes the C++ bindings dependency on MessagePumpMojo, > consuming the new Watch API instead. > > For convenience a new mojo::Watcher is added to the public > Mojo C++ API library, and this is used by Connector. > > BUG=590495 > R=yzshen@chromium.org > TBR=blundell@chromium.org for rename affecting components/message_port.gypi > TBR=jam@chromium.org - added a missing header to new url tests > > Committed: https://crrev.com/d06373e7cd8b4ad725ed5c64c958f2de13585add > Cr-Commit-Position: refs/heads/master@{#379402} TBR=jam@chromium.org,yzshen@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=590495 Review URL: https://codereview.chromium.org/1768443004 Cr-Commit-Position: refs/heads/master@{#379406}
* [mojo-bindings] Use Watch API instead of MessagePumpMojorockot2016-03-053-30/+22
| | | | | | | | | | | | | | | | | This removes the C++ bindings dependency on MessagePumpMojo, consuming the new Watch API instead. For convenience a new mojo::Watcher is added to the public Mojo C++ API library, and this is used by Connector. BUG=590495 R=yzshen@chromium.org TBR=blundell@chromium.org for rename affecting components/message_port.gypi TBR=jam@chromium.org - added a missing header to new url tests Review URL: https://codereview.chromium.org/1759783003 Cr-Commit-Position: refs/heads/master@{#379402}
* [mojo-sdk] Remove mojo::ignore_result and MOJO_MOVE_ONLY_TYPEamistry2016-03-049-10/+11
| | | | | | | | BUG=534695 Review URL: https://codereview.chromium.org/1759393002 Cr-Commit-Position: refs/heads/master@{#379394}
* Remove the remaining Pass() calls from //mojo.yzshen2016-03-0410-18/+18
| | | | | | | | BUG= 557422 Review URL: https://codereview.chromium.org/1767433002 Cr-Commit-Position: refs/heads/master@{#379344}
* Remove MOJO_ARRAYSIZE and MOJO_WARN_UNUSED_RESULT.amistry2016-03-033-9/+9
| | | | | | | | BUG=534695 Review URL: https://codereview.chromium.org/1756723003 Cr-Commit-Position: refs/heads/master@{#378935}
* Remove MOJO_DISALLOW_COPY_AND_ASSIGN and MOJO_ALLOW_UNUSED_LOCAL.amistry2016-03-0319-31/+33
| | | | | | | | BUG=534695 Review URL: https://codereview.chromium.org/1755003002 Cr-Commit-Position: refs/heads/master@{#378891}
* Mojo C++ bindings: pass SerializationContext to GetSerializedSize_() and ↵yzshen2016-03-0215-170/+218
| | | | | | | | | | | | | | Serialize_(). The context will be useful for: - WTF::String serialization. We need to create WTF::StringUTF8Adapter objects for non-8-bit WTF::Strings and share them between GetSerializedSize_() and Serialize_(). - adding DCHECKs for sending associated interface pointers/requests over correct message pipe. BUG=583738 Review URL: https://codereview.chromium.org/1752133003 Cr-Commit-Position: refs/heads/master@{#378753}
* Mojo C++ bindings: remove usage of MojoAsyncWaiter from mojo/public/cpp/bindingsyzshen2016-03-0214-185/+88
| | | | | | | | | | | BUG=585942 Committed: https://crrev.com/cb97b6a175c61a3538d724f1214d537b40df573a Cr-Commit-Position: refs/heads/master@{#377652} Review URL: https://codereview.chromium.org/1718363002 Cr-Commit-Position: refs/heads/master@{#378706}
* Mojo C++ bindings: Preparation for supporting WTF-firendly string/arrary/map.yzshen2016-02-2913-489/+600
| | | | | | | | | | | | | | | | | This CL: - introduces serialization_forward.h to avoid circular includes or some verbose forward declarations. - introduces serialization.h so that users don't have to include indiviudal serialization files. - move most of the code of array_serialization.h into array_serialization_traits.h. It is intended to be shared with WTF array serialization. BUG=583738 Review URL: https://codereview.chromium.org/1747993002 Cr-Commit-Position: refs/heads/master@{#378317}
* Fix grammar in BindingSetsky2016-02-291-1/+1
| | | | | | | | | | | | Minor nit came across when looking at class R=yzshen1@chromium.org BUG=none TEST=none Review URL: https://codereview.chromium.org/1749963002 Cr-Commit-Position: refs/heads/master@{#378298}
* Make WebVector backed by a std::vector.esprehn2016-02-271-0/+8
| | | | | | | | | | | | | | | | | | Lets back WebVector by a std::vector, this removes all the manual copy and initialize logic and opens the door for it being movable in the future. I also simplified the interface to require begin() and end() instead of the old interface where assignment required index operator[] and size(). This required adding begin/end to mojo's Array type. I also removed WebVector::contains since nothing uses it, and consumers of blink's WebVector can just use std::find or ContainsValue from stl_util.h I also took this as an opportunity to write a bunch of tests for WebVector. Review URL: https://codereview.chromium.org/1713323003 Cr-Commit-Position: refs/heads/master@{#378138}
* Revert of Make WebVector backed by a std::vector. (patchset #2 id:20001 of ↵jaydasika2016-02-271-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1713323003/ ) Reason for revert: Suspect for failure : https://build.chromium.org/p/chromium.webkit/builders/WebKit%20Win%20x64%20Builder%20%28dbg%29/builds/76487 Original issue's description: > Make WebVector backed by a std::vector. > > Lets back WebVector by a std::vector, this removes all the manual copy and > initialize logic and opens the door for it being movable in the future. > > I also simplified the interface to require begin() and end() instead of > the old interface where assignment required index operator[] and size(). > This required adding begin/end to mojo's Array type. > > I also removed WebVector::contains since nothing uses it, and consumers of > blink's WebVector can just use std::find or ContainsValue from stl_util.h > > I also took this as an opportunity to write a bunch of tests for WebVector. > > Committed: https://crrev.com/218c25844e365b3677e4124a27bbad8a7a4a4a99 > Cr-Commit-Position: refs/heads/master@{#378031} TBR=jyasskin@chromium.org,yutak@chromium.org,yzshen@chromium.org,esprehn@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review URL: https://codereview.chromium.org/1738353002 Cr-Commit-Position: refs/heads/master@{#378066}
* Make WebVector backed by a std::vector.esprehn2016-02-271-0/+8
| | | | | | | | | | | | | | | | | | Lets back WebVector by a std::vector, this removes all the manual copy and initialize logic and opens the door for it being movable in the future. I also simplified the interface to require begin() and end() instead of the old interface where assignment required index operator[] and size(). This required adding begin/end to mojo's Array type. I also removed WebVector::contains since nothing uses it, and consumers of blink's WebVector can just use std::find or ContainsValue from stl_util.h I also took this as an opportunity to write a bunch of tests for WebVector. Review URL: https://codereview.chromium.org/1713323003 Cr-Commit-Position: refs/heads/master@{#378031}
* Replace with mojo::Connector (already exists) now that Shell is gone.ben2016-02-261-2/+2
| | | | | | | | | | | | Requires: - Move AppRefCount to a different class, MessageLoopRef, which is optionally used by applications that wish to quit the current message loop started by application runner when the ref drops to zero. - Changing the signature of Initialize() to take a Connector. This is what most of the change in this CL is. BUG= Review URL: https://codereview.chromium.org/1725353003 Cr-Commit-Position: refs/heads/master@{#377841}
* Revert of Mojo C++ bindings: remove usage of MojoAsyncWaiter from ↵yzshen2016-02-2614-88/+185
| | | | | | | | | | | | | | | | | | | | | | | | | | | | mojo/public/cpp/bindings (patchset #5 id:80001 of https://codereview.chromium.org/1718363002/ ) Reason for revert: This causes crashes: https://bugs.chromium.org/p/chromium/issues/detail?id=589964 The shell and the application belong to different modules, so they have different MessageLoop::current() / MessagePumpMojo::current() / etc. Although these values are in thread-local storage, we refer to them using global variables which are different in different modules. Original issue's description: > Mojo C++ bindings: remove usage of MojoAsyncWaiter from mojo/public/cpp/bindings > > BUG=585942 > > Committed: https://crrev.com/cb97b6a175c61a3538d724f1214d537b40df573a > Cr-Commit-Position: refs/heads/master@{#377652} TBR=jam@chromium.org,darin@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=585942 Review URL: https://codereview.chromium.org/1735283003 Cr-Commit-Position: refs/heads/master@{#377817}
* Mojo C++ bindings: remove usage of MojoAsyncWaiter from mojo/public/cpp/bindingsyzshen2016-02-2514-185/+88
| | | | | | | | BUG=585942 Review URL: https://codereview.chromium.org/1718363002 Cr-Commit-Position: refs/heads/master@{#377652}
* Rename WeakBindingSet/WeakInterfacePtrSet to BindingSet/InterfacePtrSet.yzshen2016-02-257-215/+205
| | | | | | | | | | | | | | This CL also renames the element type (WeakBinding/WeakInterfacePtr) to Element and hide them in the corresonding *Set class. BUG=None CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_site_isolation Committed: https://crrev.com/632d319842096e6998d174e2f251865979ce2b72 Cr-Commit-Position: refs/heads/master@{#377384} Review URL: https://codereview.chromium.org/1735583002 Cr-Commit-Position: refs/heads/master@{#377528}
* Revert "Rename WeakBindingSet/WeakInterfacePtrSet to ↵yzshen2016-02-247-205/+215
| | | | | | | | | | | | | | BindingSet/InterfacePtrSet." This reverts commit 632d319842096e6998d174e2f251865979ce2b72. TBR=jam@chromium.org BUG= CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_site_isolation Review URL: https://codereview.chromium.org/1734803002 . Cr-Commit-Position: refs/heads/master@{#377393}
* Rename WeakBindingSet/WeakInterfacePtrSet to BindingSet/InterfacePtrSet.yzshen2016-02-247-215/+205
| | | | | | | | | | | This CL also renames the element type (WeakBinding/WeakInterfacePtr) to Element and hide them in the corresonding *Set class. BUG=None CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_site_isolation Review URL: https://codereview.chromium.org/1735583002 Cr-Commit-Position: refs/heads/master@{#377384}
* Mojo bindings: Add string support to StructTraitsrockot2016-02-234-1/+149
| | | | | | | | | | | | | | This CL enables string-typed fields in structs to be serialized and deserialized via StructTraits using base::StringPiece as an intermediate interface between the native type and the message buffer. BUG=577686 R=yzshen@chromium.org Review URL: https://codereview.chromium.org/1719183002 Cr-Commit-Position: refs/heads/master@{#376952}
* Reland "Mojo C++ bindings: support sync methods - part 2"yzshen2016-02-2312-95/+713
| | | | | | | | | | | | | | | | | This CL introduces the correct re-entrancy behavior: when a sync call is waiting for response, allow incoming sync requests on the same thread to re-enter, async messages are queued until the sync call completes. The following will be in future CLs: - Support sync calls with associated interfaces. The original CL is at https://codereview.chromium.org/1713203002/ BUG=577699 Review URL: https://codereview.chromium.org/1723673002 Cr-Commit-Position: refs/heads/master@{#376892}
* Revert of Mojo C++ bindings: support sync methods - part 2 (patchset #6 ↵reillyg2016-02-2212-701/+89
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | id:100001 of https://codereview.chromium.org/1713203002/ ) Reason for revert: This change is triggering a use-of-uninitialized-value error on the Linux and Chrome OS MSan bots: https://build.chromium.org/p/chromium.memory.fyi/builders/Linux%20ChromeOS%20MSan%20Tests/builds/7464 Original issue's description: > Mojo C++ bindings: support sync methods - part 2 > > This CL introduces the correct re-entrancy behavior: when a sync call is waiting > for response, allow incoming sync requests on the same thread to re-enter, async > messages are queued until the sync call completes. > > The following will be in future CLs: > - Support sync calls with associated interfaces. > > BUG=577699 > > Committed: https://crrev.com/083f46638041ba7d7620e47a7f9edf06982a9340 > Cr-Commit-Position: refs/heads/master@{#376751} TBR=jam@chromium.org,yzshen@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=577699 Review URL: https://codereview.chromium.org/1720093002 Cr-Commit-Position: refs/heads/master@{#376793}
* Mojo C++ bindings: support sync methods - part 2yzshen2016-02-2212-89/+701
| | | | | | | | | | | | | | | This CL introduces the correct re-entrancy behavior: when a sync call is waiting for response, allow incoming sync requests on the same thread to re-enter, async messages are queued until the sync call completes. The following will be in future CLs: - Support sync calls with associated interfaces. BUG=577699 Review URL: https://codereview.chromium.org/1713203002 Cr-Commit-Position: refs/heads/master@{#376751}
* Mojo C++ bindings: support sync methods - part 1.yzshen2016-02-177-27/+219
| | | | | | | | | | | | | | | | | | | This CL: - adds support for [Sync] attribute; - generates C++ sync method signatures; - does the simplest thing to block and wait for results of sync calls. (Allows any messages of the same interface ptr to re-enter; disallows any messages of other message pipes to re-enter.) The following will be in future CLs: - Change the re-entrancy behavior. - Support sync calls with associated interfaces. BUG=577699 Review URL: https://codereview.chromium.org/1701423002 Cr-Commit-Position: refs/heads/master@{#376023}