Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(148)

Unified Diff: Source/bindings/templates/interface_base.cpp

Issue 1017733003: [DO NOT LAND] Set @@toStringTag for DOM object prototypes (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: More test rebaselines Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/bindings/templates/interface.cpp ('k') | Source/bindings/tests/results/core/V8SVGTestInterface.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 %}
« no previous file with comments | « Source/bindings/templates/interface.cpp ('k') | Source/bindings/tests/results/core/V8SVGTestInterface.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698