summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbattre@chromium.org <battre@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-03 21:09:53 +0000
committerbattre@chromium.org <battre@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-03 21:09:53 +0000
commit92afac9f6a33689d471356eee7bef731c84d27c7 (patch)
tree99a399f7527f7dd74e4529b9162a7ecfe8561253
parentf6805611f5ae3803bacbe93da3bcf07921c50bfb (diff)
downloadchromium_src-92afac9f6a33689d471356eee7bef731c84d27c7.zip
chromium_src-92afac9f6a33689d471356eee7bef731c84d27c7.tar.gz
chromium_src-92afac9f6a33689d471356eee7bef731c84d27c7.tar.bz2
Store URL in AsyncResourceHandler to debug crash of issue 107692
BUG=107692 TEST=no Review URL: http://codereview.chromium.org/9064008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@116197 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--content/browser/renderer_host/async_resource_handler.cc11
-rw-r--r--content/browser/renderer_host/async_resource_handler.h7
2 files changed, 15 insertions, 3 deletions
diff --git a/content/browser/renderer_host/async_resource_handler.cc b/content/browser/renderer_host/async_resource_handler.cc
index d463579..6074fe9 100644
--- a/content/browser/renderer_host/async_resource_handler.cc
+++ b/content/browser/renderer_host/async_resource_handler.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -85,7 +85,8 @@ AsyncResourceHandler::AsyncResourceHandler(
routing_id_(routing_id),
host_zoom_map_(NULL),
rdh_(resource_dispatcher_host),
- next_buffer_size_(kInitialReadBufSize) {
+ next_buffer_size_(kInitialReadBufSize),
+ url_(url) {
}
AsyncResourceHandler::~AsyncResourceHandler() {
@@ -245,6 +246,12 @@ bool AsyncResourceHandler::OnResponseCompleted(
int request_id,
const net::URLRequestStatus& status,
const std::string& security_info) {
+ // If we crash here, figure out what URL the renderer was requesting.
+ // http://crbug.com/107692
+ char url_buf[128];
+ base::strlcpy(url_buf, url_.spec().c_str(), arraysize(url_buf));
+ base::debug::Alias(url_buf);
+
TimeTicks completion_time = TimeTicks::Now();
filter_->Send(new ResourceMsg_RequestComplete(routing_id_,
request_id,
diff --git a/content/browser/renderer_host/async_resource_handler.h b/content/browser/renderer_host/async_resource_handler.h
index 34f7bc9..9b62894 100644
--- a/content/browser/renderer_host/async_resource_handler.h
+++ b/content/browser/renderer_host/async_resource_handler.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -9,6 +9,7 @@
#include <string>
#include "content/browser/renderer_host/resource_handler.h"
+#include "googleurl/src/gurl.h"
class HostZoomMap;
class ResourceDispatcherHost;
@@ -68,6 +69,10 @@ class AsyncResourceHandler : public ResourceHandler {
// was filled, up to a maximum size of 512k.
int next_buffer_size_;
+ // TODO(battre): Remove url. This is only for debugging
+ // http://crbug.com/107692.
+ GURL url_;
+
DISALLOW_COPY_AND_ASSIGN(AsyncResourceHandler);
};