Use trace event with zero args

This commit is contained in:
Kevin Sawicki 2016-12-12 13:49:58 -08:00
parent a7a06a483e
commit 3796d7a6a1
2 changed files with 2 additions and 8 deletions

View file

@ -18,7 +18,6 @@
#include "base/message_loop/message_loop.h" #include "base/message_loop/message_loop.h"
#include "base/path_service.h" #include "base/path_service.h"
#include "base/trace_event/trace_event.h" #include "base/trace_event/trace_event.h"
#include "base/trace_event/trace_event_argument.h"
#include "content/public/browser/browser_thread.h" #include "content/public/browser/browser_thread.h"
#include "content/public/common/content_paths.h" #include "content/public/common/content_paths.h"
#include "native_mate/dictionary.h" #include "native_mate/dictionary.h"
@ -242,9 +241,7 @@ void NodeBindings::UvRunOnce() {
v8::MicrotasksScope::kRunMicrotasks); v8::MicrotasksScope::kRunMicrotasks);
if (!is_browser_) if (!is_browser_)
TRACE_EVENT_BEGIN1("devtools.timeline", "FunctionCall", "data", TRACE_EVENT_BEGIN0("devtools.timeline", "FunctionCall");
std::unique_ptr<base::trace_event::TracedValue>(
new base::trace_event::TracedValue()));
// Deal with uv events. // Deal with uv events.
int r = uv_run(uv_loop_, UV_RUN_NOWAIT); int r = uv_run(uv_loop_, UV_RUN_NOWAIT);

View file

@ -19,7 +19,6 @@
#include "base/command_line.h" #include "base/command_line.h"
#include "base/strings/string_number_conversions.h" #include "base/strings/string_number_conversions.h"
#include "base/trace_event/trace_event.h" #include "base/trace_event/trace_event.h"
#include "base/trace_event/trace_event_argument.h"
#include "content/public/renderer/render_view.h" #include "content/public/renderer/render_view.h"
#include "ipc/ipc_message_macros.h" #include "ipc/ipc_message_macros.h"
#include "native_mate/dictionary.h" #include "native_mate/dictionary.h"
@ -104,9 +103,7 @@ void AtomRenderViewObserver::EmitIPCEvent(blink::WebFrame* frame,
v8::Local<v8::Object> ipc; v8::Local<v8::Object> ipc;
if (GetIPCObject(isolate, context, &ipc)) { if (GetIPCObject(isolate, context, &ipc)) {
TRACE_EVENT1("devtools.timeline", "FunctionCall", "data", TRACE_EVENT0("devtools.timeline", "FunctionCall");
std::unique_ptr<base::trace_event::TracedValue>(
new base::trace_event::TracedValue()));
auto args_vector = ListValueToVector(isolate, args); auto args_vector = ListValueToVector(isolate, args);
// Insert the Event object, event.sender is ipc. // Insert the Event object, event.sender is ipc.
mate::Dictionary event = mate::Dictionary::CreateEmpty(isolate); mate::Dictionary event = mate::Dictionary::CreateEmpty(isolate);