diff options
author | pfeldman@chromium.org <pfeldman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-26 09:35:47 +0000 |
---|---|---|
committer | pfeldman@chromium.org <pfeldman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-26 09:35:47 +0000 |
commit | 329d2b6c2f214715411a6a10355f481cd0ad38f3 (patch) | |
tree | c4d42878582cb33753a7e39fcb23d472f206104d /webkit/glue | |
parent | cd1c0f12ae0e2dd67707fb638182cff5bb4449ee (diff) | |
download | chromium_src-329d2b6c2f214715411a6a10355f481cd0ad38f3.zip chromium_src-329d2b6c2f214715411a6a10355f481cd0ad38f3.tar.gz chromium_src-329d2b6c2f214715411a6a10355f481cd0ad38f3.tar.bz2 |
DevTools: fix potential crash.
BUG=15373
Review URL: http://codereview.chromium.org/147199
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19349 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue')
-rw-r--r-- | webkit/glue/devtools/debugger_agent_impl.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/webkit/glue/devtools/debugger_agent_impl.cc b/webkit/glue/devtools/debugger_agent_impl.cc index 1a6b94c..4312cbe 100644 --- a/webkit/glue/devtools/debugger_agent_impl.cc +++ b/webkit/glue/devtools/debugger_agent_impl.cc @@ -156,6 +156,10 @@ String DebuggerAgentImpl::ExecuteUtilityFunction( String* exception) { v8::HandleScope scope; ASSERT(!context.IsEmpty()); + if (context.IsEmpty()) { + *exception = "No window context."; + return ""; + } v8::Context::Scope context_scope(context); v8::Handle<v8::Function> function = v8::Local<v8::Function>::Cast( context->Global()->Get(v8::String::New("devtools$$dispatch"))); |