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

Side by Side Diff: Source/bindings/tests/results/core/V8TestInterfaceConstructor.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 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 "V8TestInterfaceConstructor.h" 8 #include "V8TestInterfaceConstructor.h"
9 9
10 #include "bindings/core/v8/Dictionary.h" 10 #include "bindings/core/v8/Dictionary.h"
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 static int domTemplateKey; // This address is used for a key to look up the dom template. 297 static int domTemplateKey; // This address is used for a key to look up the dom template.
298 V8PerIsolateData* data = V8PerIsolateData::from(isolate); 298 V8PerIsolateData* data = V8PerIsolateData::from(isolate);
299 v8::Local<v8::FunctionTemplate> result = data->existingDOMTemplate(&domTempl ateKey); 299 v8::Local<v8::FunctionTemplate> result = data->existingDOMTemplate(&domTempl ateKey);
300 if (!result.IsEmpty()) 300 if (!result.IsEmpty())
301 return result; 301 return result;
302 302
303 TRACE_EVENT_SCOPED_SAMPLING_STATE("blink", "BuildDOMTemplate"); 303 TRACE_EVENT_SCOPED_SAMPLING_STATE("blink", "BuildDOMTemplate");
304 result = v8::FunctionTemplate::New(isolate, V8TestInterfaceConstructorConstr uctorCallback); 304 result = v8::FunctionTemplate::New(isolate, V8TestInterfaceConstructorConstr uctorCallback);
305 v8::Local<v8::ObjectTemplate> instanceTemplate = result->InstanceTemplate(); 305 v8::Local<v8::ObjectTemplate> instanceTemplate = result->InstanceTemplate();
306 instanceTemplate->SetInternalFieldCount(V8TestInterfaceConstructor::internal FieldCount); 306 instanceTemplate->SetInternalFieldCount(V8TestInterfaceConstructor::internal FieldCount);
307 result->SetClassName(v8AtomicString(isolate, "TestInterfaceConstructor")); 307 instanceTemplate->Set(v8::Symbol::GetToStringTag(isolate), v8AtomicString(is olate, "TestInterfaceConstructor"));
308 result->Inherit(V8TestInterfaceConstructor::domTemplate(isolate)); 308 result->Inherit(V8TestInterfaceConstructor::domTemplate(isolate));
309 data->setDOMTemplate(&domTemplateKey, result); 309 data->setDOMTemplate(&domTemplateKey, result);
310 return result; 310 return result;
311 } 311 }
312 312
313 void V8TestInterfaceConstructor::constructorCallback(const v8::FunctionCallbackI nfo<v8::Value>& info) 313 void V8TestInterfaceConstructor::constructorCallback(const v8::FunctionCallbackI nfo<v8::Value>& info)
314 { 314 {
315 TRACE_EVENT_SCOPED_SAMPLING_STATE("blink", "DOMConstructor"); 315 TRACE_EVENT_SCOPED_SAMPLING_STATE("blink", "DOMConstructor");
316 UseCounter::countIfNotPrivateScript(info.GetIsolate(), callingExecutionConte xt(info.GetIsolate()), UseCounter::TestFeature); 316 UseCounter::countIfNotPrivateScript(info.GetIsolate(), callingExecutionConte xt(info.GetIsolate()), UseCounter::TestFeature);
317 if (!info.IsConstructCall()) { 317 if (!info.IsConstructCall()) {
(...skipping 18 matching lines...) Expand all
336 0, 0, 336 0, 0,
337 0, 0, 337 0, 0,
338 0, 0); 338 0, 0);
339 functionTemplate->SetCallHandler(V8TestInterfaceConstructor::constructorCall back); 339 functionTemplate->SetCallHandler(V8TestInterfaceConstructor::constructorCall back);
340 functionTemplate->SetLength(0); 340 functionTemplate->SetLength(0);
341 v8::Local<v8::ObjectTemplate> instanceTemplate = functionTemplate->InstanceT emplate(); 341 v8::Local<v8::ObjectTemplate> instanceTemplate = functionTemplate->InstanceT emplate();
342 ALLOW_UNUSED_LOCAL(instanceTemplate); 342 ALLOW_UNUSED_LOCAL(instanceTemplate);
343 v8::Local<v8::ObjectTemplate> prototypeTemplate = functionTemplate->Prototyp eTemplate(); 343 v8::Local<v8::ObjectTemplate> prototypeTemplate = functionTemplate->Prototyp eTemplate();
344 ALLOW_UNUSED_LOCAL(prototypeTemplate); 344 ALLOW_UNUSED_LOCAL(prototypeTemplate);
345 345
346 instanceTemplate->Set(v8::Symbol::GetToStringTag(isolate), v8AtomicString(is olate, "TestInterfaceConstructor"));
347
348 prototypeTemplate->Set(v8::Symbol::GetToStringTag(isolate), v8AtomicString(i solate, "TestInterfaceConstructorPrototype"));
349
346 // Custom toString template 350 // Custom toString template
347 functionTemplate->Set(v8AtomicString(isolate, "toString"), V8PerIsolateData: :from(isolate)->toStringTemplate()); 351 functionTemplate->Set(v8AtomicString(isolate, "toString"), V8PerIsolateData: :from(isolate)->toStringTemplate());
348 } 352 }
349 353
350 v8::Local<v8::FunctionTemplate> V8TestInterfaceConstructor::domTemplate(v8::Isol ate* isolate) 354 v8::Local<v8::FunctionTemplate> V8TestInterfaceConstructor::domTemplate(v8::Isol ate* isolate)
351 { 355 {
352 return V8DOMConfiguration::domClassTemplate(isolate, const_cast<WrapperTypeI nfo*>(&wrapperTypeInfo), installV8TestInterfaceConstructorTemplate); 356 return V8DOMConfiguration::domClassTemplate(isolate, const_cast<WrapperTypeI nfo*>(&wrapperTypeInfo), installV8TestInterfaceConstructorTemplate);
353 } 357 }
354 358
355 bool V8TestInterfaceConstructor::hasInstance(v8::Local<v8::Value> v8Value, v8::I solate* isolate) 359 bool V8TestInterfaceConstructor::hasInstance(v8::Local<v8::Value> v8Value, v8::I solate* isolate)
(...skipping 15 matching lines...) Expand all
371 { 375 {
372 scriptWrappable->toImpl<TestInterfaceConstructor>()->ref(); 376 scriptWrappable->toImpl<TestInterfaceConstructor>()->ref();
373 } 377 }
374 378
375 void V8TestInterfaceConstructor::derefObject(ScriptWrappable* scriptWrappable) 379 void V8TestInterfaceConstructor::derefObject(ScriptWrappable* scriptWrappable)
376 { 380 {
377 scriptWrappable->toImpl<TestInterfaceConstructor>()->deref(); 381 scriptWrappable->toImpl<TestInterfaceConstructor>()->deref();
378 } 382 }
379 383
380 } // namespace blink 384 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698