Chromium Code Reviews| Index: chrome/renderer/module_system.cc |
| diff --git a/chrome/renderer/module_system.cc b/chrome/renderer/module_system.cc |
| index 97a3bd38d9e32d549a984a157ed67e37762945c1..7ce0c6e7d8ee782b93d3c3035ebf613c837f35f7 100644 |
| --- a/chrome/renderer/module_system.cc |
| +++ b/chrome/renderer/module_system.cc |
| @@ -78,8 +78,13 @@ void ModuleSystem::DumpException(const v8::TryCatch& try_catch) { |
| error_message = *v8::String::Utf8Value(message->Get()); |
| std::string stack_trace = "<stack trace unavailable>"; |
| - if (!try_catch.StackTrace().IsEmpty()) |
| - stack_trace = *v8::String::Utf8Value(try_catch.StackTrace()); |
| + if (!try_catch.StackTrace().IsEmpty()) { |
| + v8::String::Utf8Value stack_value(try_catch.StackTrace()); |
|
eaugusti
2012/08/27 22:39:55
I think this should be v8::Handle<v8::String::Utf8
|
| + if (*stack_value) |
| + stack_trace.assign(*stack_value, stack_value.length()); |
| + else |
| + stack_trace = "<could not convert stack trace to string>"; |
| + } |
| LOG(ERROR) << "[" << resource_name << "(" << message->GetLineNumber() << ")] " |
| << error_message |