Skip to content

Commit

Permalink
chore: remove unused ConvertableToTraceFormatWrapper
Browse files Browse the repository at this point in the history
Last use removed in Apr 2024 (39bf441, #41880)
  • Loading branch information
ckerr committed Aug 19, 2024
1 parent 8474bbe commit c729d43
Showing 1 changed file with 0 additions and 42 deletions.
42 changes: 0 additions & 42 deletions shell/browser/javascript_environment.cc
Original file line number Diff line number Diff line change
Expand Up @@ -31,48 +31,6 @@ namespace {
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 {
Expand Down

0 comments on commit c729d43

Please sign in to comment.