Chromium Code Reviews| Index: Source/bindings/templates/interface_base.cpp |
| diff --git a/Source/bindings/templates/interface_base.cpp b/Source/bindings/templates/interface_base.cpp |
| index b622ef728e2f2bc503806c1e4012291fa8886220..e73c08c33442ac75e9506be1a614223ae606737a 100644 |
| --- a/Source/bindings/templates/interface_base.cpp |
| +++ b/Source/bindings/templates/interface_base.cpp |
| @@ -468,6 +468,18 @@ static void install{{v8_class}}Template(v8::Local<v8::FunctionTemplate> function |
| functionTemplate->SetHiddenPrototype(true); |
| {% endif %} |
| + {# WebIDL 4.7: |
| + The class string of a platform object that implements |
| + one or more interfaces must be the identifier of the |
| + primary interface of the platform object. #} |
| + instanceTemplate->Set(v8::Symbol::GetToStringTag(isolate), v8AtomicString(isolate, "{{interface_name}}")); |
|
haraken
2015/03/19 23:30:56
Just to confirm: What is the interface_name of Web
|
| + |
| + {# WebIDL 4.5.4: |
| + The class string of an interface prototype object is the |
| + concatenation of the interface’s identifier and the string |
| + "Prototype". #} |
| + prototypeTemplate->Set(v8::Symbol::GetToStringTag(isolate), v8AtomicString(isolate, "{{interface_name}}Prototype")); |
| + |
| // Custom toString template |
| functionTemplate->Set(v8AtomicString(isolate, "toString"), V8PerIsolateData::from(isolate)->toStringTemplate()); |
| {% endif %} |