| Index: content/renderer/memory_benchmarking_extension.cc
|
| diff --git a/content/renderer/memory_benchmarking_extension.cc b/content/renderer/memory_benchmarking_extension.cc
|
| index 6918ac7f97f45c2460b6cb5f7631078c42b75016..20e3e166c448e39938f0974e40d1417cca484bbe 100644
|
| --- a/content/renderer/memory_benchmarking_extension.cc
|
| +++ b/content/renderer/memory_benchmarking_extension.cc
|
| @@ -35,7 +35,7 @@ class MemoryBenchmarkingWrapper : public v8::Extension {
|
| "};"
|
| "chrome.memoryBenchmarking.heapProfilerDump = function(reason) {"
|
| " native function HeapProfilerDump();"
|
| - " HeapProfilerDump(reason);"
|
| + " return HeapProfilerDump(reason);"
|
| "};"
|
| ) {}
|
|
|
| @@ -60,10 +60,14 @@ class MemoryBenchmarkingWrapper : public v8::Extension {
|
|
|
| static v8::Handle<v8::Value> HeapProfilerDump(const v8::Arguments& args) {
|
| #if !defined(NO_TCMALLOC) && defined(OS_LINUX)
|
| + char dumped_filename_buffer[1000];
|
| std::string reason("benchmarking_extension");
|
| if (args.Length() && args[0]->IsString())
|
| reason = *v8::String::AsciiValue(args[0]);
|
| - ::HeapProfilerDump(reason.c_str());
|
| + ::HeapProfilerDumpWithFileName(reason.c_str(),
|
| + dumped_filename_buffer,
|
| + sizeof(dumped_filename_buffer));
|
| + return v8::String::New(dumped_filename_buffer);
|
| #endif // !defined(NO_TCMALLOC) && defined(OS_LINUX)
|
| return v8::Undefined();
|
| }
|
|
|