summaryrefslogtreecommitdiffstats
path: root/chrome/renderer
Commit message (Collapse)AuthorAgeFilesLines
* Revert 18090jrg@chromium.org2009-06-102-145/+30
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18092 0039d316-1c4b-4281-b951-d872f2087c98
* To help resolve the performance issue introduced when enabling the resize ↵mad@google.com2009-06-102-30/+145
| | | | | | | | corner, we now keep all non-intersecting rects separately and send an array of invalidation bitmaps via IPC as opposed to a single unionized rect :-) Review URL: http://codereview.chromium.org/108040 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18090 0039d316-1c4b-4281-b951-d872f2087c98
* Make a comment change to the grd file so that my resource change from the ↵erikkay@google.com2009-06-101-1/+1
| | | | | | | | | | previous checkin will be picked up. TBR=aa Review URL: http://codereview.chromium.org/118503 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18057 0039d316-1c4b-4281-b951-d872f2087c98
* Clean up bookmark API to match style of other extension APIserikkay@google.com2009-06-103-40/+50
| | | | | | | | | | BUG=11823 TEST=--load-extension test/data/extensions/samples/bookmarks TEST=unit_tests.exe --gtest_filter=ExtensionAPIClientTest.* Review URL: http://codereview.chromium.org/118209 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18056 0039d316-1c4b-4281-b951-d872f2087c98
* Change the extension callback system to work more like events, where we trackmpcomplete@google.com2009-06-108-126/+119
| | | | | | | | | | | | | contexts rather than frames. Also change the way we call through to javascript, to avoid a v8::Compile. This is so we don't skew the histogram stats on our script cache. BUG=? TEST=none Review URL: http://codereview.chromium.org/119369 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18001 0039d316-1c4b-4281-b951-d872f2087c98
* Fixes a flash plugin hang caused by opening google finance ticker symbols in ↵ananta@chromium.org2009-06-096-64/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | a background tab. From what I can tell this bug always existed in Chrome. The flash plugin gets instantiated and gets initial geometry updates during initialization. We download the plugin url after the geometry update. After these geometry updates the webkit layout timer runs and the plugin gets additional geometry updates. However these don't get sent over to the flash plugin instance in the plugin process as the geometry updates for windowed plugins are only flushed during paint, which does not happen in this case. The flash plugin ends up receiving data before geometry update and ends up behaving in a wierd fashion, i.e. not peeking for messages, etc. The fact that this is a windowed plugin results in the browser ui thread also getting hung until the plugin gets out of this state. The fix for the geometry update issue is to remove the deferred geometry update stuff. This only exists for windowed plugins anyway. The geometry update IPC is a plain routed message and it should not be a big overhead to send these IPCs to the plugin process. I found that while this change fixes the basic issue, we still see some hangs in the flash plugin because of it receiving data before the valid geometry update kicks in. John is working on a fix where we never have to call setFrameRect ourselves and always honor the setFrameRect calls made by Webkit. This issue can be marked as fixed once both fixes get checked in. This fixes http://code.google.com/p/chromium/issues/detail?id=12993 Bug=12993 TEST=Open google finance and Ctrl Click on the tickers in the page like Basic Materials, etc. Review URL: http://codereview.chromium.org/119200 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17918 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 17889. It broke the extensions_uitests. And I didn't even get itmpcomplete@google.com2009-06-088-117/+127
| | | | | | | | | reviewed! (Wow, brainfart.) TBR=aa Review URL: http://codereview.chromium.org/119324 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17893 0039d316-1c4b-4281-b951-d872f2087c98
* Change the extension callback system to work more like events, where we trackmpcomplete@google.com2009-06-088-127/+117
| | | | | | | | | | | | | contexts rather than frames. Also change the way we call through to javascript, to avoid a v8::Compile. This is so we don't skew the histogram stats on our script cache. BUG=? TEST=none Review URL: http://codereview.chromium.org/118353 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17889 0039d316-1c4b-4281-b951-d872f2087c98
* Revert has_selection flag back to false (was testing that this worked and ↵sverrir@google.com2009-06-081-1/+1
| | | | | | | | | | | forgot to change back in my last changelist). BUG=none TEST=Print Dialog on Windows should not have the print selection option active. Review URL: http://codereview.chromium.org/118391 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17885 0039d316-1c4b-4281-b951-d872f2087c98
* Add support for printing selection only flag. This only adds the flag to the ↵sverrir@google.com2009-06-085-2/+23
| | | | | | | | | | | IPC and implements the Windows dialog interaction but does not enable this just yet. BUG=http://crbug.com/1682 TEST=none Review URL: http://codereview.chromium.org/118338 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17867 0039d316-1c4b-4281-b951-d872f2087c98
* Turn on DevTools Profiler.mnaganov@chromium.org2009-06-081-1/+3
| | | | | | | | | | | Works on Windows and Linux. On Mac V8's sampling doesn't work with Chromium due to an unknown reason. BUG=none TEST=none Review URL: http://codereview.chromium.org/118384 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17866 0039d316-1c4b-4281-b951-d872f2087c98
* Add a test to print using javascript. This is to make sure I don't break ↵sverrir@google.com2009-06-051-0/+31
| | | | | | | | | | | anything when I start to do the async printing. BUG=none TEST=run unit tests Review URL: http://codereview.chromium.org/119245 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17747 0039d316-1c4b-4281-b951-d872f2087c98
* Fix a one pixel offset error in PrintLayoutTest. Now checks with a 5% ↵sverrir@google.com2009-06-051-2/+8
| | | | | | | | | | | margin. We need to figure out why this is different between machines and runs. BUG=none TEST=none Review URL: http://codereview.chromium.org/118312 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17746 0039d316-1c4b-4281-b951-d872f2087c98
* Refuse to load extension-private plugins for pages that don't belong to thatmpcomplete@google.com2009-06-051-1/+5
| | | | | | | | | | extension. BUG=12960 TEST=none Review URL: http://codereview.chromium.org/118198 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17743 0039d316-1c4b-4281-b951-d872f2087c98
* Reenable unittest and fix the failure. This failed after a change in thesverrir@google.com2009-06-051-4/+1
| | | | | | | | | | | page sizing. BUG=none TEST=none Review URL: http://codereview.chromium.org/118271 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17731 0039d316-1c4b-4281-b951-d872f2087c98
* Add an extension to expose some primitives to JS for doing mbelshe@google.com2009-06-053-0/+25
| | | | | | | | | | | | | | | | | benchmarking from within Chrome. Because the JS resides in the renderer and the HTTP logic resides in the browser, this required creation of two new, control messages which can be sent from the renderer to the browser. These are controlled under a new commandline option "--enable-benchmarking" BUG=6754 TEST=none Review URL: http://codereview.chromium.org/119191 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17722 0039d316-1c4b-4281-b951-d872f2087c98
* Changed to use PushSource for the intermediate bufferhclam@chromium.org2009-06-052-27/+105
| | | | | | | | | | | | | | | between the IPC layer and the audio hardware interface. We have completely moved away from being blocking in AudioRendererHost. Since we'll be using PushSource for a longer period of buffering. It's necessary to have Play/Pause functionality in the AudioOutputStream, this is simulated by start/stop the AudioOutputStream multiple times. Review URL: http://codereview.chromium.org/114069 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17707 0039d316-1c4b-4281-b951-d872f2087c98
* Testing AudioMessageFilterhclam@chromium.org2009-06-042-0/+197
| | | | | | | | Unit test for AudioMessageFilter Review URL: http://codereview.chromium.org/119136 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17685 0039d316-1c4b-4281-b951-d872f2087c98
* ipc: use strings, not wstrings for channel ids.evan@chromium.org2009-06-0410-11/+11
| | | | | | | | | | They're ASCII anyway. TEST=covered by existing tests Review URL: http://codereview.chromium.org/119131 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17682 0039d316-1c4b-4281-b951-d872f2087c98
* Convert most of the chrome .lib files to gyp generation:sgk@chromium.org2009-06-041-467/+0
| | | | | | | | | automation.lib, common.lib, debugger.lib, plugin.lib, renderer.lib. BUG=none TEST=none Review URL: http://codereview.chromium.org/118254 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17675 0039d316-1c4b-4281-b951-d872f2087c98
* Disable failing PrintLayoutTest test. Commenting out because of local ↵sverrir@google.com2009-06-041-0/+3
| | | | | | | | | | | | compilation issues BUG=none TEST=none Review URL: http://codereview.chromium.org/118261 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17664 0039d316-1c4b-4281-b951-d872f2087c98
* Modify the view size when printing. This is to re-layout everything on the ↵sverrir@google.com2009-06-041-26/+80
| | | | | | | | | | | page so the print will fill out the full page. BUG=http://crbug.com/1566 TEST=See bug description. Create a html page with a table that fills the screen. Print and make sure it aligns with the margins. Review URL: http://codereview.chromium.org/118176 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17657 0039d316-1c4b-4281-b951-d872f2087c98
* Change from CRLF to LF - a later patch does not work on the try bots because ↵sverrir@google.com2009-06-042-374/+374
| | | | | | | | | | | of this. BUG=none TEST=none Review URL: http://codereview.chromium.org/118249 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17650 0039d316-1c4b-4281-b951-d872f2087c98
* Allow sysctl-read in the mac sandbox, making drawing of zoomed controls more ↵thakis@chromium.org2009-06-042-35/+8
| | | | | | | | | | | reliable. TEST=Zoom a page with multiple form controls, check that they don't become invisible when zoomed. BUG=11325 Review URL: http://codereview.chromium.org/119151 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17645 0039d316-1c4b-4281-b951-d872f2087c98
* Revert r17575 and r17576. They are causing layout test errors.agl@chromium.org2009-06-041-42/+3
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17577 0039d316-1c4b-4281-b951-d872f2087c98
* Linux: Add support for chrooted renderers.agl@chromium.org2009-06-041-3/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | http://code.google.com/p/chromium/wiki/LinuxSandboxIPC Without filesystem access from the renderers, we need another way of dealing with fontconfig and font loading. This add support for: * An "SBX_D" environment variable in the renderers which is used to signal the end of dynamic linking so that the chroot can be enforced. * A sandbox_host process, running outside the sandbox, to deal with fontconfig requests from the renderers. See the wiki page for the reasoning behind making it a separate process. * A new, custom SkFontHost for Skia. Because this is Chrome specific, it will live outside the upstream Skia tree. This FontHost can be configured either to drive fontconfig directly (for the browser process and for any unsandboxed renderers) or to use an IPC system. Since the same SkFontHost has to be linked into both the browser and renderer (they are the same binary), this switch has to be made at run time. Sandbox IPC calls are rare (a couple of dozen at page load time) and add about 50us of overhead for each call. http://codereview.chromium.org/112074 BUG=8081 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17575 0039d316-1c4b-4281-b951-d872f2087c98
* Resubmitting change r17491 that was reverted because of a memory leak.sverrir@google.com2009-06-035-238/+390
| | | | | | | | Fixed the leak. Review URL: http://codereview.chromium.org/118190 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17547 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Refactor print functionality in RenderView..."willchan@chromium.org2009-06-035-391/+238
| | | | | | | | | This broke XP Unit (Purify) TBR=sverrir Review URL: http://codereview.chromium.org/119099 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17516 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor print functionality in RenderView. Moved most of the print ↵sverrir@google.com2009-06-035-238/+391
| | | | | | | | | | | functionality to a new class that will later be the base for asynchronous printing support. This is to make further changes to printing easier. There is no functional change and the code continues to be tested through the RenderView tests. Review URL: http://codereview.chromium.org/99368 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17491 0039d316-1c4b-4281-b951-d872f2087c98
* Reduce header dependencies in base/phajdan.jr@chromium.org2009-06-031-0/+1
| | | | | | | | Also adds more explicit #includes for needed things. Review URL: http://codereview.chromium.org/118162 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17479 0039d316-1c4b-4281-b951-d872f2087c98
* Implement InspectorClient's Settings API.pfeldman@chromium.org2009-06-032-0/+6
| | | | | | | | | | | | | | | This CL implements InspectorClient's API for reading / writing inspector settings. Here is how this is done: - inspector_client_impl.cc caches / serializes preferences into raw strings. It supports all kinds of settings except for string vector. I did not implement it since a) it requires more escaping b) I think we should get rid of it upstream. It then passes serialized settings string over IPC. - There is a dedicated IPC message called UpdateInspectorSettings that takes care of settings update. Two things I don't like: 1) reading settings and writing settings follow different paths: WebPreferences interface for read, delegate -> IPC for write. WebPreferences on read is used since these settings are needed very early in the page cycle. delegate -> IPC on write is the only option. 2) this looks like too much code on the Chrome side for functionality like this. Is there a more generic way of settings and persisting WebKit's preferences in Chrome? Should there be one? Review URL: http://codereview.chromium.org/119041 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17473 0039d316-1c4b-4281-b951-d872f2087c98
* Header cleanup in webkit/gluephajdan.jr@chromium.org2009-06-011-0/+1
| | | | | | | | | - reduce header dependencies - remove redundant forward declarations Review URL: http://codereview.chromium.org/115871 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17313 0039d316-1c4b-4281-b951-d872f2087c98
* Enforce a max length for document titles.abarth@chromium.org2009-05-301-2/+8
| | | | | | | | | | R=deanm BUG=http://crbug.com/12810 TEST=None Review URL: http://codereview.chromium.org/113969 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17282 0039d316-1c4b-4281-b951-d872f2087c98
* BUG=12192rafaelw@chromium.org2009-05-3010-29/+15
| | | | | | | | R=aa Review URL: http://codereview.chromium.org/115681 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17269 0039d316-1c4b-4281-b951-d872f2087c98
* DevTools: decouple class and method names from RPC message arguments. That ↵yurys@google.com2009-05-294-12/+28
| | | | | | | | would allow to select dispatcher wothout parsing the message argument. Review URL: http://codereview.chromium.org/115862 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17176 0039d316-1c4b-4281-b951-d872f2087c98
* Fixed a bug with the unit_tests, which caused it to leave hebrew enabledhbono@chromium.org2009-05-292-15/+45
| | | | | | | | | | | | | vista without hebrew support the bug reason is documented in the source for all to see and the bug=12093 (http://code.google.com/p/chromium/issues/detail?id=12093) the code has been tested with and without a debugger but i have to admit, the unit_tests rarely pass on my machine (the ui ones never do)but this code i changed leaves the state EXACTLY like it was and solves this issue at least BUG=12093 TEST=run unit_tests.exe on Hebrew Windows; run Chrome; open a page which contains a <textarea dir="ltr"></textarea> element; press control+right-shift key, and; verify its "dir" attribute becomes "rtl". Review URL: http://codereview.chromium.org/115849 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17156 0039d316-1c4b-4281-b951-d872f2087c98
* Automatically adapt to faster/slower uploads of renderer histogramsjar@chromium.org2009-05-284-17/+17
| | | | | | | | | | | | | | | | | | | | | This replaces the current time based approach (chrome is given N seconds to upload all renederer histograms) with an asynch callback approach that waits until all renderers have responded (with their updates). It uses a fall-back timer to ensure that a hung renderer won't delay things forever as well. This causes faster (and complete) updates in about:histograms as well as generally assuring complete updates during UMA gatherings. This code was contributed by Raman Tenneti in CL 42496 http://codereview.chromium.org/42496 bug=12850 r=raman Review URL: http://codereview.chromium.org/113473 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17123 0039d316-1c4b-4281-b951-d872f2087c98
* Respect Linux user prefs with regards to crash reporting.thestig@chromium.org2009-05-284-117/+0
| | | | | | | | | | This involves implementing GoogleUpdateSettings::[GS]etCollectStatsConsent, and a whole lot of refactoring. BUG=none TEST=delete config dir, run official Linux build, don't enable crash reporting, crash browser -> no crash reporting. Review URL: http://codereview.chromium.org/115808 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17104 0039d316-1c4b-4281-b951-d872f2087c98
* Remove DataSourceImpl from chrome/renderer/mediahclam@chromium.org2009-05-282-538/+0
| | | | | | | | | | Since media in chrome renderer doesn't use file handle anymore, and these two files are deprecated, remove them from the tree. Review URL: http://codereview.chromium.org/115841 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17046 0039d316-1c4b-4281-b951-d872f2087c98
* Chrome renderer support for YV16.fbarchard@chromium.org2009-05-271-11/+17
| | | | | | Review URL: http://codereview.chromium.org/113890 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17016 0039d316-1c4b-4281-b951-d872f2087c98
* posix: don't register gears at all.evan@chromium.org2009-05-261-0/+3
| | | | | | | | | | | We currently register gears in JS-land, despite it not working in browser-land. We should disable it everywhere until it works. BUG=12529 Review URL: http://codereview.chromium.org/113870 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16943 0039d316-1c4b-4281-b951-d872f2087c98
* Fixing a long resource loading for small clipshclam@chromium.org2009-05-261-16/+18
| | | | | | | | | | | | The logic for resource loading for media file has a problem in determining the wait condition that it waited for one extra cycle (about ~5s) to know that the resource loading has completed, it is fixed in this patch. Also made clear about the logic in it. Review URL: http://codereview.chromium.org/113861 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16935 0039d316-1c4b-4281-b951-d872f2087c98
* Update renderers when there are zero user scripts.aa@chromium.org2009-05-261-1/+1
| | | | | | | | | | | | | Commit: http://codereview.chromium.org/113733 BUG=12170 TEST=Enable user scripts and create one. See that it runs. Now delete it. See that it does not run! Review URL: http://codereview.chromium.org/113741 Patch from Ted Crossman <tedoc2000@gmail.com>. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16864 0039d316-1c4b-4281-b951-d872f2087c98
* Rename |policy_url| to |first_party_for_cookies|. This now matches the ↵abarth@chromium.org2009-05-235-17/+18
| | | | | | | | | | | | WebKit name for this piece of data. R=jackson BUG=None TEST=No behavior change Review URL: http://codereview.chromium.org/115743 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16843 0039d316-1c4b-4281-b951-d872f2087c98
* Adds a RenderViewTest.PrintLayoutTest.hbono@chromium.org2009-05-238-11/+650
| | | | | | | | | | | | | | This change adds a new test 'RenderViewTest.PrintLayoutTest', which prints an HTML page and verify its output. To process a print job and verify its output, this change adds a pseudo-printer device "MockPrinter" into the MockRenderThread object. This MockPrinter object receives print-related IPC messages, process print jobs, and store the MD5 checksum of the output data. The current RenderViewTest.PrintLayoutTest retrieves the MD5 checksum values and just compare them with expected values. Nevertheless, please feel free to give me your ideas to improve this test. Finally, this change is inspired by PrintingLayoutTextTests (created by maruel) and a RenderViewTest.OnPrintPages (created by Mohamed Mansour). I would like to express my best gratitude to them. BUG=none TEST=none Review URL: http://codereview.chromium.org/100255 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16834 0039d316-1c4b-4281-b951-d872f2087c98
* CPAPI gears drag drop and renderer IPC.michaeln@google.com2009-05-222-3/+108
| | | | | | | | | | | | | | | CPAPI (0.10) functions for gears drag drop; one to extract thedrag type/data given an NPObject *event, one to override thedrop effect (drag cursor). Gears drag drop API receives a browser event as an NPObject* sothe event is untrusted. Provide IPC calls to the renderer sogears can pass the event to renderer/V8 for checking, prior todrag type/data extraction, or the setting of the drop effect. Original patch by Noel Gordon via: http://codereview.chromium.org/99240 BUG=7995 TEST=none Review URL: http://codereview.chromium.org/112056 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16808 0039d316-1c4b-4281-b951-d872f2087c98
* Introduce a buffer wait and timeout threshold for BufferedResourceLoaderhclam@chromium.org2009-05-222-175/+314
| | | | | | | | | | | | | | | | | | | | | The logic in the seek method of BufferedResourceLoader was that it will wait until the data is downloaded if we know that the desired seek position is within the bufferable range of the buffer, which is 10MB for now. This number is found to be too big and we should have another constant that governs the threshold of bytes that we should wait for forward seeking instead of starting a new request, this value is essentially much smaller than the buffer size, we guess this number to be 2MB. Also introduced the timeout logic to BufferedResourceLoader, so if BufferedResouceLoaderRead() takes more than a certain amount of time it is declared timeout and a new request should be started. The current timeout is set to 5s. Review URL: http://codereview.chromium.org/115627 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16793 0039d316-1c4b-4281-b951-d872f2087c98
* Remove the HistoryState property of WebRequest.darin@chromium.org2009-05-221-21/+31
| | | | | | | | | | | | | | | | | In the new WebKit API, it seems best if WebRequest is just a wrapper for WebCore::ResourceRequest since in most contexts that's what we need it to be. The solution here is to introduce a LoadHistoryState method on WebFrame that can be used to navigate to a session history item. BUG=10038 TEST=covered by existing back/forward navigation tests. R=brettw Review URL: http://codereview.chromium.org/113758 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16747 0039d316-1c4b-4281-b951-d872f2087c98
* Linux: add Breakpad supportagl@chromium.org2009-05-225-1/+124
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commits a rewrite of the Breakpad Linux client. The old code: * Had a number of plain bugs in it, but those could just have been fixed. * Allocated memory from the heap, which is a no go. * Made libc calls which can enter the dynamic linker - another source of crashes. * Didn't understand some of the tricks needed, like clone() via libc will write to random areas of memory because it assumes that it's only called from libpthread Additionally, we had one more requirement which meant changing the interface: * We need to be able to crash dump the renderers from the browser process. And that last one really needed a rewrite. We intend to try and upstream this new code into Breakpad. The new Breakpad design works like this: When a renderer crashes, a signal handler runs on an alternative stack and collects information about the registers of the thread before the crash. Then we enter Chromium specific code an send a datagram message to a magic file descriptor (4) containing: * the registers and tid of the crashing thread * the active URL * a file descriptor to a socket * a CREDENTIALS structure giving the PID of the renderer. On the other end of the socket is an object on the IO thread (render_crash_handler_host_linux.cc) which reads and parses the datagram. The CREDENTIALS structure is validated by the kernel, so the renderer can't lie about it's PID and try and get the browser to crash dump the wrong process. The browser then ptraces the renderer and extracts all the needed information to write a minidump to a temp file. Then we write a byte to the file descriptor which the renderer gave the browser in the datagram and that's the signal to the renderer to finish dying. It dies by sending itself the same signal which trigger the crash dump in the first place, so it will appear to crash as normal as far as kernel core dumps and waitpid are concerned. The browser then constucts a MIME message in a temp file for upload to the crash service. We then fork out to /usr/bin/wget to actually do the upload (since Debian numbers suggest that 99.8% of users have wget installed.) A second forked child unlinks the temp files once wget has completed. For a browser crash, everything works pretty much the same except that the datagram step is omitted and we clone() off a process to ptrace ourselves and write the minidump. This code is only enabled in Chrome branded builds. Stub source files are substituted in the case of a Chromium build. http://codereview.chromium.org/115526 BUG=9646,10772 TEST=Build a Chrome branded binary. Send SEGV to a renderer and verify that wget output appears on stderr. Send a SEGV to the main binary and verify the same. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16719 0039d316-1c4b-4281-b951-d872f2087c98
* 1)When we enabled breakpad on first run we weren't correctly setting the ↵jeremy@chromium.org2009-05-221-1/+1
| | | | | | | | | | | process type. 2)Fixed another logic inversion in SetActiveRendererURL. 3)Change IsCrashReporterEnabled-> IsCrashReporterDisabled to prevent future confusion since that was the question all the callers where askign anyway. Review URL: http://codereview.chromium.org/113737 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16707 0039d316-1c4b-4281-b951-d872f2087c98