| 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. | 5 // This file has been auto-generated by code_generator_v8.py. |
| 6 // DO NOT MODIFY! | 6 // DO NOT MODIFY! |
| 7 | 7 |
| 8 // This file has been generated from the Jinja2 template in | 8 // This file has been generated from the Jinja2 template in |
| 9 // third_party/WebKit/Source/bindings/templates/interface.cpp.tmpl | 9 // third_party/WebKit/Source/bindings/templates/interface.cpp.tmpl |
| 10 | 10 |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); | 63 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); |
| 64 | 64 |
| 65 V8SetReturnValueFast(info, WTF::GetPtr(impl->testInterfaceAttribute()), impl); | 65 V8SetReturnValueFast(info, WTF::GetPtr(impl->testInterfaceAttribute()), impl); |
| 66 } | 66 } |
| 67 | 67 |
| 68 static void testInterfaceAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::FunctionCallbackInfo<v8::Value>& info) { | 68 static void testInterfaceAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::FunctionCallbackInfo<v8::Value>& info) { |
| 69 v8::Isolate* isolate = info.GetIsolate(); | 69 v8::Isolate* isolate = info.GetIsolate(); |
| 70 ALLOW_UNUSED_LOCAL(isolate); | 70 ALLOW_UNUSED_LOCAL(isolate); |
| 71 | 71 |
| 72 v8::Local<v8::Object> holder = info.Holder(); | 72 v8::Local<v8::Object> holder = info.Holder(); |
| 73 ALLOW_UNUSED_LOCAL(holder); |
| 74 |
| 73 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); | 75 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); |
| 74 | 76 |
| 75 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestIn
terface5", "testInterfaceAttribute"); | 77 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestIn
terface5", "testInterfaceAttribute"); |
| 76 | 78 |
| 77 // Prepare the value to be set. | 79 // Prepare the value to be set. |
| 78 TestInterface5Implementation* cppValue = V8TestInterface5::toImplWithTypeCheck
(info.GetIsolate(), v8Value); | 80 TestInterface5Implementation* cppValue = V8TestInterface5::toImplWithTypeCheck
(info.GetIsolate(), v8Value); |
| 79 | 81 |
| 80 // Type check per: http://heycam.github.io/webidl/#es-interface | 82 // Type check per: http://heycam.github.io/webidl/#es-interface |
| 81 if (!cppValue) { | 83 if (!cppValue) { |
| 82 exceptionState.ThrowTypeError("The provided value is not of type 'TestInterf
ace5'."); | 84 exceptionState.ThrowTypeError("The provided value is not of type 'TestInterf
ace5'."); |
| 83 return; | 85 return; |
| 84 } | 86 } |
| 85 | 87 |
| 86 impl->setTestInterfaceAttribute(cppValue); | 88 impl->setTestInterfaceAttribute(cppValue); |
| 87 } | 89 } |
| 88 | 90 |
| 89 static void doubleAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Va
lue>& info) { | 91 static void doubleAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Va
lue>& info) { |
| 90 v8::Local<v8::Object> holder = info.Holder(); | 92 v8::Local<v8::Object> holder = info.Holder(); |
| 91 | 93 |
| 92 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); | 94 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); |
| 93 | 95 |
| 94 V8SetReturnValue(info, impl->doubleAttribute()); | 96 V8SetReturnValue(info, impl->doubleAttribute()); |
| 95 } | 97 } |
| 96 | 98 |
| 97 static void doubleAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v
8::FunctionCallbackInfo<v8::Value>& info) { | 99 static void doubleAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v
8::FunctionCallbackInfo<v8::Value>& info) { |
| 98 v8::Isolate* isolate = info.GetIsolate(); | 100 v8::Isolate* isolate = info.GetIsolate(); |
| 99 ALLOW_UNUSED_LOCAL(isolate); | 101 ALLOW_UNUSED_LOCAL(isolate); |
| 100 | 102 |
| 101 v8::Local<v8::Object> holder = info.Holder(); | 103 v8::Local<v8::Object> holder = info.Holder(); |
| 104 ALLOW_UNUSED_LOCAL(holder); |
| 105 |
| 102 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); | 106 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); |
| 103 | 107 |
| 104 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestIn
terface5", "doubleAttribute"); | 108 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestIn
terface5", "doubleAttribute"); |
| 105 | 109 |
| 106 // Prepare the value to be set. | 110 // Prepare the value to be set. |
| 107 double cppValue = NativeValueTraits<IDLDouble>::NativeValue(info.GetIsolate(),
v8Value, exceptionState); | 111 double cppValue = NativeValueTraits<IDLDouble>::NativeValue(info.GetIsolate(),
v8Value, exceptionState); |
| 108 if (exceptionState.HadException()) | 112 if (exceptionState.HadException()) |
| 109 return; | 113 return; |
| 110 | 114 |
| 111 impl->setDoubleAttribute(cppValue); | 115 impl->setDoubleAttribute(cppValue); |
| 112 } | 116 } |
| 113 | 117 |
| 114 static void floatAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Val
ue>& info) { | 118 static void floatAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Val
ue>& info) { |
| 115 v8::Local<v8::Object> holder = info.Holder(); | 119 v8::Local<v8::Object> holder = info.Holder(); |
| 116 | 120 |
| 117 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); | 121 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); |
| 118 | 122 |
| 119 V8SetReturnValue(info, impl->floatAttribute()); | 123 V8SetReturnValue(info, impl->floatAttribute()); |
| 120 } | 124 } |
| 121 | 125 |
| 122 static void floatAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8
::FunctionCallbackInfo<v8::Value>& info) { | 126 static void floatAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8
::FunctionCallbackInfo<v8::Value>& info) { |
| 123 v8::Isolate* isolate = info.GetIsolate(); | 127 v8::Isolate* isolate = info.GetIsolate(); |
| 124 ALLOW_UNUSED_LOCAL(isolate); | 128 ALLOW_UNUSED_LOCAL(isolate); |
| 125 | 129 |
| 126 v8::Local<v8::Object> holder = info.Holder(); | 130 v8::Local<v8::Object> holder = info.Holder(); |
| 131 ALLOW_UNUSED_LOCAL(holder); |
| 132 |
| 127 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); | 133 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); |
| 128 | 134 |
| 129 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestIn
terface5", "floatAttribute"); | 135 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestIn
terface5", "floatAttribute"); |
| 130 | 136 |
| 131 // Prepare the value to be set. | 137 // Prepare the value to be set. |
| 132 float cppValue = NativeValueTraits<IDLFloat>::NativeValue(info.GetIsolate(), v
8Value, exceptionState); | 138 float cppValue = NativeValueTraits<IDLFloat>::NativeValue(info.GetIsolate(), v
8Value, exceptionState); |
| 133 if (exceptionState.HadException()) | 139 if (exceptionState.HadException()) |
| 134 return; | 140 return; |
| 135 | 141 |
| 136 impl->setFloatAttribute(cppValue); | 142 impl->setFloatAttribute(cppValue); |
| 137 } | 143 } |
| 138 | 144 |
| 139 static void unrestrictedDoubleAttributeAttributeGetter(const v8::FunctionCallbac
kInfo<v8::Value>& info) { | 145 static void unrestrictedDoubleAttributeAttributeGetter(const v8::FunctionCallbac
kInfo<v8::Value>& info) { |
| 140 v8::Local<v8::Object> holder = info.Holder(); | 146 v8::Local<v8::Object> holder = info.Holder(); |
| 141 | 147 |
| 142 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); | 148 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); |
| 143 | 149 |
| 144 V8SetReturnValue(info, impl->unrestrictedDoubleAttribute()); | 150 V8SetReturnValue(info, impl->unrestrictedDoubleAttribute()); |
| 145 } | 151 } |
| 146 | 152 |
| 147 static void unrestrictedDoubleAttributeAttributeSetter(v8::Local<v8::Value> v8Va
lue, const v8::FunctionCallbackInfo<v8::Value>& info) { | 153 static void unrestrictedDoubleAttributeAttributeSetter(v8::Local<v8::Value> v8Va
lue, const v8::FunctionCallbackInfo<v8::Value>& info) { |
| 148 v8::Isolate* isolate = info.GetIsolate(); | 154 v8::Isolate* isolate = info.GetIsolate(); |
| 149 ALLOW_UNUSED_LOCAL(isolate); | 155 ALLOW_UNUSED_LOCAL(isolate); |
| 150 | 156 |
| 151 v8::Local<v8::Object> holder = info.Holder(); | 157 v8::Local<v8::Object> holder = info.Holder(); |
| 158 ALLOW_UNUSED_LOCAL(holder); |
| 159 |
| 152 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); | 160 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); |
| 153 | 161 |
| 154 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestIn
terface5", "unrestrictedDoubleAttribute"); | 162 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestIn
terface5", "unrestrictedDoubleAttribute"); |
| 155 | 163 |
| 156 // Prepare the value to be set. | 164 // Prepare the value to be set. |
| 157 double cppValue = NativeValueTraits<IDLUnrestrictedDouble>::NativeValue(info.G
etIsolate(), v8Value, exceptionState); | 165 double cppValue = NativeValueTraits<IDLUnrestrictedDouble>::NativeValue(info.G
etIsolate(), v8Value, exceptionState); |
| 158 if (exceptionState.HadException()) | 166 if (exceptionState.HadException()) |
| 159 return; | 167 return; |
| 160 | 168 |
| 161 impl->setUnrestrictedDoubleAttribute(cppValue); | 169 impl->setUnrestrictedDoubleAttribute(cppValue); |
| 162 } | 170 } |
| 163 | 171 |
| 164 static void unrestrictedFloatAttributeAttributeGetter(const v8::FunctionCallback
Info<v8::Value>& info) { | 172 static void unrestrictedFloatAttributeAttributeGetter(const v8::FunctionCallback
Info<v8::Value>& info) { |
| 165 v8::Local<v8::Object> holder = info.Holder(); | 173 v8::Local<v8::Object> holder = info.Holder(); |
| 166 | 174 |
| 167 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); | 175 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); |
| 168 | 176 |
| 169 V8SetReturnValue(info, impl->unrestrictedFloatAttribute()); | 177 V8SetReturnValue(info, impl->unrestrictedFloatAttribute()); |
| 170 } | 178 } |
| 171 | 179 |
| 172 static void unrestrictedFloatAttributeAttributeSetter(v8::Local<v8::Value> v8Val
ue, const v8::FunctionCallbackInfo<v8::Value>& info) { | 180 static void unrestrictedFloatAttributeAttributeSetter(v8::Local<v8::Value> v8Val
ue, const v8::FunctionCallbackInfo<v8::Value>& info) { |
| 173 v8::Isolate* isolate = info.GetIsolate(); | 181 v8::Isolate* isolate = info.GetIsolate(); |
| 174 ALLOW_UNUSED_LOCAL(isolate); | 182 ALLOW_UNUSED_LOCAL(isolate); |
| 175 | 183 |
| 176 v8::Local<v8::Object> holder = info.Holder(); | 184 v8::Local<v8::Object> holder = info.Holder(); |
| 185 ALLOW_UNUSED_LOCAL(holder); |
| 186 |
| 177 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); | 187 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); |
| 178 | 188 |
| 179 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestIn
terface5", "unrestrictedFloatAttribute"); | 189 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestIn
terface5", "unrestrictedFloatAttribute"); |
| 180 | 190 |
| 181 // Prepare the value to be set. | 191 // Prepare the value to be set. |
| 182 float cppValue = NativeValueTraits<IDLUnrestrictedFloat>::NativeValue(info.Get
Isolate(), v8Value, exceptionState); | 192 float cppValue = NativeValueTraits<IDLUnrestrictedFloat>::NativeValue(info.Get
Isolate(), v8Value, exceptionState); |
| 183 if (exceptionState.HadException()) | 193 if (exceptionState.HadException()) |
| 184 return; | 194 return; |
| 185 | 195 |
| 186 impl->setUnrestrictedFloatAttribute(cppValue); | 196 impl->setUnrestrictedFloatAttribute(cppValue); |
| 187 } | 197 } |
| 188 | 198 |
| 189 static void staticStringAttributeAttributeGetter(const v8::FunctionCallbackInfo<
v8::Value>& info) { | 199 static void staticStringAttributeAttributeGetter(const v8::FunctionCallbackInfo<
v8::Value>& info) { |
| 190 V8SetReturnValueString(info, TestInterface5Implementation::staticStringAttribu
te(), info.GetIsolate()); | 200 V8SetReturnValueString(info, TestInterface5Implementation::staticStringAttribu
te(), info.GetIsolate()); |
| 191 } | 201 } |
| 192 | 202 |
| 193 static void staticStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::FunctionCallbackInfo<v8::Value>& info) { | 203 static void staticStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::FunctionCallbackInfo<v8::Value>& info) { |
| 194 v8::Isolate* isolate = info.GetIsolate(); | 204 v8::Isolate* isolate = info.GetIsolate(); |
| 195 ALLOW_UNUSED_LOCAL(isolate); | 205 ALLOW_UNUSED_LOCAL(isolate); |
| 196 | 206 |
| 207 v8::Local<v8::Object> holder = info.Holder(); |
| 208 ALLOW_UNUSED_LOCAL(holder); |
| 209 |
| 197 // Prepare the value to be set. | 210 // Prepare the value to be set. |
| 198 V8StringResource<> cppValue = v8Value; | 211 V8StringResource<> cppValue = v8Value; |
| 199 if (!cppValue.Prepare()) | 212 if (!cppValue.Prepare()) |
| 200 return; | 213 return; |
| 201 | 214 |
| 202 TestInterface5Implementation::setStaticStringAttribute(cppValue); | 215 TestInterface5Implementation::setStaticStringAttribute(cppValue); |
| 203 } | 216 } |
| 204 | 217 |
| 205 static void lengthAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& inf
o) { | 218 static void lengthAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& inf
o) { |
| 206 v8::Local<v8::Object> holder = info.Holder(); | 219 v8::Local<v8::Object> holder = info.Holder(); |
| 207 | 220 |
| 208 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); | 221 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); |
| 209 | 222 |
| 210 V8SetReturnValueUnsigned(info, impl->length()); | 223 V8SetReturnValueUnsigned(info, impl->length()); |
| 211 } | 224 } |
| 212 | 225 |
| 213 static void alwaysExposedAttributeAttributeGetter(const v8::FunctionCallbackInfo
<v8::Value>& info) { | 226 static void alwaysExposedAttributeAttributeGetter(const v8::FunctionCallbackInfo
<v8::Value>& info) { |
| 214 v8::Local<v8::Object> holder = info.Holder(); | 227 v8::Local<v8::Object> holder = info.Holder(); |
| 215 | 228 |
| 216 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); | 229 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); |
| 217 | 230 |
| 218 V8SetReturnValueInt(info, impl->alwaysExposedAttribute()); | 231 V8SetReturnValueInt(info, impl->alwaysExposedAttribute()); |
| 219 } | 232 } |
| 220 | 233 |
| 221 static void alwaysExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::FunctionCallbackInfo<v8::Value>& info) { | 234 static void alwaysExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::FunctionCallbackInfo<v8::Value>& info) { |
| 222 v8::Isolate* isolate = info.GetIsolate(); | 235 v8::Isolate* isolate = info.GetIsolate(); |
| 223 ALLOW_UNUSED_LOCAL(isolate); | 236 ALLOW_UNUSED_LOCAL(isolate); |
| 224 | 237 |
| 225 v8::Local<v8::Object> holder = info.Holder(); | 238 v8::Local<v8::Object> holder = info.Holder(); |
| 239 ALLOW_UNUSED_LOCAL(holder); |
| 240 |
| 226 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); | 241 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); |
| 227 | 242 |
| 228 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestIn
terface5", "alwaysExposedAttribute"); | 243 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestIn
terface5", "alwaysExposedAttribute"); |
| 229 | 244 |
| 230 // Prepare the value to be set. | 245 // Prepare the value to be set. |
| 231 int32_t cppValue = NativeValueTraits<IDLLong>::NativeValue(info.GetIsolate(),
v8Value, exceptionState, kNormalConversion); | 246 int32_t cppValue = NativeValueTraits<IDLLong>::NativeValue(info.GetIsolate(),
v8Value, exceptionState, kNormalConversion); |
| 232 if (exceptionState.HadException()) | 247 if (exceptionState.HadException()) |
| 233 return; | 248 return; |
| 234 | 249 |
| 235 impl->setAlwaysExposedAttribute(cppValue); | 250 impl->setAlwaysExposedAttribute(cppValue); |
| 236 } | 251 } |
| 237 | 252 |
| 238 static void workerExposedAttributeAttributeGetter(const v8::FunctionCallbackInfo
<v8::Value>& info) { | 253 static void workerExposedAttributeAttributeGetter(const v8::FunctionCallbackInfo
<v8::Value>& info) { |
| 239 v8::Local<v8::Object> holder = info.Holder(); | 254 v8::Local<v8::Object> holder = info.Holder(); |
| 240 | 255 |
| 241 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); | 256 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); |
| 242 | 257 |
| 243 V8SetReturnValueInt(info, impl->workerExposedAttribute()); | 258 V8SetReturnValueInt(info, impl->workerExposedAttribute()); |
| 244 } | 259 } |
| 245 | 260 |
| 246 static void workerExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::FunctionCallbackInfo<v8::Value>& info) { | 261 static void workerExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::FunctionCallbackInfo<v8::Value>& info) { |
| 247 v8::Isolate* isolate = info.GetIsolate(); | 262 v8::Isolate* isolate = info.GetIsolate(); |
| 248 ALLOW_UNUSED_LOCAL(isolate); | 263 ALLOW_UNUSED_LOCAL(isolate); |
| 249 | 264 |
| 250 v8::Local<v8::Object> holder = info.Holder(); | 265 v8::Local<v8::Object> holder = info.Holder(); |
| 266 ALLOW_UNUSED_LOCAL(holder); |
| 267 |
| 251 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); | 268 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); |
| 252 | 269 |
| 253 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestIn
terface5", "workerExposedAttribute"); | 270 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestIn
terface5", "workerExposedAttribute"); |
| 254 | 271 |
| 255 // Prepare the value to be set. | 272 // Prepare the value to be set. |
| 256 int32_t cppValue = NativeValueTraits<IDLLong>::NativeValue(info.GetIsolate(),
v8Value, exceptionState, kNormalConversion); | 273 int32_t cppValue = NativeValueTraits<IDLLong>::NativeValue(info.GetIsolate(),
v8Value, exceptionState, kNormalConversion); |
| 257 if (exceptionState.HadException()) | 274 if (exceptionState.HadException()) |
| 258 return; | 275 return; |
| 259 | 276 |
| 260 impl->setWorkerExposedAttribute(cppValue); | 277 impl->setWorkerExposedAttribute(cppValue); |
| 261 } | 278 } |
| 262 | 279 |
| 263 static void windowExposedAttributeAttributeGetter(const v8::FunctionCallbackInfo
<v8::Value>& info) { | 280 static void windowExposedAttributeAttributeGetter(const v8::FunctionCallbackInfo
<v8::Value>& info) { |
| 264 v8::Local<v8::Object> holder = info.Holder(); | 281 v8::Local<v8::Object> holder = info.Holder(); |
| 265 | 282 |
| 266 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); | 283 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); |
| 267 | 284 |
| 268 V8SetReturnValueInt(info, impl->windowExposedAttribute()); | 285 V8SetReturnValueInt(info, impl->windowExposedAttribute()); |
| 269 } | 286 } |
| 270 | 287 |
| 271 static void windowExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::FunctionCallbackInfo<v8::Value>& info) { | 288 static void windowExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::FunctionCallbackInfo<v8::Value>& info) { |
| 272 v8::Isolate* isolate = info.GetIsolate(); | 289 v8::Isolate* isolate = info.GetIsolate(); |
| 273 ALLOW_UNUSED_LOCAL(isolate); | 290 ALLOW_UNUSED_LOCAL(isolate); |
| 274 | 291 |
| 275 v8::Local<v8::Object> holder = info.Holder(); | 292 v8::Local<v8::Object> holder = info.Holder(); |
| 293 ALLOW_UNUSED_LOCAL(holder); |
| 294 |
| 276 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); | 295 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); |
| 277 | 296 |
| 278 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestIn
terface5", "windowExposedAttribute"); | 297 ExceptionState exceptionState(isolate, ExceptionState::kSetterContext, "TestIn
terface5", "windowExposedAttribute"); |
| 279 | 298 |
| 280 // Prepare the value to be set. | 299 // Prepare the value to be set. |
| 281 int32_t cppValue = NativeValueTraits<IDLLong>::NativeValue(info.GetIsolate(),
v8Value, exceptionState, kNormalConversion); | 300 int32_t cppValue = NativeValueTraits<IDLLong>::NativeValue(info.GetIsolate(),
v8Value, exceptionState, kNormalConversion); |
| 282 if (exceptionState.HadException()) | 301 if (exceptionState.HadException()) |
| 283 return; | 302 return; |
| 284 | 303 |
| 285 impl->setWindowExposedAttribute(cppValue); | 304 impl->setWindowExposedAttribute(cppValue); |
| (...skipping 651 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 937 if (executionContext && (executionContext->IsDocument() || executionContext->I
sServiceWorkerGlobalScope())) { | 956 if (executionContext && (executionContext->IsDocument() || executionContext->I
sServiceWorkerGlobalScope())) { |
| 938 const V8DOMConfiguration::MethodConfiguration windowAndServiceWorkerExposedM
ethodMethodConfiguration[] = { | 957 const V8DOMConfiguration::MethodConfiguration windowAndServiceWorkerExposedM
ethodMethodConfiguration[] = { |
| 939 {"windowAndServiceWorkerExposedMethod", V8TestInterface5::windowAndService
WorkerExposedMethodMethodCallback, 0, v8::None, V8DOMConfiguration::kOnPrototype
, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kDoNotCheckAccess, V8DOM
Configuration::kAllWorlds} | 958 {"windowAndServiceWorkerExposedMethod", V8TestInterface5::windowAndService
WorkerExposedMethodMethodCallback, 0, v8::None, V8DOMConfiguration::kOnPrototype
, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kDoNotCheckAccess, V8DOM
Configuration::kAllWorlds} |
| 940 }; | 959 }; |
| 941 for (const auto& methodConfig : windowAndServiceWorkerExposedMethodMethodCon
figuration) | 960 for (const auto& methodConfig : windowAndServiceWorkerExposedMethodMethodCon
figuration) |
| 942 V8DOMConfiguration::InstallMethod(isolate, world, v8::Local<v8::Object>(),
prototypeObject, interfaceObject, signature, methodConfig); | 961 V8DOMConfiguration::InstallMethod(isolate, world, v8::Local<v8::Object>(),
prototypeObject, interfaceObject, signature, methodConfig); |
| 943 } | 962 } |
| 944 } | 963 } |
| 945 | 964 |
| 946 } // namespace blink | 965 } // namespace blink |
| OLD | NEW |