| OLD | NEW |
| 1 /* | 1 /* |
| 2 This file is part of the Blink open source project. | 2 This file is part of the Blink open source project. |
| 3 This file has been auto-generated by CodeGeneratorV8.pm. DO NOT MODIFY! | 3 This file has been auto-generated by CodeGeneratorV8.pm. DO NOT MODIFY! |
| 4 | 4 |
| 5 This library is free software; you can redistribute it and/or | 5 This library is free software; you can redistribute it and/or |
| 6 modify it under the terms of the GNU Library General Public | 6 modify it under the terms of the GNU Library General Public |
| 7 License as published by the Free Software Foundation; either | 7 License as published by the Free Software Foundation; either |
| 8 version 2 of the License, or (at your option) any later version. | 8 version 2 of the License, or (at your option) any later version. |
| 9 | 9 |
| 10 This library is distributed in the hope that it will be useful, | 10 This library is distributed in the hope that it will be useful, |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 v8SetReturnValueString(info, imp->attr2(), info.GetIsolate()); | 81 v8SetReturnValueString(info, imp->attr2(), info.GetIsolate()); |
| 82 } | 82 } |
| 83 | 83 |
| 84 static void attr2AttributeGetterCallback(v8::Local<v8::String> name, const v8::P
ropertyCallbackInfo<v8::Value>& info) | 84 static void attr2AttributeGetterCallback(v8::Local<v8::String> name, const v8::P
ropertyCallbackInfo<v8::Value>& info) |
| 85 { | 85 { |
| 86 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 86 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 87 TestEventConstructorV8Internal::attr2AttributeGetter(name, info); | 87 TestEventConstructorV8Internal::attr2AttributeGetter(name, info); |
| 88 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 88 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 89 } | 89 } |
| 90 | 90 |
| 91 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& args) | 91 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 92 { | 92 { |
| 93 if (args.Length() < 1) { | 93 if (info.Length() < 1) { |
| 94 throwTypeError(ExceptionMessages::failedToConstruct("TestEventConstructo
r", "An event name must be provided."), args.GetIsolate()); | 94 throwTypeError(ExceptionMessages::failedToConstruct("TestEventConstructo
r", "An event name must be provided."), info.GetIsolate()); |
| 95 return; | 95 return; |
| 96 } | 96 } |
| 97 | 97 |
| 98 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, type, args[0]); | 98 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, type, info[0]); |
| 99 TestEventConstructorInit eventInit; | 99 TestEventConstructorInit eventInit; |
| 100 if (args.Length() >= 2) { | 100 if (info.Length() >= 2) { |
| 101 V8TRYCATCH_VOID(Dictionary, options, Dictionary(args[1], args.GetIsolate
())); | 101 V8TRYCATCH_VOID(Dictionary, options, Dictionary(info[1], info.GetIsolate
())); |
| 102 if (!fillTestEventConstructorInit(eventInit, options)) | 102 if (!fillTestEventConstructorInit(eventInit, options)) |
| 103 return; | 103 return; |
| 104 } | 104 } |
| 105 | 105 |
| 106 RefPtr<TestEventConstructor> event = TestEventConstructor::create(type, even
tInit); | 106 RefPtr<TestEventConstructor> event = TestEventConstructor::create(type, even
tInit); |
| 107 v8::Handle<v8::Object> wrapper = args.Holder(); | 107 v8::Handle<v8::Object> wrapper = info.Holder(); |
| 108 V8DOMWrapper::associateObjectWithWrapper<V8TestEventConstructor>(event.relea
se(), &V8TestEventConstructor::wrapperTypeInfo, wrapper, args.GetIsolate(), Wrap
perConfiguration::Dependent); | 108 V8DOMWrapper::associateObjectWithWrapper<V8TestEventConstructor>(event.relea
se(), &V8TestEventConstructor::wrapperTypeInfo, wrapper, info.GetIsolate(), Wrap
perConfiguration::Dependent); |
| 109 v8SetReturnValue(args, wrapper); | 109 v8SetReturnValue(info, wrapper); |
| 110 } | 110 } |
| 111 } // namespace TestEventConstructorV8Internal | 111 } // namespace TestEventConstructorV8Internal |
| 112 | 112 |
| 113 static const V8DOMConfiguration::AttributeConfiguration V8TestEventConstructorAt
tributes[] = { | 113 static const V8DOMConfiguration::AttributeConfiguration V8TestEventConstructorAt
tributes[] = { |
| 114 {"attr1", TestEventConstructorV8Internal::attr1AttributeGetterCallback, 0, 0
, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAtt
ribute>(v8::None), 0 /* on instance */}, | 114 {"attr1", TestEventConstructorV8Internal::attr1AttributeGetterCallback, 0, 0
, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAtt
ribute>(v8::None), 0 /* on instance */}, |
| 115 {"attr2", TestEventConstructorV8Internal::attr2AttributeGetterCallback, 0, 0
, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAtt
ribute>(v8::None), 0 /* on instance */}, | 115 {"attr2", TestEventConstructorV8Internal::attr2AttributeGetterCallback, 0, 0
, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAtt
ribute>(v8::None), 0 /* on instance */}, |
| 116 }; | 116 }; |
| 117 | 117 |
| 118 bool fillTestEventConstructorInit(TestEventConstructorInit& eventInit, const Dic
tionary& options) | 118 bool fillTestEventConstructorInit(TestEventConstructorInit& eventInit, const Dic
tionary& options) |
| 119 { | 119 { |
| 120 options.get("attr2", eventInit.attr2); | 120 options.get("attr2", eventInit.attr2); |
| 121 return true; | 121 return true; |
| 122 } | 122 } |
| 123 | 123 |
| 124 void V8TestEventConstructor::constructorCallback(const v8::FunctionCallbackInfo<
v8::Value>& args) | 124 void V8TestEventConstructor::constructorCallback(const v8::FunctionCallbackInfo<
v8::Value>& info) |
| 125 { | 125 { |
| 126 TRACE_EVENT_SCOPED_SAMPLING_STATE("Blink", "DOMConstructor"); | 126 TRACE_EVENT_SCOPED_SAMPLING_STATE("Blink", "DOMConstructor"); |
| 127 if (!args.IsConstructCall()) { | 127 if (!info.IsConstructCall()) { |
| 128 throwTypeError(ExceptionMessages::failedToConstruct("TestEventConstructo
r", "Please use the 'new' operator, this DOM object constructor cannot be called
as a function."), args.GetIsolate()); | 128 throwTypeError(ExceptionMessages::failedToConstruct("TestEventConstructo
r", "Please use the 'new' operator, this DOM object constructor cannot be called
as a function."), info.GetIsolate()); |
| 129 return; | 129 return; |
| 130 } | 130 } |
| 131 | 131 |
| 132 if (ConstructorMode::current() == ConstructorMode::WrapExistingObject) { | 132 if (ConstructorMode::current() == ConstructorMode::WrapExistingObject) { |
| 133 args.GetReturnValue().Set(args.Holder()); | 133 info.GetReturnValue().Set(info.Holder()); |
| 134 return; | 134 return; |
| 135 } | 135 } |
| 136 | 136 |
| 137 TestEventConstructorV8Internal::constructor(args); | 137 TestEventConstructorV8Internal::constructor(info); |
| 138 } | 138 } |
| 139 | 139 |
| 140 static v8::Handle<v8::FunctionTemplate> ConfigureV8TestEventConstructorTemplate(
v8::Handle<v8::FunctionTemplate> desc, v8::Isolate* isolate, WrapperWorldType cu
rrentWorldType) | 140 static v8::Handle<v8::FunctionTemplate> ConfigureV8TestEventConstructorTemplate(
v8::Handle<v8::FunctionTemplate> desc, v8::Isolate* isolate, WrapperWorldType cu
rrentWorldType) |
| 141 { | 141 { |
| 142 desc->ReadOnlyPrototype(); | 142 desc->ReadOnlyPrototype(); |
| 143 | 143 |
| 144 v8::Local<v8::Signature> defaultSignature; | 144 v8::Local<v8::Signature> defaultSignature; |
| 145 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(desc, "TestEv
entConstructor", v8::Local<v8::FunctionTemplate>(), V8TestEventConstructor::inte
rnalFieldCount, | 145 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(desc, "TestEv
entConstructor", v8::Local<v8::FunctionTemplate>(), V8TestEventConstructor::inte
rnalFieldCount, |
| 146 V8TestEventConstructorAttributes, WTF_ARRAY_LENGTH(V8TestEventConstructo
rAttributes), | 146 V8TestEventConstructorAttributes, WTF_ARRAY_LENGTH(V8TestEventConstructo
rAttributes), |
| 147 0, 0, | 147 0, 0, |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 201 V8DOMWrapper::associateObjectWithWrapper<V8TestEventConstructor>(impl, &wrap
perTypeInfo, wrapper, isolate, WrapperConfiguration::Independent); | 201 V8DOMWrapper::associateObjectWithWrapper<V8TestEventConstructor>(impl, &wrap
perTypeInfo, wrapper, isolate, WrapperConfiguration::Independent); |
| 202 return wrapper; | 202 return wrapper; |
| 203 } | 203 } |
| 204 | 204 |
| 205 void V8TestEventConstructor::derefObject(void* object) | 205 void V8TestEventConstructor::derefObject(void* object) |
| 206 { | 206 { |
| 207 fromInternalPointer(object)->deref(); | 207 fromInternalPointer(object)->deref(); |
| 208 } | 208 } |
| 209 | 209 |
| 210 } // namespace WebCore | 210 } // namespace WebCore |
| OLD | NEW |