Index: Source/bindings/templates/interface_base.cpp |
diff --git a/Source/bindings/templates/interface_base.cpp b/Source/bindings/templates/interface_base.cpp |
index 1d817dd1f9eff827971e41c2c8afd5c37141524a..be331daabaada9df03d29876b6d4ddf260d6011f 100644 |
--- a/Source/bindings/templates/interface_base.cpp |
+++ b/Source/bindings/templates/interface_base.cpp |
@@ -469,6 +469,13 @@ static void install{{v8_class}}Template(v8::Local<v8::FunctionTemplate> function |
functionTemplate->SetHiddenPrototype(true); |
{% endif %} |
+ {# Willful violation of WebIDL 4.5.4 and 4.7 - implement the class string |
+ for interfaces via @@toStringTag on the prototype. WebIDL requires |
+ @@toStringTag instances and prototype (with 'Prototype' appended) but |
+ this has performance concerns and may not be necessary for web compat. |
+ https://www.w3.org/Bugs/Public/show_bug.cgi?id=28244 #} |
+ prototypeTemplate->Set(v8::Symbol::GetToStringTag(isolate), v8AtomicString(isolate, "{{interface_name}}")); |
+ |
// Custom toString template |
functionTemplate->Set(v8AtomicString(isolate, "toString"), V8PerIsolateData::from(isolate)->toStringTemplate()); |
{% endif %} |