summaryrefslogtreecommitdiffstats
path: root/base
Commit message (Collapse)AuthorAgeFilesLines
* Revert 98885 - Third attempt at the following. Unreviewed, this was ↵rsleevi@chromium.org2011-08-313-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | originally reviewed in http://codereview.chromium.org/7550002 . Clean up SSL false start blacklist code. Numerous changes, including: * Handle trailing dots in LastTwoLabels() as in http://codereview.chromium.org/7518035/ . Rename this function to LastTwoComponents() to match the terminology used in the RegistryControlledDomainService and elsewhere in Chrome. * Since callers are using std::string anyway, make the functions in the header take const std::string& instead of char*. This also allows doing string operations on them. * Use string operations (like find_last_of()) in place of hand-written algorithms, for brevity, clarity, and safety. * Avoid "unsigned", which the style guide forbids, and use allowed types like size_t, uint32, or int (depending on the situation). * Avoid #define and "using". * Use standard algorithms for similar reasons as using string ops. * Use file_util functions to significantly abbreviate file reading/writing code. * Use wmain() (on Windows) in combination with FilePath to avoid issues if the provided pathname has extended characters that don't flatten losslessly to the default codepage (thanks Darin for pointing out this issue). * Avoid casting where possible. Avoid some casts for printf()-style calls by using a string stream, which also allows for slightly less boilerplate. * Convert non-error uses of stderr to the chrome-standard VLOG(1). * Correctly handle hostnames with trailing dots in the input file. * In general, shorten code where possible. Because this adds a dependency on base, and ssl_false_start_blacklist_process has the "#host" specifier in net.gyp, bradnelson tells me that base and its dependencies need an explicit "host, target" toolchain list for the Linux builds to work correctly. It would be nice if we could avoid this but I guess gyp would have to be smarter or something. BUG=none TEST=none Review URL: http://codereview.chromium.org/7804001 TBR=pkasting@chromium.org Review URL: http://codereview.chromium.org/7778035 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@98917 0039d316-1c4b-4281-b951-d872f2087c98
* Third attempt at the following. Unreviewed, this was originally reviewed in ↵pkasting@chromium.org2011-08-303-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | http://codereview.chromium.org/7550002 . Clean up SSL false start blacklist code. Numerous changes, including: * Handle trailing dots in LastTwoLabels() as in http://codereview.chromium.org/7518035/ . Rename this function to LastTwoComponents() to match the terminology used in the RegistryControlledDomainService and elsewhere in Chrome. * Since callers are using std::string anyway, make the functions in the header take const std::string& instead of char*. This also allows doing string operations on them. * Use string operations (like find_last_of()) in place of hand-written algorithms, for brevity, clarity, and safety. * Avoid "unsigned", which the style guide forbids, and use allowed types like size_t, uint32, or int (depending on the situation). * Avoid #define and "using". * Use standard algorithms for similar reasons as using string ops. * Use file_util functions to significantly abbreviate file reading/writing code. * Use wmain() (on Windows) in combination with FilePath to avoid issues if the provided pathname has extended characters that don't flatten losslessly to the default codepage (thanks Darin for pointing out this issue). * Avoid casting where possible. Avoid some casts for printf()-style calls by using a string stream, which also allows for slightly less boilerplate. * Convert non-error uses of stderr to the chrome-standard VLOG(1). * Correctly handle hostnames with trailing dots in the input file. * In general, shorten code where possible. Because this adds a dependency on base, and ssl_false_start_blacklist_process has the "#host" specifier in net.gyp, bradnelson tells me that base and its dependencies need an explicit "host, target" toolchain list for the Linux builds to work correctly. It would be nice if we could avoid this but I guess gyp would have to be smarter or something. BUG=none TEST=none Review URL: http://codereview.chromium.org/7804001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@98885 0039d316-1c4b-4281-b951-d872f2087c98
* [Mac] Capture -dealloc backtrace to log with CrZombie messages.shess@chromium.org2011-08-302-0/+18
| | | | | | | | | | | | | | Logs a subset of the stack backtrace from the point of -dealloc into a breakpad key to help debug messages to CrZombie objects. This productionizes the basic approach taken to debug a few recent zombie object crashes. BUG=none TEST=monitor crash server. Review URL: http://codereview.chromium.org/7766013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@98858 0039d316-1c4b-4281-b951-d872f2087c98
* base/json: Get rid of an old TODO that doesn't apply anymore.tfarina@chromium.org2011-08-301-3/+0
| | | | | | | | | | | | | | The issue seems to be fixed as the ctor of JSONReader is public and there is a public static Read() function. BUG=None TEST=None R=aa@chromium.org,tony@chromium.org Review URL: http://codereview.chromium.org/7794003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@98854 0039d316-1c4b-4281-b951-d872f2087c98
* cycle botsthakis@chromium.org2011-08-301-1/+1
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/7806006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@98774 0039d316-1c4b-4281-b951-d872f2087c98
* Remove the free_ member of scoped_ptr_malloc.evan@chromium.org2011-08-291-7/+3
| | | | | | | | | | | | | | | | Conceptually, the function to call is known at compile time. There is no reason to save it into a static variable. It turns out doing causes the compiler to emit a static initializer to track whether free_ has been initialized. This change removes static initializers from eight .o files on my local Release build. BUG=87171 Review URL: http://codereview.chromium.org/7795008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@98718 0039d316-1c4b-4281-b951-d872f2087c98
* Upstream android i18n changemichaelbai@google.com2011-08-292-5/+8
| | | | | | | | | BUG= TEST= Review URL: http://codereview.chromium.org/7741032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@98638 0039d316-1c4b-4281-b951-d872f2087c98
* Disable frame pointer optimization on base::debug::StackTrace() so it works ↵eroman@chromium.org2011-08-271-0/+13
| | | | | | | | | | | properly in release builds. Similarly disable optimizations in npobject_stub.cc so base::debug::StackTrace() can recognize more frames (This last de-optimization is only temporary, whereas the change to base::debug::StackTrace is intended to be permanent). BUG=94179 Review URL: http://codereview.chromium.org/7763008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@98542 0039d316-1c4b-4281-b951-d872f2087c98
* Base: WritePlatformFile now retries the operation ifrvargas@google.com2011-08-263-20/+16
| | | | | | | | | | the OS writes less than expected (for POSIX). BUG=94161 TEST=none Review URL: http://codereview.chromium.org/7745008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@98497 0039d316-1c4b-4281-b951-d872f2087c98
* Make WeakPtr thread-safe, i.e. allow cross-thread copying of WeakPtrsievers@chromium.org2011-08-263-18/+220
| | | | | | | | | | | | | | | | | | | | | | | | | and destruction on a thread other than the one where the original reference was created. The problem with the current implementation is modifying the flag pointer from WeakPtr::~WeakPtr which might happen on a different thread (potentially racing with somebody invalidating the flag on the original thread). For compatibility reasons, creating the initial reference attaches to the thread and governs the thread-safety checking logic with respect to checking a reference to be valid and invalidating it, which should both only be done on the same thread. BUG=82509 TEST=added unit tests Added memleak suppression: http://crbug.com/94345 TBR=timurrrr@chromium.org Review URL: http://codereview.chromium.org/7677028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@98443 0039d316-1c4b-4281-b951-d872f2087c98
* Upstream misc changes for android.michaelbai@google.com2011-08-267-11/+43
| | | | | | | | | BUG= TEST= Review URL: http://codereview.chromium.org/7701014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@98432 0039d316-1c4b-4281-b951-d872f2087c98
* Remove some views depenencies from RenderWidgetHostViewWin.jam@chromium.org2011-08-261-0/+8
| | | | | | Review URL: http://codereview.chromium.org/7753021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@98431 0039d316-1c4b-4281-b951-d872f2087c98
* Remove some unneeded reinterpret_castsdilmah@chromium.org2011-08-262-3/+3
| | | | | | | | | BUG=None TEST=None Review URL: http://codereview.chromium.org/7741018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@98417 0039d316-1c4b-4281-b951-d872f2087c98
* Revert recent changes to base::Valuestevenjb@google.com2011-08-264-48/+28
| | | | | | | | | | | | | | | | | | Reverts: 98223: base: Add AsList() function to Value API. 98266: base: Add AsBinary() function to Value API. There are two issues with these commits: 1. libcros uses base::Value to pass data to Chrome. It includes values.h from libchrome which contains its own copy. This is a terrible design flaw in libcros and is being addressed (http://crosbug.com/19576), however we need some time to address this before we can make these changes without breaking Chrome on ChromeOS. 2. AsList() and AsBinary() should be const. The fact that they were not const caused re-factoring that changed const Value& input arguments to Value*, which is against the spec. When we re-introduce this, these members should be made const. BUG=chromium-os:19604 TEST=Check bots + ChromeOS autotests Review URL: http://codereview.chromium.org/7753020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@98378 0039d316-1c4b-4281-b951-d872f2087c98
* Move base/resource_util.* into base/win/ since it's windows specific.tony@chromium.org2011-08-253-10/+11
| | | | | | Review URL: http://codereview.chromium.org/7698005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@98337 0039d316-1c4b-4281-b951-d872f2087c98
* Remove obsolete test timeouts and convert callers.phajdan.jr@chromium.org2011-08-251-15/+0
| | | | | | | | | | This will make it easier to choose the right timeout. BUG=none Review URL: http://codereview.chromium.org/7744031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@98273 0039d316-1c4b-4281-b951-d872f2087c98
* base: Add AsBinary() function to Value API.tfarina@chromium.org2011-08-253-13/+22
| | | | | | | | | | | | | | | | | | | | | | | | | This function should simplify some constructions. Instead of: if (!value->IsType(Value::TYPE_BINARY)) return false; BinaryValue* binary_value = static_cast<BinaryValue*>(value); You can do: BinaryValue* binary_value = value->AsBinary(); if (!binary_value) return false; BUG=None TEST=base_unittests --gtest_filter=Values* R=evan@chromium.org Review URL: http://codereview.chromium.org/7748017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@98266 0039d316-1c4b-4281-b951-d872f2087c98
* Remove unused test command-line switches.phajdan.jr@chromium.org2011-08-253-15/+0
| | | | | | | | BUG=none Review URL: http://codereview.chromium.org/7743006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@98263 0039d316-1c4b-4281-b951-d872f2087c98
* base: Add AsList() function to Value API.tfarina@chromium.org2011-08-254-15/+26
| | | | | | | | | | | | | | | | | | | | | | | | | This function should simplify some constructions. Instead of: if (!value->IsType(Value::TYPE_LIST)) return false; ListValue* list_value = static_cast<ListValue*>(value); You can do: ListValue* list_value = value->AsList(); if (!list_value) return false; BUG=None TEST=base_unittests --gtest_filter=Values* R=evan@chromium.org,tony@chromium.org Review URL: http://codereview.chromium.org/7714004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@98223 0039d316-1c4b-4281-b951-d872f2087c98
* Get views_unittests pass on touch buildoshima@google.com2011-08-241-1/+1
| | | | | | | | | | | | | | | | * Changed views test to use ViewsTestBase. * Always calls ViewsTestBase::SetUp/TearDown. Added flags to check if this is enforced. * Excluded tests that does not make sense on touch/pure views build. BUG=none TEST=views_unittets now passes on touch build, with a few exceptions below. WidgetTest.GrabUngrab: assigned to sadrul NativeTextfieldViewsTest.DragAndDrop_XXX: msw will look into it. Review URL: http://codereview.chromium.org/7720020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@98128 0039d316-1c4b-4281-b951-d872f2087c98
* Reverts debugging code added in hopes of tracking crash. This alsosky@chromium.org2011-08-242-24/+3
| | | | | | | | | | | | | | | reverts 97997 as it was only needed with this debugging code. I'm TBRing this as it's just a revert (well, two reverts). BUG=91396 TEST=none R=brettw@chromium.org,mnissler@chromium.org,ben@chromium.org TBR=brettw@chromium.org,mnissler@chromium.org,ben@chromium.org Review URL: http://codereview.chromium.org/7714038 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@98115 0039d316-1c4b-4281-b951-d872f2087c98
* Tommi: I need an owner review for the chrome frame changes.rogerta@chromium.org2011-08-243-0/+131
| | | | | | | | | | | | | | Moving the test helper class TempRegKeyOverride since I need to do something similar in some new RLZ tests, and I don't want to duplicate the code. Please suggest a better namespace name if needed, I was just following the same pattern found in test_file_util in the same directory. BUG=None TEST=No new tests, just refactoring test helpers Review URL: http://codereview.chromium.org/7669061 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@98100 0039d316-1c4b-4281-b951-d872f2087c98
* mpx: Use [mostly proper] glib event source for X events when GTK events are ↵sadrul@chromium.org2011-08-242-10/+69
| | | | | | | | | | | | | not used. The non-gtk aura WM can be run with this message-pump without taking up 100% CPU. BUG=none TEST=none Review URL: http://codereview.chromium.org/7704003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@98099 0039d316-1c4b-4281-b951-d872f2087c98
* Fix variable names and comments in RandGenerator.dilmah@chromium.org2011-08-243-17/+15
| | | | | | | | | | | | (No semantic change intended). BUG=None TEST=None Review URL: http://codereview.chromium.org/7685053 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@98098 0039d316-1c4b-4281-b951-d872f2087c98
* Remove check_on_delete for ChromeOS to avoid change to sizeof(Value)satorux@chromium.org2011-08-242-1/+16
| | | | | | | | | BUG=chromium-os:19577 TEST=chrome compiles on all platforms Review URL: http://codereview.chromium.org/7714024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97997 0039d316-1c4b-4281-b951-d872f2087c98
* Trying again to land OOM priority manager changes.gspencer@google.com2011-08-233-27/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | First landing failed because of an obscure problem with building linux_shared. This change passes the linux_shared trybot (and linux and linux_chromeos trybots). Changing OOM range to 0, 1000 and tweaking OOM algorithm. With this change, we now use the newer oom_score_adj file (with fallback to oom_adj when on a system that doesn't support it) so that we can take advantage of a finer range ([0, 1000] instead of [0, 15]). Also tweaked the OOM priority manager to prioritize things in a slightly different order, preferring (even more) not to kill tabs that the user has currently selected. Original review: http://codereview.chromium.org/7671033/ BUG=chromium-os:18421, chromium:65009 TEST=Ran on device, observed OOM adj values, forced OOM conditions to watch kills. Review URL: http://codereview.chromium.org/7708020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97888 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 97808 - Make WeakPtr thread-safe, i.e. allow cross-thread copying of ↵cbentzel@chromium.org2011-08-233-220/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | WeakPtr and destruction on a thread other than the one where the original reference was created. The problem with the current implementation is modifying the flag pointer from WeakPtr::~WeakPtr which might happen on a different thread (potentially racing with somebody invalidating the flag on the original thread). For compatibility reasons, creating the initial reference attaches to the thread and governs the thread-safety checking logic with respect to checking a reference to be valid and invalidating it, which should both only be done on the same thread. BUG=82509 TEST=added unit tests Review URL: http://codereview.chromium.org/7677028 TBR=sievers@chromium.org Review URL: http://codereview.chromium.org/7685054 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97846 0039d316-1c4b-4281-b951-d872f2087c98
* Dump a stack trace when browser tests time out.mihaip@chromium.org2011-08-231-2/+3
| | | | | | | | | | | | To make browser test timeouts easier to debug, install a SIGTERM handler that dumps a stack trace (SIGTERM is sent by out_of_proc_test_runner.cc:RunTest via base::KillProcess). R=phajdan.jr@chromium.org Review URL: http://codereview.chromium.org/7696015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97835 0039d316-1c4b-4281-b951-d872f2087c98
* base: Map non-finite double Values to 0.0.derat@chromium.org2011-08-231-2/+5
| | | | | | | | | | | | | | | NaN and positive/negative infinity can't be represented in JSON. I previously added a DCHECK(), but think it also makes sense to do something with the values in release builds so they can't leave profiles unreadable. BUG=chromium-os:73856 TEST=none Review URL: http://codereview.chromium.org/7708008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97816 0039d316-1c4b-4281-b951-d872f2087c98
* Adds some debugging code in hopes of figuring out a crash. As far as Isky@chromium.org2011-08-232-3/+9
| | | | | | | | | | | | | | | can tell the crash is occurring because prefs has a Value that has been deleted so that when we go to update the Value we crash. I only enabled the debugging code for non-incognito prefs. If it turns out the crashes are in incognito-prefs, I'll update that next. BUG=91396 TEST=none R=brettw@chromium.org,bauerb@chromium.org,ben@chromium.org Review URL: http://codereview.chromium.org/7698004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97815 0039d316-1c4b-4281-b951-d872f2087c98
* Make WeakPtr thread-safe, i.e. allow cross-thread copying of WeakPtrsievers@chromium.org2011-08-233-18/+220
| | | | | | | | | | | | | | | | | | | | | and destruction on a thread other than the one where the original reference was created. The problem with the current implementation is modifying the flag pointer from WeakPtr::~WeakPtr which might happen on a different thread (potentially racing with somebody invalidating the flag on the original thread). For compatibility reasons, creating the initial reference attaches to the thread and governs the thread-safety checking logic with respect to checking a reference to be valid and invalidating it, which should both only be done on the same thread. BUG=82509 TEST=added unit tests Review URL: http://codereview.chromium.org/7677028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97808 0039d316-1c4b-4281-b951-d872f2087c98
* Fix WaitForSingleNonChildProcess. There were three bugs in the loop usage.mark@chromium.org2011-08-221-38/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | There was a bug in the original code in that if the loop executes a second time, kq will have been closed. The existing code was not careful about resetting the timeout in the event that the kevent had to be restarted in the loop. The existing code would continue adding the same "change" to the kqueue on each iteration of the loop. The replacement code has been taken mostly from content/common/process_watcher_mac.cc WaitForChildToDie. I would actually like to align these two functions to use the same backend implementation, but that will require better signalling from the backend about which specific case is causing it to return, because WaitForChildToDie needs to be able to reap or kill-and-reap the process while avoiding the "zombie kernel death race" explained in that function's comments. Since WaitForSingleNonChildProcess is currently only concerned with non-child processes, it doesn't need to worry about any of this reaping business. BUG=none TEST=none Review URL: http://codereview.chromium.org/7708006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97769 0039d316-1c4b-4281-b951-d872f2087c98
* GTTF: Reduce number of different timeouts.phajdan.jr@chromium.org2011-08-222-15/+7
| | | | | | | | | | | This will help choosing the right timeouts and avoid many confusions. BUG=none Review URL: http://codereview.chromium.org/7712013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97741 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 97724 - Changing OOM range to 0, 1000 and tweaking OOM algorithm.mattm@chromium.org2011-08-223-67/+27
| | | | | | | | | | | | | | | | | | | | | With this change, we now use the newer oom_score_adj file (with fallback to oom_adj when on a system that doesn't support it) so that we can take advantage of a finer range ([0, 1000] instead of [0, 15]). Also tweaked the OOM priority manager to prioritize things in a slightly different order, preferring (even more) not to kill tabs that the user has currently selected. BUG=chromium-os:18421, chromium:65009 TEST=Ran on device, observed OOM adj values, forced OOM conditions to watch kills. Review URL: http://codereview.chromium.org/7671033 TBR=gspencer@google.com Review URL: http://codereview.chromium.org/7685030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97728 0039d316-1c4b-4281-b951-d872f2087c98
* Changing OOM range to 0, 1000 and tweaking OOM algorithm.gspencer@google.com2011-08-223-27/+67
| | | | | | | | | | | | | | | | | | With this change, we now use the newer oom_score_adj file (with fallback to oom_adj when on a system that doesn't support it) so that we can take advantage of a finer range ([0, 1000] instead of [0, 15]). Also tweaked the OOM priority manager to prioritize things in a slightly different order, preferring (even more) not to kill tabs that the user has currently selected. BUG=chromium-os:18421, chromium:65009 TEST=Ran on device, observed OOM adj values, forced OOM conditions to watch kills. Review URL: http://codereview.chromium.org/7671033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97724 0039d316-1c4b-4281-b951-d872f2087c98
* Rename event_recorder.cc to event_recorder_win.cc.tony@chromium.org2011-08-222-2/+1
| | | | | | | | | This is a win specific implementation file of event_recorder.h. This simplifies the gyp file a bit. Review URL: http://codereview.chromium.org/7696009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97676 0039d316-1c4b-4281-b951-d872f2087c98
* base/json: Don't use static variables of user-defined type (i.e, std::wstring).tfarina@chromium.org2011-08-192-19/+17
| | | | | | | | | | | | | Instead use plain wchar_t array. BUG=83856 TEST=None R=tony@chromium.org Review URL: http://codereview.chromium.org/7624057 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97458 0039d316-1c4b-4281-b951-d872f2087c98
* Fix a small leak in FileUtilProxykinuko@chromium.org2011-08-192-2/+9
| | | | | | | | | BUG=none TEST=green mem bots Review URL: http://codereview.chromium.org/7669046 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97451 0039d316-1c4b-4281-b951-d872f2087c98
* Cleanup code used to diagnose and fix bug 81449.apatrick@chromium.org2011-08-193-35/+6
| | | | | | | | | | I think it is unlikely that CloseHandle was the function that was being hooked because it is called from so many other places without problems. I am assuming that TerminateProcess was being hooked. If the symptoms of 81449 return when this is landed, this patch can be reverted. BUG=81449 Review URL: http://codereview.chromium.org/7624052 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97407 0039d316-1c4b-4281-b951-d872f2087c98
* Implementation of PostTaskAndReply() in MessageLoopProxy and BrowserThread.ajwong@chromium.org2011-08-187-3/+398
| | | | | | | | | | | | | This ensures that the request/reply closures are always deleted on the origin thread, or leaked if the task cannot be completed (due to message loop shutdown). BUG=86301 TEST=new unittests Review URL: http://codereview.chromium.org/7210053 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97387 0039d316-1c4b-4281-b951-d872f2087c98
* [Mac] Implement base::EnableTerminationOnHeapCorruption() by overriding ↵rsesek@chromium.org2011-08-186-4/+108
| | | | | | | | | | | | | | | | | malloc_error_break(). This makes malloc_error_break() fatal for all processes in an attempt to get better stack traces when heap corruption may occur. BUG=90884,91068,93191 TEST=See bug 93191 for repro steps. A crash report gets generated with a hopefully more-useful stack. Originally landed: http://src.chromium.org/viewvc/chrome?view=rev&revision=97315 Reverted: http://src.chromium.org/viewvc/chrome?view=rev&revision=97322 Review URL: http://codereview.chromium.org/7670025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97351 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "[Mac] Implement base::EnableTerminationOnHeapCorruption() by ↵rsesek@chromium.org2011-08-186-108/+4
| | | | | | | | | | | | | | overriding malloc_error_break" This reverts commits r97315 and r97319. BUG=none TEST=none TBR=mark Review URL: http://codereview.chromium.org/7631046 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97322 0039d316-1c4b-4281-b951-d872f2087c98
* Change the expectation for ProcessUtilTest.MacTerminateOnHeapCorruption to ↵rsesek@chromium.org2011-08-181-1/+2
| | | | | | | | | | | work on 10.5-10.7. BUG=none TEST=ProcessUtilTest.MacTerminateOnHeapCorruption Review URL: http://codereview.chromium.org/7671047 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97319 0039d316-1c4b-4281-b951-d872f2087c98
* [Mac] Implement base::EnableTerminationOnHeapCorruption() by overriding ↵rsesek@chromium.org2011-08-186-4/+107
| | | | | | | | | | | | | | malloc_error_break(). This makes malloc_error_break() fatal for all processes in an attempt to get better stack traces when heap corruption may occur. BUG=90884,91068,93191 TEST=See bug 93191 for repro steps. A crash report gets generated with a hopefully more-useful stack. Review URL: http://codereview.chromium.org/7670025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97315 0039d316-1c4b-4281-b951-d872f2087c98
* Mirror Windows implementation of CancelOnMessageLoopThread.dominich@chromium.org2011-08-181-9/+11
| | | | | | | | | | | | | | Before this change, there was a code path where the FilePathWatcher could have been canceled but the delegate_ was not set to NULL. At exit, the destructor would then call Cancel() which would try to post a task to the message loop. With this change, the delegate is correctly set to NULL when the MessageLoop is destroyed even if the FilePathWatcher itself has been canceled. This allows Cancel() from the destructor to do the right thing and not call into the MessageLoop. This implementation matches the Windows version which does not crash. BUG=83190 TEST=FilePathWatcherTest.* Review URL: http://codereview.chromium.org/7655028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97248 0039d316-1c4b-4281-b951-d872f2087c98
* Remove Purify and Quantify.Doing so will reduce substantially the size of ↵jeanluc@chromium.org2011-08-1712-417/+7
| | | | | | | | | the project files. BUG=92102 Review URL: http://codereview.chromium.org/7528010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97156 0039d316-1c4b-4281-b951-d872f2087c98
* Adding checks to guard against buffer overruns in QuotaFileIO::Write and ↵sanga@chromium.org2011-08-172-0/+3
| | | | | | | | | | | | | base::FileUtilProxy::Write Also made some minor changes to fix lint warnings. There are no tests for base::FileUtilProxy. BUG= http://code.google.com/p/nativeclient/issues/detail?id=2076 TEST= test_shell_tests Review URL: http://codereview.chromium.org/7651002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97147 0039d316-1c4b-4281-b951-d872f2087c98
* Adding guards against heap overflow in PPB_FileIO::Readsanga@chromium.org2011-08-171-0/+2
| | | | | | | | BUG= http://code.google.com/p/chromium/issues/detail?id=92750 TEST= none at this time. FileIO tests are turned off for ui_tests. Review URL: http://codereview.chromium.org/7655009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97141 0039d316-1c4b-4281-b951-d872f2087c98
* Include base/stringprintf.h in base/debug/profiler.cc.hans@chromium.org2011-08-171-1/+1
| | | | | | | | | | | | This is needed after r97067. BUG=none TEST=building with GYP_DEFINES="profiling=1" works TBR=tfarina Review URL: http://codereview.chromium.org/7624014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97128 0039d316-1c4b-4281-b951-d872f2087c98
* base: Add DCHECK that double Values are finite.derat@chromium.org2011-08-171-0/+3
| | | | | | | | | | | | | | JSON doesn't support NaN or positive/negative infinity. I'm hoping that this DCHECK will slightly increase the odds that bugs are caught before they start corrupting pref files. BUG=73856 TEST=none Review URL: http://codereview.chromium.org/7646032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97111 0039d316-1c4b-4281-b951-d872f2087c98