| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
Review URL: http://codereview.chromium.org/384062
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33335 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
| |
The bustage seems to be a WebKit change upstream. It is not reverted in
WebKit and merger. So bring the innocent change back in.
TBR=jam
TEST=green tree
Review URL: http://codereview.chromium.org/375009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31214 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
XP tests are failing, the guess is r31175 and r31176.
TBR=beng
TEST=XP tests go green
Review URL: http://codereview.chromium.org/376008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31201 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
| |
BUG=26749
Review URL: http://codereview.chromium.org/361025
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31175 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
| |
different thread lifetimes.The rest of the code doesn't get MessageLoop pointers since they're not thread-safe and instead just call PostTask on ChromeThread. If the target thread is not alive, then the task is simply deleted.In a followup change, I'll remove any remaining MessageLoop* caching. With this change, there's little to be gained by caching since no locks are involved if the target MessageLoop is guaranteed to outlive the current thread (inferred automatically by the order of the chrome_threads_ array).BUG=25354
Review URL: http://codereview.chromium.org/306032
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30163 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
BUG=24485
TEST=On Ubuntu, delete 'First Run' file and launch Chrome to bring up First Run UI and then again launch Chrome which should not crash.
Review URL: http://codereview.chromium.org/278006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29007 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
| |
(Long term intention is to add a subset of cpplint.py to the presubmit script.)
Review URL: http://codereview.chromium.org/276008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28914 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
inherently unsafe in multi-threaded apps because it stores the string in a global buffer. It should never be used. If you want to log an error, use PLOG and friends, or if that's too high-level then use safe_strerror().
TEST=built on Linux in 32-bit and 64-bit mode; ran base_unittests in each case; ran Chromium itself in each case; try servers
BUG=none
Review URL: http://codereview.chromium.org/261055
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28850 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
I'm attempting to clean up CommandLine.
This change rearranges how initialization is done. I am trying
to eliminate redundant functions; more will come in subsequent changes.
Review URL: http://codereview.chromium.org/273018
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28752 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
We have a 20-second timeout normally, but for testing purposes 1 second is
plenty.
Review URL: http://codereview.chromium.org/209018
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26483 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ProcessSingletonLinux.
Also, include full path in error about creating the lock.
BUG=20982
TEST=chown your profile & lockfile to root.root and run. Should print error about unlink ... permission denied.
Review URL: http://codereview.chromium.org/193105
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26169 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
BUG=17549
TEST=see bug
Review URL: http://codereview.chromium.org/173222
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24008 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
profile over NFS.
In order to avoid the singleton socket filename from exceeding the max socket name length, the socket is just named "SingletonSocket" and a new file "SingletonLock" is used for the hostname&pid.
BUG=17549
TEST=see bug
Review URL: http://codereview.chromium.org/174041
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23930 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
valgrind test failure.
This CL implements the second TODO item of issue 12343:
2) We should send back an ACK to the second process. If the second process doesn't get an ACK in the given timeout, it should kill the first process and go ahead and start.
The approach of this CL is to append process id to the singleton's socket filename, such as "SingletonSocket-12345", and creates a symbol link "SingletonSocket" to the real socket file. In ProcessSingleton::NotifyOtherProcess() if it's successfully connected to "SingletonSocket" but no ACK received, then the original process can be killed by its process id retrieved from the symbol link.
BUG=12343 ProcessSingleton Linux cleanups
TEST=In one terminal, launch chrome and stop the process by pressing ctrl-z, then launch chrome again in another terminal. The second chrome shall be started in 5 seconds, and the first one shall be killed.
Review URL: http://codereview.chromium.org/160436
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22365 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
The IME library may spawn a subprocess, which will then hold open
our singleton socket after we've shut down.
BUG=17952
Review URL: http://codereview.chromium.org/160523
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22281 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
| |
still broke valgrind ui_tests.
Review URL: http://codereview.chromium.org/159694
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22145 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
valgrind test failure.
This CL implements the second TODO item of issue 12343:
2) We should send back an ACK to the second process. If the second process doesn't get an ACK in the given timeout, it should kill the first process and go ahead and start.
The approach of this CL is to append process id to the singleton's socket filename, such as "SingletonSocket-12345", and creates a symbol link "SingletonSocket" to the real socket file. In ProcessSingleton::NotifyOtherProcess() if it's successfully connected to "SingletonSocket" but no ACK received, then the original process can be killed by its process id retrieved from the symbol link.
BUG=http://crbug.com/12343 ProcessSingleton Linux cleanups
TEST=In one terminal, launch chrome and stop the process by pressing ctrl-z, then launch chrome again in another terminal. The second chrome shall be started in 5 seconds, and the first one shall be killed.
Review URL: http://codereview.chromium.org/160436
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22144 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
| |
Broke valgrind ui_tests
Review URL: http://codereview.chromium.org/160320
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21945 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
| |
Patch contributed by suzhe@google.com (http://codereview.chromium.org/155772)
BUG=http://crbug.com/12343
TEST=In one terminal, launch chrome and stop the process by pressing ctrl-z,
then launch chrome again in another terminal. The second chrome shall be started
in 5 seconds, and the first one shall be killed.
Review URL: http://codereview.chromium.org/159577
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21943 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For users with AFS home directories, we cannot create UNIX domain
sockets for ProcessSingleton. Before this patch we would spin because
the socket would be constantly 'readable' for accept.
http://codereview.chromium.org/139008
BUG=14237
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19178 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(1) Use nonblocking sockets. Blocking the IO thread is bad.
(2) Handle multiple SocketReaders.
(3) Stop leaking file descriptors in SocketReader. Old code used to stop watching the fds, but not close them.
(4) Handle partial reads and writes. SocketReader reads until the sender shuts down his side of the socket.
(5) Timeout readers after 5 seconds so they don't hang forever.
BUG=http://www.crbug.com/12343
TEST=Open a chrome instance. Check /proc/<pid>/fd/ to see how many descriptors there are. Run "chrome www.google.com" on the command line a bunch of times, which should create a bunch of tabs. Make sure you close all these new tabs that pop up.a Check /proc/<pid>/fd/ to see how many descriptors there are. There shouldn't be many more (although some of the new renderers that got created take awhile because they get cleaned up). Keep repeating, you should be at a steady state of file descriptors.
Review URL: http://codereview.chromium.org/112054
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16811 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since we split on NULL, the final NULL results in an extra command
line token passed to the original browser process.
Bug found by willchan.
Review URL: http://codereview.chromium.org/113714
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16629 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We set up a listener on the IO thread, but the listener lived longer
than the IO thread. Instead, register a listener to stop listening
when the IO thread goes away. We have to register the destruction
listener on the thread that we're listening to, so there's an new
StartListening method dispatched from ProcessSingleton::Create.
Review URL: http://codereview.chromium.org/115605
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16606 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
open multiple chrome processes, the first one just opens a new window.
This is based on http://codereview.chromium.org/88067 by Nikita
Ofitserov (himikof).
BUG=8073
Review URL: http://codereview.chromium.org/115572
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16528 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
base::DIR_EXE could be a very long path, which causes socket creation to fail because socket paths have a limited length. Let's use a temp directory instead. We should also clean up the temp dir when we're done. Also abort if the socket path is too long.
Reviewed in issue 115107
Review URL: http://codereview.chromium.org/113193
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15749 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
| |
r15607 broke the build
TBR=brg, thestig
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15608 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
base::DIR_EXE could be a very long path, which causes socket creation to fail because socket paths have a limited length. Let's use a temp directory instead. We should also clean up the temp dir when we're done.
Also abort if the socket path is too long.
Review URL: http://codereview.chromium.org/115107
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15607 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On POSIX systems, system calls can be interrupted by signals. In this
case, they'll return EINTR, indicating that the system call needs to
be restarted.
(The situation is a little more complicated than this with SA_RESTART,
but you can read man 7 signal if you like.)
The short of it is that you need to catch EINTR and restart the call
for these system calls:
* read, readv, write, writev, ioctl
* open() when dealing with a fifo
* wait*
* Anything socket based (send*, recv*, connect, accept etc)
* flock and lock control with fcntl
* mq_ functions which can block
* futex
* sem_wait (and timed wait)
* pause, sigsuspend, sigtimedwait, sigwaitinfo
* poll, epoll_wait, select and 'p' versions of the same
* msgrcv, msgsnd, semop, semtimedop
* close (although, on Linux, EINTR won't happen here)
* any sleep functions (careful, you need to handle this are restart
with different arguments)
We've been a little sloppy with this until now. This patch adds a
macro for dealing with this and corrects every case of these system
calls (that I found).
The macro is HANDLE_EINTR in base/eintr_wrapper.h. It's safe to
include on Windows and is a no-op there.
On POSIX, it uses GCC magic to return the correct type based on the
expression and restarts the system call if it throws EINTR.
And you can use it like:
HANDLE_EINTR(close(fd));
Or:
ssize_t bytes_read = HANDLE_EINTR(read(fd, buffer, len));
*BEWARE* that it will evaluate the argument multiple times, so this is
not safe:
HANDLE_EINTR(close(FireMissiles()));
http://groups.google.com/group/chromium-dev/browse_thread/thread/41a35b2a457d73a0
http://codereview.chromium.org/100225
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15102 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- use GetAppOutput instead of popen
- make unexpected conditions fatal (otherwise the tests using this code
would mistakenly assume that there is no running browser process)
Also add a constant for SingletonSocket.
Make necessary adjustments to GetAppOutput - ignore stderr (because fuser
prints the file name to stderr and having stderr in |output| would
require more parsing).
Review URL: http://codereview.chromium.org/77031
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14091 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
To get the PID from the socket, we use lsof (fuser doesn't work with unix sockets apparently).
The download shelf, save page, and browser ui tests now pass.
Review URL: http://codereview.chromium.org/66071
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13716 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
| |
BUG=6468
Review URL: http://codereview.chromium.org/46076
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12314 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
| |
Review URL: http://codereview.chromium.org/28142
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10395 0039d316-1c4b-4281-b951-d872f2087c98
|
|
We now will refuse to run a second browser process if one is already running;
making the second invocation bring up new windows in the first remains left to
be implemented.
Review URL: http://codereview.chromium.org/20448
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9980 0039d316-1c4b-4281-b951-d872f2087c98
|