summaryrefslogtreecommitdiffstats
path: root/mojo
Commit message (Collapse)AuthorAgeFilesLines
* Turn on standard logging details in Mojo app runnersrockot2016-03-251-4/+4
| | | | | | | | | | | It's not clear why Mojo runner disabled these, and I think the mash runner just copied whatever the Mojo runner was doing. BUG=None Review URL: https://codereview.chromium.org/1835653002 Cr-Commit-Position: refs/heads/master@{#383373}
* Content "gn check" work.brettw2016-03-251-1/+1
| | | | | | | | | | | | | | | | | | | Make content/gpu and content/plugin pass GN check. Significant work for most of content/test Makes most of content/shell and content/test pass check. These are not all enabled yet pending a few remaining issues that are more difficult to solve. The private content targets now allow content/test to include headers from them for non-component builds. Checking is disabled for content/test in component builds as described in the comment at the top of //content/BUILD.gn Renames the ui/events/ipc according to GN style. Annotates all content and gpu visibility declarations with why the're there, and fixes some incorrect ones that people added without understanding. Reland of https://codereview.chromium.org/1828483002/ with significant changes. TBR=jschuh (non-security-sensitive ipc build changes) Review URL: https://codereview.chromium.org/1833193002 Cr-Commit-Position: refs/heads/master@{#383358}
* Add more out of line copy ctors for complex classes.vmpstr2016-03-244-0/+8
| | | | | | | | | | | | | | | This patch adds the remaining copy constructors for complex classes. After this patch, it should be possible to enable the heavy class copy constructor checks by default. R=thakis@chromium.org, dcheng@chromium.org TBR=jam@chromium.org BUG=436357 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1825273002 Cr-Commit-Position: refs/heads/master@{#383131}
* [mojo-edk] Don't assert on PortAccepted for unknown portrockot2016-03-241-1/+1
| | | | | | | | | | | | | | | | | | It's possible for a proxy port to be closed before a PortAccepted message is processed for it. This can happen if a node accepts the new port (the proxy's target) then dies immediately after sending the corresponding PortAccepted message. In this case we should not be asserting. It's safe to fail silently. BUG=592905 TBR=amistry@chromium.org Review URL: https://codereview.chromium.org/1833683002 Cr-Commit-Position: refs/heads/master@{#383100}
* Simplify resolve.ben2016-03-2414-324/+223
| | | | | | | | BUG= Review URL: https://codereview.chromium.org/1828803002 Cr-Commit-Position: refs/heads/master@{#383024}
* Changes lifetime of apps with the "all_users" capabilitysky2016-03-231-1/+8
| | | | | | | | | | | | This changes makes it so "all_users" apps are owned by the shell. BUG=597385 TEST=none R=ben@chromium.org Review URL: https://codereview.chromium.org/1831623002 Cr-Commit-Position: refs/heads/master@{#382951}
* [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-2324-238/+339
| | | | | | | | | | | | | | | | | | | | | | | 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}
* Changes to get mash browser_tests shutdown working correctlysky2016-03-232-2/+9
| | | | | | | | | | | | | | | | | | | | . Adds ability to set callback on MojoShellConnection when shell is lost, and wires through in chrome side to trigger exiting. . Adds ability for TestLauncherDelegate to be notified after tests have run. Needed so I can shutdown state while AtExitManager is valid. . Made context not attempt to shutdown edk if context did not start edk. . Made MashBrowserTestsMain shutdown MojoTestConnector at a time when it can be shutdown. BUG=581733 TEST=covered by tests R=jam@chromium.org Review URL: https://codereview.chromium.org/1822213002 Cr-Commit-Position: refs/heads/master@{#382864}
* Moves manifest parsing to a new class, Reader.ben2016-03-2312-130/+230
| | | | | | | | | | | . Consolidate value analysis in Entry . Catalog now just manages the various data structures that allow it to implement various flavors of Resolve(). BUG= Review URL: https://codereview.chromium.org/1821383002 Cr-Commit-Position: refs/heads/master@{#382856}
* 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}
* Quit the message loop by default in ShellConnectionLost when ↵sky2016-03-2215-34/+34
| | | | | | | | | | | | | | | | | | | ApplicationRunner is used This was originally at https://codereview.chromium.org/1814223002/ , but Ben is out and I need this for tests, so I'm taking over. BUG=none TEST=covered by tests TBR=ben@chromium.org R=ben@chromium.org Committed: https://crrev.com/a50f9840749052fbdec087a304548217cc6fd00b Cr-Commit-Position: refs/heads/master@{#382389} Review URL: https://codereview.chromium.org/1819063002 Cr-Commit-Position: refs/heads/master@{#382688}
* Converts mash_wm_apptests to unit testssky2016-03-221-6/+0
| | | | | | | | | | BUG=594733 TEST=test only change R=dpranke@chromium.org, erg@chromium.org Review URL: https://codereview.chromium.org/1822133002 Cr-Commit-Position: refs/heads/master@{#382652}
* Move serialize/deserialize logic onto Entry.ben2016-03-229-258/+267
| | | | | | | | | | | | | | I'm trying to shift manifest reading/deserialization out of the catalog. The idea is we'll end up with two instances of the catalog per user, linked, one with the user-specific entries, and one with the entries that came with the distribution. I also flipped some of the CHECK()s in dictionary analysis to return errors. Eventually this should throw a more meaningful error via Shell::Connect(). R=sky@chromium.org BUG= Review URL: https://codereview.chromium.org/1818373003 Cr-Commit-Position: refs/heads/master@{#382633}
* Converts resource_provider apptests to unit testssky2016-03-221-4/+0
| | | | | | | | | | | BUG=594729 TEST=test only change R=erg@chromium.org, dpranke@chromium.org TBR=dpranke@chromium.org Review URL: https://codereview.chromium.org/1816323002 Cr-Commit-Position: refs/heads/master@{#382594}
* Demote Mojo shell errors to warningsrockot2016-03-221-10/+10
| | | | | | | | | | | | Until we have application manifests sorted out in production these messages are too spammy to be errors. BUG=594419 R=jam@chromium.org Review URL: https://codereview.chromium.org/1824553004 Cr-Commit-Position: refs/heads/master@{#382583}
* Convert leveldb_apptests to unit tests.erg2016-03-221-4/+0
| | | | | | | | | | BUG=594731 R=sky@chromium.org TBR=dpranke@chromium.org Review URL: https://codereview.chromium.org/1812263004 Cr-Commit-Position: refs/heads/master@{#382464}
* Revert of Quit the message loop by default in ShellConnectionLost when ↵esprehn2016-03-2215-34/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ApplicationRunner is used (patchset #2 id:20001 of https://codereview.chromium.org/1819063002/ ) Reason for revert: Looks like to made the mojo_apptests go red. I think this is also making MUS tests fail? https://build.chromium.org/p/chromium.linux/builders/Linux%20Tests/builds/39128 Original issue's description: > Quit the message loop by default in ShellConnectionLost when ApplicationRunner is used > > This was originally at https://codereview.chromium.org/1814223002/ , but Ben is out and > I need this for tests, so I'm taking over. > > BUG=none > TEST=covered by tests > TBR=ben@chromium.org > R=ben@chromium.org > > Committed: https://crrev.com/a50f9840749052fbdec087a304548217cc6fd00b > Cr-Commit-Position: refs/heads/master@{#382389} TBR=ben@chromium.org,sky@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=none Review URL: https://codereview.chromium.org/1821913002 Cr-Commit-Position: refs/heads/master@{#382460}
* Quit the message loop by default in ShellConnectionLost when ↵sky2016-03-2115-34/+34
| | | | | | | | | | | | | | | | ApplicationRunner is used This was originally at https://codereview.chromium.org/1814223002/ , but Ben is out and I need this for tests, so I'm taking over. BUG=none TEST=covered by tests TBR=ben@chromium.org R=ben@chromium.org Review URL: https://codereview.chromium.org/1819063002 Cr-Commit-Position: refs/heads/master@{#382389}
* Make mojo::Callback safe to copy across threads and destroy on any thread.amistry2016-03-216-32/+99
| | | | | | | | | | 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 leveldb: Get profile and leveldb connected to DOMStorageContext.erg2016-03-212-4/+4
| | | | | | | | | | | | | | | | | | | Building on the last patch which built mojo:profile and built one for each BrowserContext, we move the LevelDBService in the profile application to a dedicated leveldb thread to avoid deadlocks. (Since applications all run on one thread by default, leveldb would deadlock while waiting for profile to return data.) This patch connects to the correct applications in DOMStorageContextWrapper and then vends a LevelDBService instance to each LevelDBWrapperImpl, for future use. BUG=586194 CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_site_isolation Review URL: https://codereview.chromium.org/1737933002 Cr-Commit-Position: refs/heads/master@{#382343}
* Add mach ports support to the Mojo shell.amistry2016-03-217-1/+144
| | | | | | | | BUG=582468 Review URL: https://codereview.chromium.org/1812523003 Cr-Commit-Position: refs/heads/master@{#382335}
* Adds option to run browser tests in mashsky2016-03-215-13/+45
| | | | | | | | | | | | | | | | | | | | | | | | | At a high level this is what the code does: . The test launcher creates MojoTestConnector. . MojoTestConnector creates a BackgroundShell (initially I wanted to run the shell on the same thread, but that is problematic because I need to run a nested message loop at times, which the IO thread doesn't support (the test launcher uses an io thread)). . A connection is established to mojo:mash_shell. . MojoTestConnector sets up the state for each test. The connect is not done with Mojo's child process connection. The base test launching code handles the actual process launching. Other random notes: . --single_process is a slightly different flow. . The test never finishes. This is because apps that are started don't all exit when the shell exits. I'm going to look at that next. R=ben@chromium.org, jam@chromium.org BUG=581733 Review URL: https://codereview.chromium.org/1806353003 Cr-Commit-Position: refs/heads/master@{#382305}
* [mojo-edk] Remove debug aliasing from ports layerrockot2016-03-191-5/+2
| | | | | | | | | | | | This was used when tracking down a thread-safety issue a while ago. No longer needed. Also CHECK -> DCHECK. BUG=None R=amistry@chromium.org Review URL: https://codereview.chromium.org/1815403002 Cr-Commit-Position: refs/heads/master@{#382169}
* Mojo C++ bindings: assume that all imported mojoms have the same variant as ↵yzshen2016-03-1913-25/+58
| | | | | | | | | | | | 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}
* Implement the renderer side of the mojo based local storage implementation.jam2016-03-193-8/+58
| | | | | | | | | | This is based on the existing chrome IPC based implementation. BUG=586194 Review URL: https://codereview.chromium.org/1814003002 Cr-Commit-Position: refs/heads/master@{#382138}
* Convert filesystem_apptests to shelltests.erg2016-03-183-4/+14
| | | | | | | | BUG=594730 Review URL: https://codereview.chromium.org/1814983002 Cr-Commit-Position: refs/heads/master@{#382021}
* Instrument EDK sync Broker initializationrockot2016-03-181-0/+4
| | | | | | | | | | | | | | | | | | Bringing up Mojo at process startup caused a regression on OS X renderer startup times. At least half of the regression seems to be attributable to blocking on getting the parent pipe handle from the sync broker channel. We can eliminate this behavior on OS X now that we're using Mach shm, but let's also make sure it's not causing problems elsewhere in the wild. BUG=591742 Review URL: https://codereview.chromium.org/1805923006 Cr-Commit-Position: refs/heads/master@{#381953}
* [mojo-edk] Stop using the sync broker on OS Xrockot2016-03-182-5/+4
| | | | | | | | | | | | | | The sync broker is only needed for sandboxed shared buffer allocation on POSIX, but it's not needed for Mach shared buffers. This stops using the broker on OS X. BUG=591742,590979 Review URL: https://codereview.chromium.org/1809363002 Cr-Commit-Position: refs/heads/master@{#381908}
* 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}
* Rather than keeping it around forever, we should kill it. Now that the user ↵ben2016-03-184-4/+9
| | | | | | | | | | shell is acting as the login broker for apps run for that user, it's not necessary to keep login too. This simplifies the login app a bit. BUG= Review URL: https://codereview.chromium.org/1806203002 Cr-Commit-Position: refs/heads/master@{#381856}
* [mojo-edk] Shutdown a node's bootstrap parent channel outside its lock.amistry2016-03-181-3/+8
| | | | | | | | | | | | On OSX, NodeChannel::ShutDown() calls into NodeController::GetMachPortRelay() which acquires |parent_lock_| and deadlocks due to a recursuve lock acquisition. BUG=582468 Review URL: https://codereview.chromium.org/1808233003 Cr-Commit-Position: refs/heads/master@{#381852}
* [mojo-edk] Switch shared buffers to use Mach on OSX.amistry2016-03-172-3/+4
| | | | | | | | BUG=582468 Review URL: https://codereview.chromium.org/1804353002 Cr-Commit-Position: refs/heads/master@{#381785}
* [mojo-edk] Expose notification source to MojoWatch callbacksrockot2016-03-1715-42/+113
| | | | | | | | | | | | | | | | This adds a flags argument to watch callbacks and exposes a flag to indicate that the callback was invoked as a result of some external process event (i.e. an incoming EDK IPC message). The public C++ Watcher implementation is updated to take advantage of this, effectively allowing us to dispatch to Mojo bindings synchronously when they live on the IO thread and are servicing messages from out-of-process. BUG=590495 Review URL: https://codereview.chromium.org/1811433002 Cr-Commit-Position: refs/heads/master@{#381767}
* Mojo C++ bindigns: fix generated namespace when variant is specified.yzshen2016-03-176-6/+48
| | | | | | | | | | | | | 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's WTF dependencies should be set correctly regardless the path depthpeter2016-03-172-4/+4
| | | | | | | | | | | | | Dependency resolution in gyp uses relative paths from the target, so usage of the `for_blink` variable fails for any target that doesn't immediately live in //mojo. This is different from GN, where the dependency is declared absolutely: //mojo/public/cpp/bindings:wtf_support BUG=583738 Review URL: https://codereview.chromium.org/1808253002 Cr-Commit-Position: refs/heads/master@{#381751}
* Cascade shutdown of instancesben2016-03-1717-49/+327
| | | | | | | | BUG= Review URL: https://codereview.chromium.org/1810713002 Cr-Commit-Position: refs/heads/master@{#381660}
* Move flush id from WebGraphicsContext3DImpl to GLES2Implementation.danakj2016-03-173-0/+6
| | | | | | | | | | | | | | | | This means calls to any flush or finish methods on GLES2Implementation will update the flush id, and calls to either WebGraphicsContext3D::lastFlushID() or to GLES2Interface::GetLastFlushIdCHROMIUM() will return the same answer always. R=kbr@chromium.org, piman BUG=584497 CQ_INCLUDE_TRYBOTS=tryserver.chromium.win:win_optional_gpu_tests_rel;tryserver.chromium.mac:mac_optional_gpu_tests_rel Review URL: https://codereview.chromium.org/1814573002 Cr-Commit-Position: refs/heads/master@{#381647}
* [mojo-edk] Add support for transferring mach ports.amistry2016-03-1722-50/+913
| | | | | | | | | | | | | | This change adds the ability to transfer mach ports over Mojo. Mach ports can either be wrapped using CreatePlatformHandleWrapper() or a Mojo shared buffer can be created using CreateSharedBufferWrapper(). For now, Mojo shared buffers created using MojoCreateSharedBuffer() (or MojoCreateDataPipe()) will still use posix shared memory. BUG=582468 Review URL: https://codereview.chromium.org/1712143002 Cr-Commit-Position: refs/heads/master@{#381615}
* Remove support for Root identity singletons and rely on the all_users bit to ↵ben2016-03-165-25/+41
| | | | | | | | | | | | be set. + test . set this bit on mus so we don't try to create per-user instances of it now that running it as root has no superpower. R=sky@chromium.org Review URL: https://codereview.chromium.org/1811483003 Cr-Commit-Position: refs/heads/master@{#381516}
* 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}
* Restructure loginben2016-03-162-10/+32
| | | | | | | | BUG= Review URL: https://codereview.chromium.org/1801133002 Cr-Commit-Position: refs/heads/master@{#381494}
* Mojo C++ bindings: introduce mojo::WTFArray.yzshen2016-03-1520-413/+872
| | | | | | | | | | | | 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}
* Switch StoragePartitionService interface to use url::Origin instead of mojo ↵jam2016-03-151-1/+1
| | | | | | | | | | string. BUG=586194 Review URL: https://codereview.chromium.org/1798113002 Cr-Commit-Position: refs/heads/master@{#381229}
* Add GYP support for Chrome's mojo manifestrockot2016-03-151-0/+41
| | | | | | | | BUG=None Review URL: https://codereview.chromium.org/1796033002 Cr-Commit-Position: refs/heads/master@{#381193}
* Convert net apptests to net unittests using mojo::ShellTest.ben2016-03-1513-60/+98
| | | | | | | | | R=yzshen@chromium.org BUG= Review URL: https://codereview.chromium.org/1796313002 Cr-Commit-Position: refs/heads/master@{#381183}
* Reinstate wait-for-Initialize when Chrome is run in Mashrockot2016-03-153-2/+16
| | | | | | | | | | | | | | | | | | | | | Mus Views needs to completely block the main thread during initialization, including any pending tasks. This means incoming messages on any other pipe will never be dispatched. If ShellClient::Initialize is blocked, the pipe views is waiting on will in turn never be able to signal, resulting in an effective deadlock. So we need to wait for Initialize before proceeding with the rest of the main thread setup. This adds a temporary switch to explicitly opt in to wait-for-Initialize behavior on MojoShellConnection, and adds that switch when running in mash. BUG=594636,594852 TEST=views_mus_unittests, mus_ws_unittests, and chrome --mash renders as well as it did before I broke it. Review URL: https://codereview.chromium.org/1797153002 Cr-Commit-Position: refs/heads/master@{#381182}
* Mojo C++ bindings: fix the for_blink_tests target.Yuzhu Shen2016-03-152-2/+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}
* Change primordial pipes to ShellClientrockot2016-03-1432-646/+323
| | | | | | | | | | | | | | | | | | | | | Changes shell client startup pipes to be ShellClient instead of ShellClientFactory. This simplifies a lot of startup code. Due to this change, apps must now take responsibility for shutting themselves down when they feel it's appropriate. For now, all relevant apps are force-exited to mimic the old behavior. Once apptests are deleted, we should expose a clean quit closure to apps so they have something to run when they want to quit. Hard-exiting the process is definitely not the right thing to do. BUG= Review URL: https://codereview.chromium.org/1801963002 Cr-Commit-Position: refs/heads/master@{#381114}