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 "V8TestException.h" | 8 #include "V8TestException.h" |
9 | 9 |
10 #include "bindings/core/v8/ExceptionState.h" | 10 #include "bindings/core/v8/ExceptionState.h" |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 static void toStringMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& in
fo) | 79 static void toStringMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& in
fo) |
80 { | 80 { |
81 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 81 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
82 TestExceptionV8Internal::toStringMethod(info); | 82 TestExceptionV8Internal::toStringMethod(info); |
83 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 83 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
84 } | 84 } |
85 | 85 |
86 } // namespace TestExceptionV8Internal | 86 } // namespace TestExceptionV8Internal |
87 | 87 |
88 static const V8DOMConfiguration::AttributeConfiguration V8TestExceptionAttribute
s[] = { | 88 static const V8DOMConfiguration::AttributeConfiguration V8TestExceptionAttribute
s[] = { |
89 {"readonlyUnsignedShortAttribute", TestExceptionV8Internal::readonlyUnsigned
ShortAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl
>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance *
/}, | 89 {"readonlyUnsignedShortAttribute", TestExceptionV8Internal::readonlyUnsigned
ShortAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl
>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration
::ExposedToAllScripts, 0 /* on instance */}, |
90 {"readonlyStringAttribute", TestExceptionV8Internal::readonlyStringAttribute
AttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT)
, static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, | 90 {"readonlyStringAttribute", TestExceptionV8Internal::readonlyStringAttribute
AttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT)
, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAll
Scripts, 0 /* on instance */}, |
91 }; | 91 }; |
92 | 92 |
93 static void installV8TestExceptionTemplate(v8::Handle<v8::FunctionTemplate> func
tionTemplate, v8::Isolate* isolate) | 93 static void installV8TestExceptionTemplate(v8::Handle<v8::FunctionTemplate> func
tionTemplate, v8::Isolate* isolate) |
94 { | 94 { |
95 functionTemplate->ReadOnlyPrototype(); | 95 functionTemplate->ReadOnlyPrototype(); |
96 | 96 |
97 v8::Local<v8::Signature> defaultSignature; | 97 v8::Local<v8::Signature> defaultSignature; |
98 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(functionTempl
ate, "TestException", v8::Local<v8::FunctionTemplate>(), V8TestException::intern
alFieldCount, | 98 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(functionTempl
ate, "TestException", v8::Local<v8::FunctionTemplate>(), V8TestException::intern
alFieldCount, |
99 V8TestExceptionAttributes, WTF_ARRAY_LENGTH(V8TestExceptionAttributes), | 99 V8TestExceptionAttributes, WTF_ARRAY_LENGTH(V8TestExceptionAttributes), |
100 0, 0, | 100 0, 0, |
101 0, 0, | 101 0, 0, |
102 isolate); | 102 isolate); |
103 v8::Local<v8::ObjectTemplate> instanceTemplate ALLOW_UNUSED = functionTempla
te->InstanceTemplate(); | 103 v8::Local<v8::ObjectTemplate> instanceTemplate ALLOW_UNUSED = functionTempla
te->InstanceTemplate(); |
104 v8::Local<v8::ObjectTemplate> prototypeTemplate ALLOW_UNUSED = functionTempl
ate->PrototypeTemplate(); | 104 v8::Local<v8::ObjectTemplate> prototypeTemplate ALLOW_UNUSED = functionTempl
ate->PrototypeTemplate(); |
105 static const V8DOMConfiguration::ConstantConfiguration V8TestExceptionConsta
nts[] = { | 105 static const V8DOMConfiguration::ConstantConfiguration V8TestExceptionConsta
nts[] = { |
106 {"UNSIGNED_SHORT_CONSTANT", 1, 0, 0, V8DOMConfiguration::ConstantTypeUns
ignedShort}, | 106 {"UNSIGNED_SHORT_CONSTANT", 1, 0, 0, V8DOMConfiguration::ConstantTypeUns
ignedShort}, |
107 }; | 107 }; |
108 V8DOMConfiguration::installConstants(functionTemplate, prototypeTemplate, V8
TestExceptionConstants, WTF_ARRAY_LENGTH(V8TestExceptionConstants), isolate); | 108 V8DOMConfiguration::installConstants(functionTemplate, prototypeTemplate, V8
TestExceptionConstants, WTF_ARRAY_LENGTH(V8TestExceptionConstants), isolate); |
109 static const V8DOMConfiguration::MethodConfiguration toStringMethodConfigura
tion = { | 109 static const V8DOMConfiguration::MethodConfiguration toStringMethodConfigura
tion = { |
110 "toString", TestExceptionV8Internal::toStringMethodCallback, 0, 0 | 110 "toString", TestExceptionV8Internal::toStringMethodCallback, 0, 0, V8DOM
Configuration::ExposedToAllScripts, |
111 }; | 111 }; |
112 V8DOMConfiguration::installMethodCustomSignature(prototypeTemplate, defaultS
ignature, static_cast<v8::PropertyAttribute>(v8::DontDelete | v8::DontEnum), toS
tringMethodConfiguration, isolate); | 112 V8DOMConfiguration::installMethodCustomSignature(prototypeTemplate, defaultS
ignature, static_cast<v8::PropertyAttribute>(v8::DontDelete | v8::DontEnum), toS
tringMethodConfiguration, isolate); |
113 | 113 |
114 // Custom toString template | 114 // Custom toString template |
115 functionTemplate->Set(v8AtomicString(isolate, "toString"), V8PerIsolateData:
:from(isolate)->toStringTemplate()); | 115 functionTemplate->Set(v8AtomicString(isolate, "toString"), V8PerIsolateData:
:from(isolate)->toStringTemplate()); |
116 } | 116 } |
117 | 117 |
118 v8::Handle<v8::FunctionTemplate> V8TestException::domTemplate(v8::Isolate* isola
te) | 118 v8::Handle<v8::FunctionTemplate> V8TestException::domTemplate(v8::Isolate* isola
te) |
119 { | 119 { |
120 return V8DOMConfiguration::domClassTemplate(isolate, const_cast<WrapperTypeI
nfo*>(&wrapperTypeInfo), installV8TestExceptionTemplate); | 120 return V8DOMConfiguration::domClassTemplate(isolate, const_cast<WrapperTypeI
nfo*>(&wrapperTypeInfo), installV8TestExceptionTemplate); |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 fromInternalPointer(object)->deref(); | 167 fromInternalPointer(object)->deref(); |
168 } | 168 } |
169 | 169 |
170 template<> | 170 template<> |
171 v8::Handle<v8::Value> toV8NoInline(TestException* impl, v8::Handle<v8::Object> c
reationContext, v8::Isolate* isolate) | 171 v8::Handle<v8::Value> toV8NoInline(TestException* impl, v8::Handle<v8::Object> c
reationContext, v8::Isolate* isolate) |
172 { | 172 { |
173 return toV8(impl, creationContext, isolate); | 173 return toV8(impl, creationContext, isolate); |
174 } | 174 } |
175 | 175 |
176 } // namespace blink | 176 } // namespace blink |
OLD | NEW |