Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Revert "Revert "Add toStringTag value on JSG resource types""" #1721

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/workerd/jsg/jsg.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ namespace workerd::jsg {
::workerd::jsg::JsgKind::RESOURCE; \
using jsgSuper = jsgThis; \
using jsgThis = Type; \
static inline kj::StringPtr jsgGetName() { return #Type##_kjc; } \
inline kj::StringPtr jsgGetMemoryName() const override { return #Type##_kjc; } \
inline size_t jsgGetMemorySelfSize() const override { return sizeof(Type); } \
inline void jsgGetMemoryInfo(jsg::MemoryTracker& tracker) const override { \
Expand Down
3 changes: 0 additions & 3 deletions src/workerd/jsg/resource.h
Original file line number Diff line number Diff line change
Expand Up @@ -712,9 +712,6 @@ struct ResourceTypeBuilder {
inspectProperties = v8::ObjectTemplate::New(isolate);
prototype->Set(symbol, inspectProperties, static_cast<v8::PropertyAttribute>(
v8::PropertyAttribute::ReadOnly | v8::PropertyAttribute::DontEnum));

auto toStringTagSymbol = v8::Symbol::GetToStringTag(isolate);
prototype->Set(toStringTagSymbol, v8StrIntern(isolate, Self::jsgGetName()), v8::PropertyAttribute::None);
}

template <typename Type, typename GetNamedMethod, GetNamedMethod getNamedMethod>
Expand Down
2 changes: 1 addition & 1 deletion src/workerd/jsg/wrappable.h
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ class Wrappable: public kj::Refcounted {
virtual void jsgVisitForGc(GcVisitor& visitor);

virtual kj::StringPtr jsgGetMemoryName() const {
KJ_UNIMPLEMENTED("jsgGetMemoryName is not implemented. "
KJ_UNIMPLEMENTED("jsgGetTypeName is not implemented. "
"It must be overridden by subclasses");
}

Expand Down
Loading