summaryrefslogtreecommitdiffstats
path: root/chrome/common/child_process.cc
Commit message (Collapse)AuthorAgeFilesLines
* Added support for --worker-startup-dialog command line flag.atwilson@chromium.org2009-11-061-0/+38
| | | | | | | | | Added ChildProcess::WaitForDebugger() utility routine, and changed the various processes to use it. Review URL: http://codereview.chromium.org/370006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31188 0039d316-1c4b-4281-b951-d872f2087c98
* Unrevert 21355 because the revert might be causing thensylvain@chromium.org2009-07-231-14/+15
| | | | | | | | worker tests failures. Review URL: http://codereview.chromium.org/159276 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21412 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 21355 because it might be causing all the newnsylvain@chromium.org2009-07-231-15/+14
| | | | | | | | | | | | crashes on reliability. It also seems to be causing valgrind error. Original change: Switch the first thread in a child process to be the main thread, and make theIO thread be the second thread. The change is needed for plugins on mac. Review URL: http://codereview.chromium.org/159274 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21398 0039d316-1c4b-4281-b951-d872f2087c98
* Switch the first thread in a child process to be the main thread, and make ↵jam@chromium.org2009-07-231-14/+15
| | | | | | | | theIO thread be the second thread. The change is needed for plugins on mac. Review URL: http://codereview.chromium.org/155944 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21355 0039d316-1c4b-4281-b951-d872f2087c98
* Revert r21117 as it caused reliability failures.estade@chromium.org2009-07-211-12/+15
| | | | | | | | | | Also included in this revert: r21165, r21180, and a couple valgrind suppression edits TBR=huanr Review URL: http://codereview.chromium.org/155876 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21216 0039d316-1c4b-4281-b951-d872f2087c98
* Switch the first thread in a child process to be the main thread, and make ↵jam@chromium.org2009-07-201-15/+12
| | | | | | | | the IO thread be the second thread. The change is needed for plugins on mac. Review URL: http://codereview.chromium.org/149558 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21117 0039d316-1c4b-4281-b951-d872f2087c98
* Headers cleanup in chrome/commonphajdan.jr@chromium.org2009-05-291-2/+1
| | | | | | | | | - reduce header dependencies - miscellanous cleanups (whitespace, explicit deps) Review URL: http://codereview.chromium.org/113945 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17177 0039d316-1c4b-4281-b951-d872f2087c98
* Fix assertion that was firing in unit tests.jam@chromium.org2009-03-271-3/+6
| | | | | | Review URL: http://codereview.chromium.org/56027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12710 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor plugin process code which checks with the browser process before ↵jam@chromium.org2009-03-271-18/+8
| | | | | | | | | | | shutdown, to avoid races in which the browser process thinks the process is fine to use while it's shutting down. I also removed PluginProcess/WorkerProcess since they didn't have any code in them now. I removed the plugin process code which waits 10 seconds before shutting itself down. That was a premature optimization, since testing with/without this didn't show any difference (see http://www/~jabdelmalek/chrome/test/plugins/processes.html). In both cases, the plugin on a page would get recreated in less than 100ms, even with reusing or starting a plugin process from scratch. We already spawn new renderer processes on back and forth if it's a different origin, and the plugin will be in the cache anyways. Review URL: http://codereview.chromium.org/53091 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12703 0039d316-1c4b-4281-b951-d872f2087c98
* Fixes CRLF and trailing white spaces.maruel@chromium.org2009-03-051-1/+1
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10982 0039d316-1c4b-4281-b951-d872f2087c98
* Keeping track of whether WebKit is in the callstack using RenderThread ↵jam@chromium.org2009-02-241-4/+0
| | | | | | | | | | | | doesn't work when there are Send calls to plugins (i.e. Gears). So instead, just use PostNonNestableTask to delete RenderWidget. I (Note I still don't know how my change affected this, it seems to have been broken before as well.) BUG=7951 Review URL: http://codereview.chromium.org/28090 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10298 0039d316-1c4b-4281-b951-d872f2087c98
* Tenative fix to see if the reliability crashes go away.jam@chromium.org2009-02-241-0/+4
| | | | | | | | BUG=7951 Review URL: http://codereview.chromium.org/28057 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10241 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor code from RenderThread and PluginThread and move it to ChildThread. ↵jam@chromium.org2009-02-211-77/+31
| | | | | | | | | | | ChildProcess now owns the ChildThread, which removes duplicate code and simplifies things. Clean up ChildProcess, there really was no need for all the templates and statics in it and its subclasses. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=10080 Review URL: http://codereview.chromium.org/21502 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10144 0039d316-1c4b-4281-b951-d872f2087c98
* Reverting 10080.jam@chromium.org2009-02-201-31/+77
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10082 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor code from RenderThread and PluginThread and move it to ChildThread. ↵jam@chromium.org2009-02-201-77/+31
| | | | | | | | | ChildProcess now owns the ChildThread, which removes duplicate code and simplifies things. Clean up ChildProcess, there really was no need for all the templates and statics in it and its subclasses. Review URL: http://codereview.chromium.org/21502 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10080 0039d316-1c4b-4281-b951-d872f2087c98
* Make CommandLine into a normal object, with some statics for getting at the ↵evan@chromium.org2009-01-211-1/+1
| | | | | | | | | | | current process's command line. One explicit goal of this change is to *not* deal with the string/wstring issues at the API on POSIX; the functions are the same as before, which means they remain as broken as before. (I did try to fix the internals, though, so migrating the callers is now possible by adding platform-appropriate hooks.) Review URL: http://codereview.chromium.org/18248 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8347 0039d316-1c4b-4281-b951-d872f2087c98
* POSIX: Get IPCSyncChannel unittests workingagl@chromium.org2009-01-201-2/+4
| | | | | | | Review URL: http://codereview.chromium.org/18324 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8328 0039d316-1c4b-4281-b951-d872f2087c98
* WaitableEvent is the replacement for Windows events. Previously in the code, ↵agl@chromium.org2009-01-151-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | a HANDLE from CreateEvent was used for signaling, both within a process and across processes. WaitableEvent is the cross platform replacement for this. To convert: * HANDLE -> base::WaitableEvent* * ScopedHandle -> scoped_ptr<base::WaitableEvent> * CreateEvent -> new base::WaitableEvent * SetEvent -> base::WaitableEvent::Signal * ResetEvent -> base::WaitableEvent::Reset * ObjectWatcher -> base::WaitableEventWatcher * WaitForMultipleObjects -> static base::WaitableEvent::WaitMany ObjectWatcher remains for Windows specific code. WaitableEventWatcher has an identical interface save, * It uses WaitableEvents, not HANDLEs * It returns void from StartWatching and StopWatcher, rather than errors. System internal errors are fatal to the address space IMPORTANT: There are semantic differences between the different platforms. WaitableEvents on Windows are implemented on top of events. Windows events work across process and this is used mostly for modal dialog support. Windows events can be duplicated with DuplicateHandle. On other platforms, WaitableEvent works only within a single process. In the future we shall have to replace the current uses of cross-process events with IPCs. BEWARE: HANDLE, on Windows, is a void *. Since any pointer type coerces to void *, you can pass a WaitableEvent * where a HANDLE is expected without any build-time errors. Review URL: http://codereview.chromium.org/16554 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8126 0039d316-1c4b-4281-b951-d872f2087c98
* Add a command-line switch to change the user agent.BUG=757345pkasting@chromium.org2008-09-241-0/+12
| | | | | | Review URL: http://codereview.chromium.org/4059 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2571 0039d316-1c4b-4281-b951-d872f2087c98
* Use a more compact license header in source files.license.bot2008-08-241-28/+4
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1287 0039d316-1c4b-4281-b951-d872f2087c98
* Introduce MessagePump to represent the native message pump used to drive adarin@google.com2008-08-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MessageLoop. A MessageLoop now has a MessagePump. This will make it possible to port the MessagePump interface to other platforms as well as to use an IO completion port for our worker threads on Windows. Currently, there is only MessagePumpWin, which attempts to preserve the pre-existing behavior of the MessageLoop. API changes to MessageLoop: 1. MessageLoop::Quit means return from Run when the MessageLoop would otherwise wait for more work. 2. MessageLoop::Quit can no longer be called outside the context of an active Run call. So, things like this: MessageLoop::current()->Quit(); MessageLoop::current()->Run(); are now: MessageLoop::current()->RunAllPending(); 3. MessageLoop::Quit can no longer be called from other threads. This means that PostTask(..., new MessageLoop::QuitTask()) must be used explicitly to Quit across thread boundaries. 4. No protection is made to deal with nested MessageLoops involving watched objects or APCs. In fact, an assertion is added to flag such cases. This is a temporary measure until object watching and APC facilities are removed in favor of a MessagePump designed around an IO completion port. As part of this CL, I also changed the automation system to use an IPC::ChannelProxy instead of an IPC::Channel. This moves the automation IPC onto Chrome's IO thread where it belongs. I also fixed some abuses of RefCounted in the AutomationProvider class. It was deleting itself in some cases! This led to having to fix the ownership model for AutomationProvider, which explains the changes to AutomationProviderList and so on. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@928 0039d316-1c4b-4281-b951-d872f2087c98
* Move away from the deprecated atomic.h interface to AtomicRefCount and ↵deanm@google.com2008-08-071-4/+11
| | | | | | AtomicSequenceNumber. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@510 0039d316-1c4b-4281-b951-d872f2087c98
* Add chrome to the repository.initial.commit2008-07-261-0/+114
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15 0039d316-1c4b-4281-b951-d872f2087c98