OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/renderer/render_thread.h" | 5 #include "chrome/renderer/render_thread.h" |
6 | 6 |
7 #include <v8.h> | 7 #include <v8.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <map> | 10 #include <map> |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 #include "webkit/extensions/v8/benchmarking_extension.h" | 73 #include "webkit/extensions/v8/benchmarking_extension.h" |
74 #include "webkit/extensions/v8/gears_extension.h" | 74 #include "webkit/extensions/v8/gears_extension.h" |
75 #include "webkit/extensions/v8/interval_extension.h" | 75 #include "webkit/extensions/v8/interval_extension.h" |
76 #include "webkit/extensions/v8/playback_extension.h" | 76 #include "webkit/extensions/v8/playback_extension.h" |
77 | 77 |
78 #if defined(OS_WIN) | 78 #if defined(OS_WIN) |
79 #include <windows.h> | 79 #include <windows.h> |
80 #include <objbase.h> | 80 #include <objbase.h> |
81 #endif | 81 #endif |
82 | 82 |
| 83 #if defined(OS_MACOSX) |
| 84 #include "chrome/app/breakpad_mac.h" |
| 85 #endif |
| 86 |
83 using WebKit::WebCache; | 87 using WebKit::WebCache; |
84 using WebKit::WebCrossOriginPreflightResultCache; | 88 using WebKit::WebCrossOriginPreflightResultCache; |
85 using WebKit::WebFontCache; | 89 using WebKit::WebFontCache; |
86 using WebKit::WebRuntimeFeatures; | 90 using WebKit::WebRuntimeFeatures; |
87 using WebKit::WebSecurityPolicy; | 91 using WebKit::WebSecurityPolicy; |
88 using WebKit::WebScriptController; | 92 using WebKit::WebScriptController; |
89 using WebKit::WebString; | 93 using WebKit::WebString; |
90 using WebKit::WebStorageEventDispatcher; | 94 using WebKit::WebStorageEventDispatcher; |
91 using WebKit::WebView; | 95 using WebKit::WebView; |
92 | 96 |
(...skipping 16 matching lines...) Expand all Loading... |
109 // from the IPC channel) are routed to the main message loop but never | 113 // from the IPC channel) are routed to the main message loop but never |
110 // processed (because that message loop is stuck in V8). | 114 // processed (because that message loop is stuck in V8). |
111 // | 115 // |
112 // One could make the browser SIGKILL the renderers, but that leaves open a | 116 // One could make the browser SIGKILL the renderers, but that leaves open a |
113 // large window where a browser failure (or a user, manually terminating | 117 // large window where a browser failure (or a user, manually terminating |
114 // the browser because "it's stuck") will leave behind a process eating all | 118 // the browser because "it's stuck") will leave behind a process eating all |
115 // the CPU. | 119 // the CPU. |
116 // | 120 // |
117 // So, we install a filter on the channel so that we can process this event | 121 // So, we install a filter on the channel so that we can process this event |
118 // here and kill the process. | 122 // here and kill the process. |
| 123 |
| 124 #if defined(OS_MACOSX) |
| 125 // TODO(viettrungluu): crbug.com/28547: The following is needed, as a |
| 126 // stopgap, to avoid leaking due to not releasing Breakpad properly. |
| 127 // TODO(viettrungluu): Investigate why this is being called. |
| 128 if (IsCrashReporterEnabled()) { |
| 129 LOG(INFO) << "Cleaning up Breakpad."; |
| 130 DestructCrashReporter(); |
| 131 } else { |
| 132 LOG(INFO) << "Breakpad not enabled; no clean-up needed."; |
| 133 } |
| 134 #endif // OS_MACOSX |
| 135 |
119 _exit(0); | 136 _exit(0); |
120 } | 137 } |
121 }; | 138 }; |
122 #endif | 139 #endif |
123 | 140 |
124 class RenderViewZoomer : public RenderViewVisitor { | 141 class RenderViewZoomer : public RenderViewVisitor { |
125 public: | 142 public: |
126 RenderViewZoomer(const std::string& host, int zoom_level) | 143 RenderViewZoomer(const std::string& host, int zoom_level) |
127 : host_(host), | 144 : host_(host), |
128 zoom_level_(zoom_level) { | 145 zoom_level_(zoom_level) { |
(...skipping 582 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
711 spellchecker_->EnableAutoSpellCorrect(auto_spell_correct); | 728 spellchecker_->EnableAutoSpellCorrect(auto_spell_correct); |
712 } | 729 } |
713 | 730 |
714 void RenderThread::OnSpellCheckWordAdded(const std::string& word) { | 731 void RenderThread::OnSpellCheckWordAdded(const std::string& word) { |
715 spellchecker_->WordAdded(word); | 732 spellchecker_->WordAdded(word); |
716 } | 733 } |
717 | 734 |
718 void RenderThread::OnSpellCheckEnableAutoSpellCorrect(bool enable) { | 735 void RenderThread::OnSpellCheckEnableAutoSpellCorrect(bool enable) { |
719 spellchecker_->EnableAutoSpellCorrect(enable); | 736 spellchecker_->EnableAutoSpellCorrect(enable); |
720 } | 737 } |
OLD | NEW |