summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormpcomplete@google.com <mpcomplete@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-06 22:29:19 +0000
committermpcomplete@google.com <mpcomplete@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-06 22:29:19 +0000
commitabeb40b5db79b0d59a6190a0be55296a25b6fc8e (patch)
tree347c8cbf00dc3692f0daa8fdc1110186f537d251
parent449f8d6c9a2ba105405a0ea0625300fec73eaadb (diff)
downloadchromium_src-abeb40b5db79b0d59a6190a0be55296a25b6fc8e.zip
chromium_src-abeb40b5db79b0d59a6190a0be55296a25b6fc8e.tar.gz
chromium_src-abeb40b5db79b0d59a6190a0be55296a25b6fc8e.tar.bz2
Fix Purify UMR and MLK due to ExtensionViewTest:
- UMR was caused by stubbing out GetHistoryListCount, which RenderViewHost expected to initialize its out params. - MLK was (I think) caused by the IPC reply message to the javascript alert never getting freed. BUG=8364 Review URL: http://codereview.chromium.org/39157 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11167 0039d316-1c4b-4281-b951-d872f2087c98
-rwxr-xr-xchrome/browser/extensions/extension_view_unittest.cc4
-rw-r--r--chrome/browser/renderer_host/render_view_host.cc2
2 files changed, 5 insertions, 1 deletions
diff --git a/chrome/browser/extensions/extension_view_unittest.cc b/chrome/browser/extensions/extension_view_unittest.cc
index 43341ce..98ae81e 100755
--- a/chrome/browser/extensions/extension_view_unittest.cc
+++ b/chrome/browser/extensions/extension_view_unittest.cc
@@ -49,6 +49,10 @@ class MockExtensionView : public ExtensionView {
bool* did_suppress_message) {
got_message_ = true;
MessageLoopForUI::current()->Quit();
+
+ // Call super, otherwise we'll leak reply_msg.
+ ExtensionView::RunJavaScriptMessage(
+ message, default_prompt, flags, reply_msg, did_suppress_message);
}
bool got_message_;
diff --git a/chrome/browser/renderer_host/render_view_host.cc b/chrome/browser/renderer_host/render_view_host.cc
index 32eca24..68654f4e 100644
--- a/chrome/browser/renderer_host/render_view_host.cc
+++ b/chrome/browser/renderer_host/render_view_host.cc
@@ -1232,7 +1232,7 @@ void RenderViewHost::OnMissingPluginStatus(int status) {
}
void RenderViewHost::UpdateBackForwardListCount() {
- int back_list_count, forward_list_count;
+ int back_list_count = 0, forward_list_count = 0;
delegate_->GetHistoryListCount(&back_list_count, &forward_list_count);
Send(new ViewMsg_UpdateBackForwardListCount(
routing_id(), back_list_count, forward_list_count));