summaryrefslogtreecommitdiffstats
path: root/chrome/renderer/render_thread.cc
diff options
context:
space:
mode:
authordarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-26 15:16:33 +0000
committerdarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-26 15:16:33 +0000
commitdabd2c6df4a215d4c1b05a84bd60713b71cbebef (patch)
treee0ae44ebd1bfb019df8f8336c2b37e00956febdf /chrome/renderer/render_thread.cc
parent1840cfcf0da037741761abe2c04f73c354dff17a (diff)
downloadchromium_src-dabd2c6df4a215d4c1b05a84bd60713b71cbebef.zip
chromium_src-dabd2c6df4a215d4c1b05a84bd60713b71cbebef.tar.gz
chromium_src-dabd2c6df4a215d4c1b05a84bd60713b71cbebef.tar.bz2
Add a defensive null check.
Apparently, we can sometimes have a null RenderView here. This must corresponse to a frame/document that has already been detached from the page. R=jorlow BUG=36831 TEST=none Review URL: http://codereview.chromium.org/661169 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40121 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/render_thread.cc')
-rw-r--r--chrome/renderer/render_thread.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/chrome/renderer/render_thread.cc b/chrome/renderer/render_thread.cc
index 58d225f..047dbff 100644
--- a/chrome/renderer/render_thread.cc
+++ b/chrome/renderer/render_thread.cc
@@ -277,8 +277,8 @@ int32 RenderThread::RoutingIDForCurrentContext() {
if (v8::Context::InContext()) {
RenderView* view =
RenderView::FromWebView(WebFrame::frameForCurrentContext()->view());
- DCHECK(view);
- routing_id = view->routing_id();
+ if (view)
+ routing_id = view->routing_id();
} else {
DLOG(WARNING) << "Not called within a script context!";
}