Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(193)

Unified Diff: webkit/glue/devtools/debugger_agent_impl.cc

Issue 549007: DevTools: fix crash caused by dereferening empty handle (Closed)
Patch Set: Created 10 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/devtools/debugger_agent_impl.cc
diff --git a/webkit/glue/devtools/debugger_agent_impl.cc b/webkit/glue/devtools/debugger_agent_impl.cc
index 6a0d848f236d6ceeb0303017e30bf5caa97b0b8f..de80bad369abc0535261d2775e43d572e887b086 100644
--- a/webkit/glue/devtools/debugger_agent_impl.cc
+++ b/webkit/glue/devtools/debugger_agent_impl.cc
@@ -164,7 +164,11 @@ String DebuggerAgentImpl::ExecuteUtilityFunction(
v8::TryCatch try_catch;
v8::Handle<v8::Value> res_obj = function->Call(context->Global(), 3, args);
if (try_catch.HasCaught()) {
- *exception = WebCore::toWebCoreString(try_catch.Message()->Get());
+ v8::Local<v8::Message> message = try_catch.Message();
+ if (message.IsEmpty())
+ *exception = "Unknown exception";
+ else
+ *exception = WebCore::toWebCoreString(message->Get());
return "";
} else {
return WebCore::toWebCoreStringWithNullCheck(res_obj);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698