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

Side by Side Diff: Source/bindings/tests/results/core/V8TestInterfaceNamedConstructor.cpp

Issue 1017733003: [DO NOT LAND] Set @@toStringTag for DOM object prototypes (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Test expectations Created 5 years, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY! 5 // This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY!
6 6
7 #include "config.h" 7 #include "config.h"
8 #include "V8TestInterfaceNamedConstructor.h" 8 #include "V8TestInterfaceNamedConstructor.h"
9 9
10 #include "bindings/core/v8/ExceptionState.h" 10 #include "bindings/core/v8/ExceptionState.h"
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 static int domTemplateKey; // This address is used for a key to look up the dom template. 149 static int domTemplateKey; // This address is used for a key to look up the dom template.
150 V8PerIsolateData* data = V8PerIsolateData::from(isolate); 150 V8PerIsolateData* data = V8PerIsolateData::from(isolate);
151 v8::Local<v8::FunctionTemplate> result = data->existingDOMTemplate(&domTempl ateKey); 151 v8::Local<v8::FunctionTemplate> result = data->existingDOMTemplate(&domTempl ateKey);
152 if (!result.IsEmpty()) 152 if (!result.IsEmpty())
153 return result; 153 return result;
154 154
155 TRACE_EVENT_SCOPED_SAMPLING_STATE("blink", "BuildDOMTemplate"); 155 TRACE_EVENT_SCOPED_SAMPLING_STATE("blink", "BuildDOMTemplate");
156 result = v8::FunctionTemplate::New(isolate, V8TestInterfaceNamedConstructorC onstructorCallback); 156 result = v8::FunctionTemplate::New(isolate, V8TestInterfaceNamedConstructorC onstructorCallback);
157 v8::Local<v8::ObjectTemplate> instanceTemplate = result->InstanceTemplate(); 157 v8::Local<v8::ObjectTemplate> instanceTemplate = result->InstanceTemplate();
158 instanceTemplate->SetInternalFieldCount(V8TestInterfaceNamedConstructor::int ernalFieldCount); 158 instanceTemplate->SetInternalFieldCount(V8TestInterfaceNamedConstructor::int ernalFieldCount);
159 result->SetClassName(v8AtomicString(isolate, "TestInterfaceNamedConstructor" ));
160 result->Inherit(V8TestInterfaceNamedConstructor::domTemplate(isolate)); 159 result->Inherit(V8TestInterfaceNamedConstructor::domTemplate(isolate));
161 data->setDOMTemplate(&domTemplateKey, result); 160 data->setDOMTemplate(&domTemplateKey, result);
162 return result; 161 return result;
163 } 162 }
164 163
165 static void installV8TestInterfaceNamedConstructorTemplate(v8::Local<v8::Functio nTemplate> functionTemplate, v8::Isolate* isolate) 164 static void installV8TestInterfaceNamedConstructorTemplate(v8::Local<v8::Functio nTemplate> functionTemplate, v8::Isolate* isolate)
166 { 165 {
167 functionTemplate->ReadOnlyPrototype(); 166 functionTemplate->ReadOnlyPrototype();
168 167
169 v8::Local<v8::Signature> defaultSignature; 168 v8::Local<v8::Signature> defaultSignature;
170 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(isolate, func tionTemplate, "TestInterfaceNamedConstructor", v8::Local<v8::FunctionTemplate>() , V8TestInterfaceNamedConstructor::internalFieldCount, 169 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(isolate, func tionTemplate, "TestInterfaceNamedConstructor", v8::Local<v8::FunctionTemplate>() , V8TestInterfaceNamedConstructor::internalFieldCount,
171 V8TestInterfaceNamedConstructorAttributes, WTF_ARRAY_LENGTH(V8TestInterf aceNamedConstructorAttributes), 170 V8TestInterfaceNamedConstructorAttributes, WTF_ARRAY_LENGTH(V8TestInterf aceNamedConstructorAttributes),
172 0, 0, 171 0, 0,
173 0, 0); 172 0, 0);
174 v8::Local<v8::ObjectTemplate> instanceTemplate = functionTemplate->InstanceT emplate(); 173 v8::Local<v8::ObjectTemplate> instanceTemplate = functionTemplate->InstanceT emplate();
175 ALLOW_UNUSED_LOCAL(instanceTemplate); 174 ALLOW_UNUSED_LOCAL(instanceTemplate);
176 v8::Local<v8::ObjectTemplate> prototypeTemplate = functionTemplate->Prototyp eTemplate(); 175 v8::Local<v8::ObjectTemplate> prototypeTemplate = functionTemplate->Prototyp eTemplate();
177 ALLOW_UNUSED_LOCAL(prototypeTemplate); 176 ALLOW_UNUSED_LOCAL(prototypeTemplate);
178 177
178 prototypeTemplate->Set(v8::Symbol::GetToStringTag(isolate), v8AtomicString(i solate, "TestInterfaceNamedConstructor"));
179
179 // Custom toString template 180 // Custom toString template
180 functionTemplate->Set(v8AtomicString(isolate, "toString"), V8PerIsolateData: :from(isolate)->toStringTemplate()); 181 functionTemplate->Set(v8AtomicString(isolate, "toString"), V8PerIsolateData: :from(isolate)->toStringTemplate());
181 } 182 }
182 183
183 v8::Local<v8::FunctionTemplate> V8TestInterfaceNamedConstructor::domTemplate(v8: :Isolate* isolate) 184 v8::Local<v8::FunctionTemplate> V8TestInterfaceNamedConstructor::domTemplate(v8: :Isolate* isolate)
184 { 185 {
185 return V8DOMConfiguration::domClassTemplate(isolate, const_cast<WrapperTypeI nfo*>(&wrapperTypeInfo), installV8TestInterfaceNamedConstructorTemplate); 186 return V8DOMConfiguration::domClassTemplate(isolate, const_cast<WrapperTypeI nfo*>(&wrapperTypeInfo), installV8TestInterfaceNamedConstructorTemplate);
186 } 187 }
187 188
188 bool V8TestInterfaceNamedConstructor::hasInstance(v8::Local<v8::Value> v8Value, v8::Isolate* isolate) 189 bool V8TestInterfaceNamedConstructor::hasInstance(v8::Local<v8::Value> v8Value, v8::Isolate* isolate)
(...skipping 20 matching lines...) Expand all
209 { 210 {
210 scriptWrappable->toImpl<TestInterfaceNamedConstructor>()->ref(); 211 scriptWrappable->toImpl<TestInterfaceNamedConstructor>()->ref();
211 } 212 }
212 213
213 void V8TestInterfaceNamedConstructor::derefObject(ScriptWrappable* scriptWrappab le) 214 void V8TestInterfaceNamedConstructor::derefObject(ScriptWrappable* scriptWrappab le)
214 { 215 {
215 scriptWrappable->toImpl<TestInterfaceNamedConstructor>()->deref(); 216 scriptWrappable->toImpl<TestInterfaceNamedConstructor>()->deref();
216 } 217 }
217 218
218 } // namespace blink 219 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698