| 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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 } | 85 } |
| 86 | 86 |
| 87 static void keyLocationAttributeGetterCallback(v8::Local<v8::String> name, const
v8::PropertyCallbackInfo<v8::Value>& info) | 87 static void keyLocationAttributeGetterCallback(v8::Local<v8::String> name, const
v8::PropertyCallbackInfo<v8::Value>& info) |
| 88 { | 88 { |
| 89 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); | 89 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 90 UseCounter::countDeprecation(activeExecutionContext(), UseCounter::KeyboardE
ventKeyLocation); | 90 UseCounter::countDeprecation(activeExecutionContext(), UseCounter::KeyboardE
ventKeyLocation); |
| 91 EventV8Internal::keyLocationAttributeGetter(name, info); | 91 EventV8Internal::keyLocationAttributeGetter(name, info); |
| 92 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 92 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 93 } | 93 } |
| 94 | 94 |
| 95 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& args) | 95 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 96 { | 96 { |
| 97 if (args.Length() < 1) { | 97 if (info.Length() < 1) { |
| 98 throwTypeError(ExceptionMessages::failedToConstruct("TestExtendedEvent",
"An event name must be provided."), args.GetIsolate()); | 98 throwTypeError(ExceptionMessages::failedToConstruct("TestExtendedEvent",
"An event name must be provided."), info.GetIsolate()); |
| 99 return; | 99 return; |
| 100 } | 100 } |
| 101 | 101 |
| 102 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, type, args[0]); | 102 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, type, info[0]); |
| 103 EventInit eventInit; | 103 EventInit eventInit; |
| 104 if (args.Length() >= 2) { | 104 if (info.Length() >= 2) { |
| 105 V8TRYCATCH_VOID(Dictionary, options, Dictionary(args[1], args.GetIsolate
())); | 105 V8TRYCATCH_VOID(Dictionary, options, Dictionary(info[1], info.GetIsolate
())); |
| 106 if (!fillEventInit(eventInit, options)) | 106 if (!fillEventInit(eventInit, options)) |
| 107 return; | 107 return; |
| 108 } | 108 } |
| 109 | 109 |
| 110 RefPtr<Event> event = Event::create(type, eventInit); | 110 RefPtr<Event> event = Event::create(type, eventInit); |
| 111 v8::Handle<v8::Object> wrapper = args.Holder(); | 111 v8::Handle<v8::Object> wrapper = info.Holder(); |
| 112 V8DOMWrapper::associateObjectWithWrapper<V8TestExtendedEvent>(event.release(
), &V8TestExtendedEvent::wrapperTypeInfo, wrapper, args.GetIsolate(), WrapperCon
figuration::Dependent); | 112 V8DOMWrapper::associateObjectWithWrapper<V8TestExtendedEvent>(event.release(
), &V8TestExtendedEvent::wrapperTypeInfo, wrapper, info.GetIsolate(), WrapperCon
figuration::Dependent); |
| 113 v8SetReturnValue(args, wrapper); | 113 v8SetReturnValue(info, wrapper); |
| 114 } | 114 } |
| 115 } // namespace EventV8Internal | 115 } // namespace EventV8Internal |
| 116 | 116 |
| 117 static const V8DOMConfiguration::AttributeConfiguration V8TestExtendedEventAttri
butes[] = { | 117 static const V8DOMConfiguration::AttributeConfiguration V8TestExtendedEventAttri
butes[] = { |
| 118 {"location", EventV8Internal::locationAttributeGetterCallback, 0, 0, 0, 0, s
tatic_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v
8::None), 0 /* on instance */}, | 118 {"location", EventV8Internal::locationAttributeGetterCallback, 0, 0, 0, 0, s
tatic_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v
8::None), 0 /* on instance */}, |
| 119 {"keyLocation", EventV8Internal::keyLocationAttributeGetterCallback, 0, 0, 0
, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttrib
ute>(v8::None), 0 /* on instance */}, | 119 {"keyLocation", EventV8Internal::keyLocationAttributeGetterCallback, 0, 0, 0
, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttrib
ute>(v8::None), 0 /* on instance */}, |
| 120 }; | 120 }; |
| 121 | 121 |
| 122 bool fillEventInit(EventInit& eventInit, const Dictionary& options) | 122 bool fillEventInit(EventInit& eventInit, const Dictionary& options) |
| 123 { | 123 { |
| 124 if (!fillTestEventInit(eventInit, options)) | 124 if (!fillTestEventInit(eventInit, options)) |
| 125 return false; | 125 return false; |
| 126 | 126 |
| 127 options.get("location", eventInit.location); | 127 options.get("location", eventInit.location); |
| 128 if (options.get("keyLocation", eventInit.location)) | 128 if (options.get("keyLocation", eventInit.location)) |
| 129 UseCounter::countDeprecation(activeExecutionContext(), UseCounter::Keybo
ardEventKeyLocation); | 129 UseCounter::countDeprecation(activeExecutionContext(), UseCounter::Keybo
ardEventKeyLocation); |
| 130 return true; | 130 return true; |
| 131 } | 131 } |
| 132 | 132 |
| 133 void V8TestExtendedEvent::constructorCallback(const v8::FunctionCallbackInfo<v8:
:Value>& args) | 133 void V8TestExtendedEvent::constructorCallback(const v8::FunctionCallbackInfo<v8:
:Value>& info) |
| 134 { | 134 { |
| 135 TRACE_EVENT_SCOPED_SAMPLING_STATE("Blink", "DOMConstructor"); | 135 TRACE_EVENT_SCOPED_SAMPLING_STATE("Blink", "DOMConstructor"); |
| 136 if (!args.IsConstructCall()) { | 136 if (!info.IsConstructCall()) { |
| 137 throwTypeError(ExceptionMessages::failedToConstruct("TestExtendedEvent",
"Please use the 'new' operator, this DOM object constructor cannot be called as
a function."), args.GetIsolate()); | 137 throwTypeError(ExceptionMessages::failedToConstruct("TestExtendedEvent",
"Please use the 'new' operator, this DOM object constructor cannot be called as
a function."), info.GetIsolate()); |
| 138 return; | 138 return; |
| 139 } | 139 } |
| 140 | 140 |
| 141 if (ConstructorMode::current() == ConstructorMode::WrapExistingObject) { | 141 if (ConstructorMode::current() == ConstructorMode::WrapExistingObject) { |
| 142 args.GetReturnValue().Set(args.Holder()); | 142 info.GetReturnValue().Set(info.Holder()); |
| 143 return; | 143 return; |
| 144 } | 144 } |
| 145 | 145 |
| 146 EventV8Internal::constructor(args); | 146 EventV8Internal::constructor(info); |
| 147 } | 147 } |
| 148 | 148 |
| 149 static v8::Handle<v8::FunctionTemplate> ConfigureV8TestExtendedEventTemplate(v8:
:Handle<v8::FunctionTemplate> desc, v8::Isolate* isolate, WrapperWorldType curre
ntWorldType) | 149 static v8::Handle<v8::FunctionTemplate> ConfigureV8TestExtendedEventTemplate(v8:
:Handle<v8::FunctionTemplate> desc, v8::Isolate* isolate, WrapperWorldType curre
ntWorldType) |
| 150 { | 150 { |
| 151 desc->ReadOnlyPrototype(); | 151 desc->ReadOnlyPrototype(); |
| 152 | 152 |
| 153 v8::Local<v8::Signature> defaultSignature; | 153 v8::Local<v8::Signature> defaultSignature; |
| 154 if (!RuntimeEnabledFeatures::testEnabled()) | 154 if (!RuntimeEnabledFeatures::testEnabled()) |
| 155 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(desc, "",
V8TestEvent::GetTemplate(isolate, currentWorldType), V8TestExtendedEvent::inter
nalFieldCount, 0, 0, 0, 0, isolate, currentWorldType); | 155 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(desc, "",
V8TestEvent::GetTemplate(isolate, currentWorldType), V8TestExtendedEvent::inter
nalFieldCount, 0, 0, 0, 0, isolate, currentWorldType); |
| 156 else | 156 else |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 215 } | 215 } |
| 216 | 216 |
| 217 void V8TestExtendedEvent::derefObject(void* object) | 217 void V8TestExtendedEvent::derefObject(void* object) |
| 218 { | 218 { |
| 219 fromInternalPointer(object)->deref(); | 219 fromInternalPointer(object)->deref(); |
| 220 } | 220 } |
| 221 | 221 |
| 222 } // namespace WebCore | 222 } // namespace WebCore |
| 223 | 223 |
| 224 #endif // ENABLE(TEST) | 224 #endif // ENABLE(TEST) |
| OLD | NEW |