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 "V8TestInterfaceEventInitConstructor.h" | 8 #include "V8TestInterfaceEventInitConstructor.h" |
9 | 9 |
10 #include "bindings/core/v8/ExceptionState.h" | 10 #include "bindings/core/v8/ExceptionState.h" |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 v8SetReturnValueString(info, impl->readonlyStringAttribute(), info.GetIsolat
e()); | 46 v8SetReturnValueString(info, impl->readonlyStringAttribute(), info.GetIsolat
e()); |
47 } | 47 } |
48 | 48 |
49 static void readonlyStringAttributeAttributeGetterCallback(const v8::FunctionCal
lbackInfo<v8::Value>& info) | 49 static void readonlyStringAttributeAttributeGetterCallback(const v8::FunctionCal
lbackInfo<v8::Value>& info) |
50 { | 50 { |
51 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 51 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
52 TestInterfaceEventInitConstructorV8Internal::readonlyStringAttributeAttribut
eGetter(info); | 52 TestInterfaceEventInitConstructorV8Internal::readonlyStringAttributeAttribut
eGetter(info); |
53 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 53 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
54 } | 54 } |
55 | 55 |
| 56 static void isTrustedAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>&
info) |
| 57 { |
| 58 v8::Local<v8::Object> holder = info.Holder(); |
| 59 TestInterfaceEventInitConstructor* impl = V8TestInterfaceEventInitConstructo
r::toImpl(holder); |
| 60 v8SetReturnValueBool(info, impl->isTrusted()); |
| 61 } |
| 62 |
| 63 static void isTrustedAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::
Value>& info) |
| 64 { |
| 65 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 66 TestInterfaceEventInitConstructorV8Internal::isTrustedAttributeGetter(info); |
| 67 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 68 } |
| 69 |
56 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info) | 70 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info) |
57 { | 71 { |
58 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte
rfaceEventInitConstructor", info.Holder(), info.GetIsolate()); | 72 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte
rfaceEventInitConstructor", info.Holder(), info.GetIsolate()); |
59 if (UNLIKELY(info.Length() < 2)) { | 73 if (UNLIKELY(info.Length() < 2)) { |
60 setMinimumArityTypeError(exceptionState, 2, info.Length()); | 74 setMinimumArityTypeError(exceptionState, 2, info.Length()); |
61 exceptionState.throwIfNeeded(); | 75 exceptionState.throwIfNeeded(); |
62 return; | 76 return; |
63 } | 77 } |
64 V8StringResource<> type; | 78 V8StringResource<> type; |
65 TestInterfaceEventInit testInterfaceEventInit; | 79 TestInterfaceEventInit testInterfaceEventInit; |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(isolate, func
tionTemplate, "TestInterfaceEventInitConstructor", V8Event::domTemplate(isolate)
, V8TestInterfaceEventInitConstructor::internalFieldCount, | 126 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(isolate, func
tionTemplate, "TestInterfaceEventInitConstructor", V8Event::domTemplate(isolate)
, V8TestInterfaceEventInitConstructor::internalFieldCount, |
113 0, 0, | 127 0, 0, |
114 V8TestInterfaceEventInitConstructorAccessors, WTF_ARRAY_LENGTH(V8TestInt
erfaceEventInitConstructorAccessors), | 128 V8TestInterfaceEventInitConstructorAccessors, WTF_ARRAY_LENGTH(V8TestInt
erfaceEventInitConstructorAccessors), |
115 0, 0); | 129 0, 0); |
116 functionTemplate->SetCallHandler(V8TestInterfaceEventInitConstructor::constr
uctorCallback); | 130 functionTemplate->SetCallHandler(V8TestInterfaceEventInitConstructor::constr
uctorCallback); |
117 functionTemplate->SetLength(2); | 131 functionTemplate->SetLength(2); |
118 v8::Local<v8::ObjectTemplate> instanceTemplate = functionTemplate->InstanceT
emplate(); | 132 v8::Local<v8::ObjectTemplate> instanceTemplate = functionTemplate->InstanceT
emplate(); |
119 ALLOW_UNUSED_LOCAL(instanceTemplate); | 133 ALLOW_UNUSED_LOCAL(instanceTemplate); |
120 v8::Local<v8::ObjectTemplate> prototypeTemplate = functionTemplate->Prototyp
eTemplate(); | 134 v8::Local<v8::ObjectTemplate> prototypeTemplate = functionTemplate->Prototyp
eTemplate(); |
121 ALLOW_UNUSED_LOCAL(prototypeTemplate); | 135 ALLOW_UNUSED_LOCAL(prototypeTemplate); |
| 136 if (RuntimeEnabledFeatures::trustedEventsEnabled()) { |
| 137 static const V8DOMConfiguration::AccessorConfiguration accessorConfigura
tion = \ |
| 138 {"isTrusted", TestInterfaceEventInitConstructorV8Internal::isTrustedAttr
ibuteGetterCallback, 0, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>
(v8::DontDelete), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::O
nInstance, V8DOMConfiguration::CheckHolder}; |
| 139 V8DOMConfiguration::installAccessor(isolate, instanceTemplate, prototype
Template, functionTemplate, defaultSignature, accessorConfiguration); |
| 140 } |
122 | 141 |
123 // Custom toString template | 142 // Custom toString template |
124 functionTemplate->Set(v8AtomicString(isolate, "toString"), V8PerIsolateData:
:from(isolate)->toStringTemplate()); | 143 functionTemplate->Set(v8AtomicString(isolate, "toString"), V8PerIsolateData:
:from(isolate)->toStringTemplate()); |
125 } | 144 } |
126 | 145 |
127 v8::Local<v8::FunctionTemplate> V8TestInterfaceEventInitConstructor::domTemplate
(v8::Isolate* isolate) | 146 v8::Local<v8::FunctionTemplate> V8TestInterfaceEventInitConstructor::domTemplate
(v8::Isolate* isolate) |
128 { | 147 { |
129 return V8DOMConfiguration::domClassTemplate(isolate, const_cast<WrapperTypeI
nfo*>(&wrapperTypeInfo), installV8TestInterfaceEventInitConstructorTemplate); | 148 return V8DOMConfiguration::domClassTemplate(isolate, const_cast<WrapperTypeI
nfo*>(&wrapperTypeInfo), installV8TestInterfaceEventInitConstructorTemplate); |
130 } | 149 } |
131 | 150 |
(...skipping 20 matching lines...) Expand all Loading... |
152 } | 171 } |
153 | 172 |
154 void V8TestInterfaceEventInitConstructor::derefObject(ScriptWrappable* scriptWra
ppable) | 173 void V8TestInterfaceEventInitConstructor::derefObject(ScriptWrappable* scriptWra
ppable) |
155 { | 174 { |
156 #if !ENABLE(OILPAN) | 175 #if !ENABLE(OILPAN) |
157 scriptWrappable->toImpl<TestInterfaceEventInitConstructor>()->deref(); | 176 scriptWrappable->toImpl<TestInterfaceEventInitConstructor>()->deref(); |
158 #endif | 177 #endif |
159 } | 178 } |
160 | 179 |
161 } // namespace blink | 180 } // namespace blink |
OLD | NEW |