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