chore: remove unused ConvertableToTraceFormatWrapper (#43646)
This commit is contained in:
parent
a4938311cd
commit
5e2e8feb9e
1 changed files with 0 additions and 43 deletions
|
@ -18,7 +18,6 @@
|
||||||
#include "base/task/current_thread.h"
|
#include "base/task/current_thread.h"
|
||||||
#include "base/task/single_thread_task_runner.h"
|
#include "base/task/single_thread_task_runner.h"
|
||||||
#include "base/task/thread_pool/initialization_util.h"
|
#include "base/task/thread_pool/initialization_util.h"
|
||||||
#include "base/trace_event/trace_event.h"
|
|
||||||
#include "gin/array_buffer.h"
|
#include "gin/array_buffer.h"
|
||||||
#include "gin/v8_initializer.h"
|
#include "gin/v8_initializer.h"
|
||||||
#include "shell/browser/microtasks_runner.h"
|
#include "shell/browser/microtasks_runner.h"
|
||||||
|
@ -31,48 +30,6 @@ namespace {
|
||||||
v8::Isolate* g_isolate;
|
v8::Isolate* g_isolate;
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace gin {
|
|
||||||
|
|
||||||
class ConvertableToTraceFormatWrapper final
|
|
||||||
: public base::trace_event::ConvertableToTraceFormat {
|
|
||||||
public:
|
|
||||||
explicit ConvertableToTraceFormatWrapper(
|
|
||||||
std::unique_ptr<v8::ConvertableToTraceFormat> inner)
|
|
||||||
: inner_(std::move(inner)) {}
|
|
||||||
~ConvertableToTraceFormatWrapper() override = default;
|
|
||||||
|
|
||||||
// disable copy
|
|
||||||
ConvertableToTraceFormatWrapper(const ConvertableToTraceFormatWrapper&) =
|
|
||||||
delete;
|
|
||||||
ConvertableToTraceFormatWrapper& operator=(
|
|
||||||
const ConvertableToTraceFormatWrapper&) = delete;
|
|
||||||
|
|
||||||
void AppendAsTraceFormat(std::string* out) const final {
|
|
||||||
inner_->AppendAsTraceFormat(out);
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
|
||||||
std::unique_ptr<v8::ConvertableToTraceFormat> inner_;
|
|
||||||
};
|
|
||||||
|
|
||||||
} // namespace gin
|
|
||||||
|
|
||||||
// Allow std::unique_ptr<v8::ConvertableToTraceFormat> to be a valid
|
|
||||||
// initialization value for trace macros.
|
|
||||||
template <>
|
|
||||||
struct base::trace_event::TraceValue::Helper<
|
|
||||||
std::unique_ptr<v8::ConvertableToTraceFormat>> {
|
|
||||||
static constexpr unsigned char kType = TRACE_VALUE_TYPE_CONVERTABLE;
|
|
||||||
static inline void SetValue(
|
|
||||||
TraceValue* v,
|
|
||||||
std::unique_ptr<v8::ConvertableToTraceFormat> value) {
|
|
||||||
// NOTE: |as_convertable| is an owning pointer, so using new here
|
|
||||||
// is acceptable.
|
|
||||||
v->as_convertable =
|
|
||||||
new gin::ConvertableToTraceFormatWrapper(std::move(value));
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
namespace electron {
|
namespace electron {
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
Loading…
Reference in a new issue