summaryrefslogtreecommitdiffstats
path: root/sandbox/src
Commit message (Collapse)AuthorAgeFilesLines
* Eliminated memory growth issue by removing null objects from a list that was ↵erikghill@gmail.com2012-01-262-22/+18
| | | | | | | | accumulating them. Now, the objects are removed from the list when they are no longer needed, instead of being set to null.BUG=110459TEST=1. Go to any webpage 2. Go to a different webpage 3. Go back to step 1 and repeat many times. Before the fix pool_objects_ in win2k_threadpool grows with each new webpage visited. After the fix pool_objects_.size() is bounded even as new webpages are visited. Review URL: http://codereview.chromium.org/9243014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@119287 0039d316-1c4b-4281-b951-d872f2087c98
* Fix memory dealocatiom mismatch by using scoped_ptr_malloccpu@chromium.org2012-01-122-8/+9
| | | | | | | | | | | - Flagged by almost all tools BUG=101717 TEST= sandbox tests in the waterfall are green. Review URL: http://codereview.chromium.org/9107029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@117476 0039d316-1c4b-4281-b951-d872f2087c98
* ake string_util::WriteInto() DCHECK() that the supplied |length_with_null| > ↵pkasting@chromium.org2011-11-293-33/+4
| | | | | | | | | | | | 1, meaning that the without-'\0' string is non-empty. This replaces the conditional code added recently that makes this case return NULL. It's easier to understand if it's simply an error to call WriteInto() in this case at all. Add DCHECK()s or conditionals as appropriate to callers in order to ensure this assertion holds. BUG=none TEST=none Review URL: http://codereview.chromium.org/8418034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@112005 0039d316-1c4b-4281-b951-d872f2087c98
* Replace all usages of FRIEND_TEST() with FRIEND_TEST_ALL_PREFIXES()robertshield@chromium.org2011-11-292-11/+11
| | | | | | | | BUG=105287 TEST=NONE Review URL: http://codereview.chromium.org/8678017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@111935 0039d316-1c4b-4281-b951-d872f2087c98
* Cleanup: Remove unneeded forward declarations in printing, sandbox, and skia.thestig@chromium.org2011-11-143-9/+6
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/8538001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@109961 0039d316-1c4b-4281-b951-d872f2087c98
* Expose the sandbox related code through the content API. I did a bit of ↵jam@chromium.org2011-10-291-7/+2
| | | | | | | | | | | | | cleanup while I was doing this. -got rid of SandboxInitWrapper, since I didn't see a need to expose given that we can just expose sandbox::SandboxInterfaceInfo -got rid of the duplicated code to initialize the broker -since I made MainFunctionParams only have the sandbox struct on Windows, I also made the mac specific auto release pool behind an ifdef as well. It seemed odd to make something so mac specific compile on all platforms to save some #ifdefs. BUG=98716 Review URL: http://codereview.chromium.org/8414020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107863 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 100328 - Prevent the renderer from dying if launched under ↵jschuh@chromium.org2011-09-221-6/+2
| | | | | | | | | | | | | | App-V/SoftGrid. We found a better workaround, so removing this one. BUG=95888 Review URL: http://codereview.chromium.org/7857022 TBR=nsylvain@chromium.org Review URL: http://codereview.chromium.org/7988006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@102289 0039d316-1c4b-4281-b951-d872f2087c98
* These unit tests are flaky and the code is exercised in the integration tests.jschuh@chromium.org2011-09-121-66/+0
| | | | | | | | BUG=89325 TEST=None Review URL: http://codereview.chromium.org/7870006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@100712 0039d316-1c4b-4281-b951-d872f2087c98
* Prevent the renderer from dying if launched under App-V/SoftGrid.nsylvain@chromium.org2011-09-091-2/+6
| | | | | | | | | | | | | A version of Microsoft Office launches chrome under a virtual environment, and this virtual environment does not allow us to reduce the integrity level on the renderer. Since it returns a fake error (ERROR_INVALID_HANDLE), we can trap it and continue execution anyway... until we find a better fix. BUG=95888 Review URL: http://codereview.chromium.org/7857022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@100328 0039d316-1c4b-4281-b951-d872f2087c98
* Don't crash on a NULL type-name from ObjectTypeInformation.jschuh@chromium.org2011-08-231-1/+1
| | | | | | | | BUG=93449 TEST=None. Review URL: http://codereview.chromium.org/7714003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97934 0039d316-1c4b-4281-b951-d872f2087c98
* Don't switch to RtlCreateUserThread until after lockdown.jschuh@chromium.org2011-08-121-0/+11
| | | | | | | | BUG=91413 TEST=None. Review URL: http://codereview.chromium.org/7552014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@96558 0039d316-1c4b-4281-b951-d872f2087c98
* Handle STATUS_BUFFER_OVERFLOW return value from NtQueryObject().jschuh@chromium.org2011-08-112-2/+4
| | | | | | | | BUG=91386 TEST=None Review URL: http://codereview.chromium.org/7542026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@96478 0039d316-1c4b-4281-b951-d872f2087c98
* Hook GetUserDefaultLCID () to prevent crashes on attempting to connect to ↵jschuh@chromium.org2011-08-027-10/+36
| | | | | | | | | | CSRSS after lockdown. BUG=91216 TEST=None. Review URL: http://codereview.chromium.org/7541034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@95144 0039d316-1c4b-4281-b951-d872f2087c98
* Sandbox: Fix a style nit. No actual code change.rvargas@google.com2011-08-021-3/+4
| | | | | | | | BUG=NONE TEST=NONE Review URL: http://codereview.chromium.org/7546001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@95102 0039d316-1c4b-4281-b951-d872f2087c98
* Disable UnloadDllTest.BaselineAvicapDllsergeyu@chromium.org2011-07-271-1/+1
| | | | | | | | | | BUG=80569 TEST=None TBR=cpu@chromium.org Review URL: http://codereview.chromium.org/7520004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@94333 0039d316-1c4b-4281-b951-d872f2087c98
* Warm up GetUserDefaultLangID before closing client ALPC connections.jschuh@chromium.org2011-07-261-0/+7
| | | | | | | | BUG=90492 TEST=Run Chrome on 32-bit Windows 7 or Vista Review URL: http://codereview.chromium.org/7461092 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@94169 0039d316-1c4b-4281-b951-d872f2087c98
* Remove explicit keyword from multi-argument (w/o default values) constructorsdilmah@chromium.org2011-07-261-1/+1
| | | | | | | | | BUG=None TEST=None Review URL: http://codereview.chromium.org/7477008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@94115 0039d316-1c4b-4281-b951-d872f2087c98
* Close all open ALPC client ports at lockdown.jschuh@chromium.org2011-07-2412-6/+154
| | | | | | | | | | Close out the CSRSS and LSASS ALPC client ports that are opened during initialization. BUG=58069 TEST=sbox_integration_tests --gtest_filter=HandleCloserTests.RunThreadPool Review URL: http://codereview.chromium.org/7490002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@93827 0039d316-1c4b-4281-b951-d872f2087c98
* Add a sandbox API to allow closing open handles at lockdown. jschuh@chromium.org2011-07-2110-9/+608
| | | | | | | | | | | BUG=58069 BUG=74242 TEST=sbox_integration_tests --gtest_filter=HandleCloserTests.* Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=93274 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=93308 Review URL: http://codereview.chromium.org/7253054 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@93321 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 93308 - Add a sandbox API to allow closing open handles at lockdown. jschuh@chromium.org2011-07-2110-597/+9
| | | | | | | | | | | | | BUG=58069 BUG=74242 TEST=sbox_integration_tests --gtest_filter=HandleCloserTests.* Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=93274 Review URL: http://codereview.chromium.org/7253054 TBR=jschuh@chromium.org Review URL: http://codereview.chromium.org/7473022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@93315 0039d316-1c4b-4281-b951-d872f2087c98
* Add a sandbox API to allow closing open handles at lockdown. jschuh@chromium.org2011-07-2110-9/+597
| | | | | | | | | | BUG=58069 BUG=74242 TEST=sbox_integration_tests --gtest_filter=HandleCloserTests.* Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=93274 Review URL: http://codereview.chromium.org/7253054 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@93308 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 93274 - Add a sandbox API to allow closing open handles at lockdown. jschuh@chromium.org2011-07-2010-600/+9
| | | | | | | | | | | | BUG=58069 BUG=74242 TEST=sbox_integration_tests --gtest_filter=HandleCloserTests.* Review URL: http://codereview.chromium.org/7253054 TBR=jschuh@chromium.org Review URL: http://codereview.chromium.org/7471021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@93284 0039d316-1c4b-4281-b951-d872f2087c98
* Add a sandbox API to allow closing open handles at lockdown. jschuh@chromium.org2011-07-2010-9/+600
| | | | | | | | | BUG=58069 BUG=74242 TEST=sbox_integration_tests --gtest_filter=HandleCloserTests.* Review URL: http://codereview.chromium.org/7253054 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@93274 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 93113 - Add a sandbox API to allow closing open handles at lockdown.jschuh@chromium.org2011-07-1910-577/+9
| | | | | | | | | | | | | | Reverting on suspicion that it's related to NaCl test breakage. BUG=58069 BUG=74242 TEST=sbox_integration_tests --gtest_filter=HandleCloserTests.* Review URL: http://codereview.chromium.org/7253054 TBR=jschuh@chromium.org Review URL: http://codereview.chromium.org/7462003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@93128 0039d316-1c4b-4281-b951-d872f2087c98
* Add a sandbox API to allow closing open handles at lockdown.jschuh@chromium.org2011-07-1910-9/+577
| | | | | | | | | BUG=58069 BUG=74242 TEST=sbox_integration_tests --gtest_filter=HandleCloserTests.* Review URL: http://codereview.chromium.org/7253054 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@93113 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 92887 - Add a sandbox API to allow closing open handles at lockdown.jschuh@chromium.org2011-07-1810-547/+9
| | | | | | | | | | | | BUG=58069 BUG=74242 TEST=sbox_integration_tests --gtest_filter=HandleCloserTests.* Review URL: http://codereview.chromium.org/7253054 TBR=jschuh@chromium.org Review URL: http://codereview.chromium.org/7398035 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92906 0039d316-1c4b-4281-b951-d872f2087c98
* Add a sandbox API to allow closing open handles at lockdown.jschuh@chromium.org2011-07-1810-9/+547
| | | | | | | | | BUG=58069 BUG=74242 TEST=sbox_integration_tests --gtest_filter=HandleCloserTests.* Review URL: http://codereview.chromium.org/7253054 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92887 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 92563 - Had a bug in the handle table unit test. Added GetHandleName ↵jschuh@chromium.org2011-07-143-63/+23
| | | | | | | | | | | | | to fix the bug and make handle management easier. TEST=sbox_unittests --gtest_filter=HandleTable.* BUG=89325 Review URL: http://codereview.chromium.org/7346027 TBR=jschuh@chromium.org Review URL: http://codereview.chromium.org/7379001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92568 0039d316-1c4b-4281-b951-d872f2087c98
* Had a bug in the handle table unit test. Added GetHandleName to fix the bug ↵jschuh@chromium.org2011-07-143-23/+63
| | | | | | | | | | and make handle management easier. TEST=sbox_unittests --gtest_filter=HandleTable.* BUG=89325 Review URL: http://codereview.chromium.org/7346027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92563 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Had a bug in the handle table unit test. Added GetHandleName to fix ↵evan@chromium.org2011-07-133-32/+14
| | | | | | | | the bug and make handle management easier." This reverts commit r92403. Failed on Windows. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92412 0039d316-1c4b-4281-b951-d872f2087c98
* Had a bug in the handle table unit test. Added GetHandleName to fix the bug ↵jschuh@chromium.org2011-07-133-14/+32
| | | | | | | | | | | | and make handle management easier. TEST=sbox_unittests --gtest_filter=HandleTable.* Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=91270 Review URL: http://codereview.chromium.org/7218066 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92403 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 91270 - sbox_unittests HandleTable.FindTable failing on Win XP & Vistarsleevi@chromium.org2011-07-013-32/+14
| | | | | | | | | | | | | | Had a bug in the handle table unit test. Added GetHandleName to fix the bug and make handle management easier. TEST=sbox_unittests --gtest_filter=HandleTable.* Review URL: http://codereview.chromium.org/7218066 TBR=jschuh@chromium.org Review URL: http://codereview.chromium.org/7292028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@91271 0039d316-1c4b-4281-b951-d872f2087c98
* Had a bug in the handle table unit test. Added GetHandleName to fix the bug ↵jschuh@chromium.org2011-07-013-14/+32
| | | | | | | | | | | and make handle management easier. TEST=sbox_unittests --gtest_filter=HandleTable.* Review URL: http://codereview.chromium.org/7218066 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@91270 0039d316-1c4b-4281-b951-d872f2087c98
* Avoid an extra if() which is not required and is wrongtimurrrr@chromium.org2011-06-281-13/+11
| | | | | | | | | | | | | | | | Info: a) args[i] is uninitialized for (i >= ipc_params->GetParamsCount()) and sometimes for smaller (i) as well (see GetArgs()). Hence, if() is wrong. b) However, when args[i] is uninitialized the ipc_params->args[i] holds INVALID_TYPE. Hence, the if() is redundant. BUG=87078 TEST=no more uninit reports under Dr. Memory Review URL: http://codereview.chromium.org/7234009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90742 0039d316-1c4b-4281-b951-d872f2087c98
* Minor change to use ResolveNTFunctionPtr rather than calling GetProcAddress ↵jschuh@chromium.org2011-06-272-22/+7
| | | | | | | | | | directly. BUG=None. TEST=None. Review URL: http://codereview.chromium.org/7276003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90638 0039d316-1c4b-4281-b951-d872f2087c98
* Modifying ResolveNTFunctionPtr in an attempt to eliminate crashes on random ↵jschuh@chromium.org2011-06-271-7/+18
| | | | | | | | | | unresolved functions. BUG=11789 TEST=None. Review URL: http://codereview.chromium.org/7276004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90614 0039d316-1c4b-4281-b951-d872f2087c98
* Factor Windows handle enumeration code into its own classesI did some ↵jschuh@chromium.org2011-06-244-0/+509
| | | | | | | | | | general cleanup and isolated out the handle enumeration. TEST=sbox_unittests.exe --gtest_filter=HandleTable.* BUG=86521 Review URL: http://codereview.chromium.org/7206007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90449 0039d316-1c4b-4281-b951-d872f2087c98
* Get rid of content dependency from sandbox_policy.hjam@chromium.org2011-05-271-1/+2
| | | | | | | BUG=76697 Review URL: http://codereview.chromium.org/7074025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87093 0039d316-1c4b-4281-b951-d872f2087c98
* Mark UnloadDllTest.BaselineAvicapDll as flaky on windows.zea@chromium.org2011-04-281-1/+7
| | | | | | | BUG=80569 TBR=dmaclach@chromium.org git-svn-id: svn://svn.chromium.org/chrome/trunk/src@83431 0039d316-1c4b-4281-b951-d872f2087c98
* Make the windows_version.h functions threadsafe by using a singleton. Add ↵pkasting@chromium.org2011-04-077-71/+22
| | | | | | | | | | | | accessors to the singleton for more values that various code wants, then convert almost everyone using OSVERSIONINFO or SYSTEM_INFO structs to calling these accessors. Declare an AtExitManager in the out-of-process test runner since it didn't have one and that breaks singleton-using code in the test executable (as opposed to in chrome.dll). A few other minor cleanups along the way (binding of "*", shorter code, etc.). Because I ran into problems with it while modifying gcapi.cc, I cleaned up our usage of strsafe.h a bit, so that files that don't need it don't include it and files that do use STRSAFE_NO_DEPRECATE instead of a modified #include order. BUG=none TEST=none Review URL: http://codereview.chromium.org/6816027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80851 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 80819 due to failed testsmmenke@chromium.org2011-04-077-22/+71
| | | | | | | TBR=pkasting@chromium.org Review URL: http://codereview.chromium.org/6816024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80824 0039d316-1c4b-4281-b951-d872f2087c98
* Make the windows_version.h functions threadsafe by using a singleton. Add ↵pkasting@chromium.org2011-04-077-71/+22
| | | | | | | | | | | | accessors to the singleton for more values that various code wants, then convert almost everyone using OSVERSIONINFO or SYSTEM_INFO structs to calling these accessors. Declare an AtExitManager in the out-of-process test runner since it didn't have one and that breaks singleton-using code in the test executable (as opposed to in chrome.dll). A few other minor cleanups along the way (binding of "*", shorter code, etc.). Because I ran into problems with it while modifying gcapi.cc, I cleaned up our usage of strsafe.h a bit, so that files that don't need it don't include it and files that do use STRSAFE_NO_DEPRECATE instead of a modified #include order. BUG=none TEST=none Review URL: http://codereview.chromium.org/6713107 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80819 0039d316-1c4b-4281-b951-d872f2087c98
* Move some files from base to base/memory.levin@chromium.org2011-03-2812-21/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | raw_scoped_refptr_mismatch_checker.h ref_counted.cc ref_counted.h ref_counted_memory.cc ref_counted_memory.h ref_counted_unittest.cc scoped_callback_factory.h scoped_comptr_win.h scoped_handle.h scoped_native_library.cc scoped_native_library.h scoped_native_library_unittest.cc scoped_nsobject.h scoped_open_process.h scoped_ptr.h scoped_ptr_unittest.cc scoped_temp_dir.cc scoped_temp_dir.h scoped_temp_dir_unittest.cc scoped_vector.h singleton.h singleton_objc.h singleton_unittest.cc linked_ptr.h linked_ptr_unittest.cc weak_ptr.cc weak_ptr.h weak_ptr_unittest.cc BUG=None TEST=Compile Review URL: http://codereview.chromium.org/6714032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79524 0039d316-1c4b-4281-b951-d872f2087c98
* Create a "GetWOW64Status()" utility function and make the rest of the ↵pkasting@chromium.org2011-03-045-74/+29
| | | | | | | | | | codebase call it. BUG=none TEST=none Review URL: http://codereview.chromium.org/6610029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76854 0039d316-1c4b-4281-b951-d872f2087c98
* Make SandboxInterfaceInfo somewhat backwards compatiblecpu@chromium.org2011-02-251-2/+7
| | | | | | | | | | | | | | Hack to allow a mismached chrome exe and dll (different versions) to not crash. The older chrome exe will pass a union, the new chrome dll expects a struct. BUG=74046 TEST=see bug Review URL: http://codereview.chromium.org/6598013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76108 0039d316-1c4b-4281-b951-d872f2087c98
* Sandbox: Make sure that we reset relative_jump_ beforervargas@google.com2011-02-253-13/+73
| | | | | | | | | | | | performing every patch. BUG=69952 TEST=sbox_unittests Review URL: http://codereview.chromium.org/6528033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76089 0039d316-1c4b-4281-b951-d872f2087c98
* Use a struct instead of a union for SandboxInterfaceInfocpu@chromium.org2011-02-101-2/+2
| | | | | | | | | | BUG=72496 TEST=see bug Review URL: http://codereview.chromium.org/6483006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74514 0039d316-1c4b-4281-b951-d872f2087c98
* Reland "Remove base/scoped_handle_win.h."tfarina@chromium.org2011-01-098-52/+56
| | | | | | | | | | | | | | | Fixed the problem with rlz library. Now should be fine to land this again. This reverts commit 3620d9501af7bff688862c54fdd60f7eb41797f3. Original Review URL: http://codereview.chromium.org/6126002/ BUG=None TEST=trybots Review URL: http://codereview.chromium.org/6110005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70861 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Remove base/scoped_handle_win.h stub and fix up all callers to use ↵thakis@chromium.org2011-01-078-56/+52
| | | | | | | | | | the new location and namespace." This reverts r 70795, it broke the build. TBR=vandebo git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70802 0039d316-1c4b-4281-b951-d872f2087c98
* Remove base/scoped_handle_win.h stub and fix up all callers to use the new ↵tfarina@chromium.org2011-01-078-52/+56
| | | | | | | | | | | location and namespace. BUG=None TEST=trybots Review URL: http://codereview.chromium.org/6126002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70795 0039d316-1c4b-4281-b951-d872f2087c98