| 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 #if ENABLE(CONDITION) | 8 #if ENABLE(CONDITION) |
| 9 #include "V8TestInterface5.h" | 9 #include "V8TestInterface5.h" |
| 10 | 10 |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 83 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 84 TestInterface5ImplementationV8Internal::doubleAttributeAttributeGetter(info)
; | 84 TestInterface5ImplementationV8Internal::doubleAttributeAttributeGetter(info)
; |
| 85 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 85 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 86 } | 86 } |
| 87 | 87 |
| 88 static void doubleAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v
8::PropertyCallbackInfo<void>& info) | 88 static void doubleAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v
8::PropertyCallbackInfo<void>& info) |
| 89 { | 89 { |
| 90 v8::Local<v8::Object> holder = info.Holder(); | 90 v8::Local<v8::Object> holder = info.Holder(); |
| 91 ExceptionState exceptionState(ExceptionState::SetterContext, "doubleAttribut
e", "TestInterface5", holder, info.GetIsolate()); | 91 ExceptionState exceptionState(ExceptionState::SetterContext, "doubleAttribut
e", "TestInterface5", holder, info.GetIsolate()); |
| 92 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); | 92 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); |
| 93 TONATIVE_VOID_EXCEPTIONSTATE(double, cppValue, toRestrictedDouble(v8Value, e
xceptionState), exceptionState); | 93 double cppValue = toRestrictedDouble(v8Value, exceptionState); |
| 94 if (exceptionState.throwIfNeeded()) |
| 95 return; |
| 94 impl->setDoubleAttribute(cppValue); | 96 impl->setDoubleAttribute(cppValue); |
| 95 } | 97 } |
| 96 | 98 |
| 97 static void doubleAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Lo
cal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 99 static void doubleAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Lo
cal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 98 { | 100 { |
| 99 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 101 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 100 TestInterface5ImplementationV8Internal::doubleAttributeAttributeSetter(v8Val
ue, info); | 102 TestInterface5ImplementationV8Internal::doubleAttributeAttributeSetter(v8Val
ue, info); |
| 101 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 103 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 102 } | 104 } |
| 103 | 105 |
| 104 static void floatAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Val
ue>& info) | 106 static void floatAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Val
ue>& info) |
| 105 { | 107 { |
| 106 v8::Local<v8::Object> holder = info.Holder(); | 108 v8::Local<v8::Object> holder = info.Holder(); |
| 107 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); | 109 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); |
| 108 v8SetReturnValue(info, impl->floatAttribute()); | 110 v8SetReturnValue(info, impl->floatAttribute()); |
| 109 } | 111 } |
| 110 | 112 |
| 111 static void floatAttributeAttributeGetterCallback(v8::Local<v8::String>, const v
8::PropertyCallbackInfo<v8::Value>& info) | 113 static void floatAttributeAttributeGetterCallback(v8::Local<v8::String>, const v
8::PropertyCallbackInfo<v8::Value>& info) |
| 112 { | 114 { |
| 113 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 115 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 114 TestInterface5ImplementationV8Internal::floatAttributeAttributeGetter(info); | 116 TestInterface5ImplementationV8Internal::floatAttributeAttributeGetter(info); |
| 115 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 117 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 116 } | 118 } |
| 117 | 119 |
| 118 static void floatAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8
::PropertyCallbackInfo<void>& info) | 120 static void floatAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8
::PropertyCallbackInfo<void>& info) |
| 119 { | 121 { |
| 120 v8::Local<v8::Object> holder = info.Holder(); | 122 v8::Local<v8::Object> holder = info.Holder(); |
| 121 ExceptionState exceptionState(ExceptionState::SetterContext, "floatAttribute
", "TestInterface5", holder, info.GetIsolate()); | 123 ExceptionState exceptionState(ExceptionState::SetterContext, "floatAttribute
", "TestInterface5", holder, info.GetIsolate()); |
| 122 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); | 124 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); |
| 123 TONATIVE_VOID_EXCEPTIONSTATE(float, cppValue, toRestrictedFloat(v8Value, exc
eptionState), exceptionState); | 125 float cppValue = toRestrictedFloat(v8Value, exceptionState); |
| 126 if (exceptionState.throwIfNeeded()) |
| 127 return; |
| 124 impl->setFloatAttribute(cppValue); | 128 impl->setFloatAttribute(cppValue); |
| 125 } | 129 } |
| 126 | 130 |
| 127 static void floatAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Loc
al<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 131 static void floatAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Loc
al<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 128 { | 132 { |
| 129 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 133 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 130 TestInterface5ImplementationV8Internal::floatAttributeAttributeSetter(v8Valu
e, info); | 134 TestInterface5ImplementationV8Internal::floatAttributeAttributeSetter(v8Valu
e, info); |
| 131 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 135 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 132 } | 136 } |
| 133 | 137 |
| 134 static void unrestrictedDoubleAttributeAttributeGetter(const v8::PropertyCallbac
kInfo<v8::Value>& info) | 138 static void unrestrictedDoubleAttributeAttributeGetter(const v8::PropertyCallbac
kInfo<v8::Value>& info) |
| 135 { | 139 { |
| 136 v8::Local<v8::Object> holder = info.Holder(); | 140 v8::Local<v8::Object> holder = info.Holder(); |
| 137 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); | 141 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); |
| 138 v8SetReturnValue(info, impl->unrestrictedDoubleAttribute()); | 142 v8SetReturnValue(info, impl->unrestrictedDoubleAttribute()); |
| 139 } | 143 } |
| 140 | 144 |
| 141 static void unrestrictedDoubleAttributeAttributeGetterCallback(v8::Local<v8::Str
ing>, const v8::PropertyCallbackInfo<v8::Value>& info) | 145 static void unrestrictedDoubleAttributeAttributeGetterCallback(v8::Local<v8::Str
ing>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 142 { | 146 { |
| 143 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 147 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 144 TestInterface5ImplementationV8Internal::unrestrictedDoubleAttributeAttribute
Getter(info); | 148 TestInterface5ImplementationV8Internal::unrestrictedDoubleAttributeAttribute
Getter(info); |
| 145 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 149 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 146 } | 150 } |
| 147 | 151 |
| 148 static void unrestrictedDoubleAttributeAttributeSetter(v8::Local<v8::Value> v8Va
lue, const v8::PropertyCallbackInfo<void>& info) | 152 static void unrestrictedDoubleAttributeAttributeSetter(v8::Local<v8::Value> v8Va
lue, const v8::PropertyCallbackInfo<void>& info) |
| 149 { | 153 { |
| 150 v8::Local<v8::Object> holder = info.Holder(); | 154 v8::Local<v8::Object> holder = info.Holder(); |
| 151 ExceptionState exceptionState(ExceptionState::SetterContext, "unrestrictedDo
ubleAttribute", "TestInterface5", holder, info.GetIsolate()); | 155 ExceptionState exceptionState(ExceptionState::SetterContext, "unrestrictedDo
ubleAttribute", "TestInterface5", holder, info.GetIsolate()); |
| 152 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); | 156 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); |
| 153 TONATIVE_VOID_EXCEPTIONSTATE(double, cppValue, toDouble(v8Value, exceptionSt
ate), exceptionState); | 157 double cppValue = toDouble(v8Value, exceptionState); |
| 158 if (exceptionState.throwIfNeeded()) |
| 159 return; |
| 154 impl->setUnrestrictedDoubleAttribute(cppValue); | 160 impl->setUnrestrictedDoubleAttribute(cppValue); |
| 155 } | 161 } |
| 156 | 162 |
| 157 static void unrestrictedDoubleAttributeAttributeSetterCallback(v8::Local<v8::Str
ing>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 163 static void unrestrictedDoubleAttributeAttributeSetterCallback(v8::Local<v8::Str
ing>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 158 { | 164 { |
| 159 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 165 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 160 TestInterface5ImplementationV8Internal::unrestrictedDoubleAttributeAttribute
Setter(v8Value, info); | 166 TestInterface5ImplementationV8Internal::unrestrictedDoubleAttributeAttribute
Setter(v8Value, info); |
| 161 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 167 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 162 } | 168 } |
| 163 | 169 |
| 164 static void unrestrictedFloatAttributeAttributeGetter(const v8::PropertyCallback
Info<v8::Value>& info) | 170 static void unrestrictedFloatAttributeAttributeGetter(const v8::PropertyCallback
Info<v8::Value>& info) |
| 165 { | 171 { |
| 166 v8::Local<v8::Object> holder = info.Holder(); | 172 v8::Local<v8::Object> holder = info.Holder(); |
| 167 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); | 173 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); |
| 168 v8SetReturnValue(info, impl->unrestrictedFloatAttribute()); | 174 v8SetReturnValue(info, impl->unrestrictedFloatAttribute()); |
| 169 } | 175 } |
| 170 | 176 |
| 171 static void unrestrictedFloatAttributeAttributeGetterCallback(v8::Local<v8::Stri
ng>, const v8::PropertyCallbackInfo<v8::Value>& info) | 177 static void unrestrictedFloatAttributeAttributeGetterCallback(v8::Local<v8::Stri
ng>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 172 { | 178 { |
| 173 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 179 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 174 TestInterface5ImplementationV8Internal::unrestrictedFloatAttributeAttributeG
etter(info); | 180 TestInterface5ImplementationV8Internal::unrestrictedFloatAttributeAttributeG
etter(info); |
| 175 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 181 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 176 } | 182 } |
| 177 | 183 |
| 178 static void unrestrictedFloatAttributeAttributeSetter(v8::Local<v8::Value> v8Val
ue, const v8::PropertyCallbackInfo<void>& info) | 184 static void unrestrictedFloatAttributeAttributeSetter(v8::Local<v8::Value> v8Val
ue, const v8::PropertyCallbackInfo<void>& info) |
| 179 { | 185 { |
| 180 v8::Local<v8::Object> holder = info.Holder(); | 186 v8::Local<v8::Object> holder = info.Holder(); |
| 181 ExceptionState exceptionState(ExceptionState::SetterContext, "unrestrictedFl
oatAttribute", "TestInterface5", holder, info.GetIsolate()); | 187 ExceptionState exceptionState(ExceptionState::SetterContext, "unrestrictedFl
oatAttribute", "TestInterface5", holder, info.GetIsolate()); |
| 182 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); | 188 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); |
| 183 TONATIVE_VOID_EXCEPTIONSTATE(float, cppValue, toFloat(v8Value, exceptionStat
e), exceptionState); | 189 float cppValue = toFloat(v8Value, exceptionState); |
| 190 if (exceptionState.throwIfNeeded()) |
| 191 return; |
| 184 impl->setUnrestrictedFloatAttribute(cppValue); | 192 impl->setUnrestrictedFloatAttribute(cppValue); |
| 185 } | 193 } |
| 186 | 194 |
| 187 static void unrestrictedFloatAttributeAttributeSetterCallback(v8::Local<v8::Stri
ng>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 195 static void unrestrictedFloatAttributeAttributeSetterCallback(v8::Local<v8::Stri
ng>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 188 { | 196 { |
| 189 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 197 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 190 TestInterface5ImplementationV8Internal::unrestrictedFloatAttributeAttributeS
etter(v8Value, info); | 198 TestInterface5ImplementationV8Internal::unrestrictedFloatAttributeAttributeS
etter(v8Value, info); |
| 191 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 199 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 192 } | 200 } |
| 193 | 201 |
| 194 static void staticStringAttributeAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) | 202 static void staticStringAttributeAttributeGetter(const v8::PropertyCallbackInfo<
v8::Value>& info) |
| 195 { | 203 { |
| 196 v8SetReturnValueString(info, TestInterface5Implementation::staticStringAttri
bute(), info.GetIsolate()); | 204 v8SetReturnValueString(info, TestInterface5Implementation::staticStringAttri
bute(), info.GetIsolate()); |
| 197 } | 205 } |
| 198 | 206 |
| 199 static void staticStringAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | 207 static void staticStringAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) |
| 200 { | 208 { |
| 201 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 209 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 202 TestInterface5ImplementationV8Internal::staticStringAttributeAttributeGetter
(info); | 210 TestInterface5ImplementationV8Internal::staticStringAttributeAttributeGetter
(info); |
| 203 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 211 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 204 } | 212 } |
| 205 | 213 |
| 206 static void staticStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::PropertyCallbackInfo<void>& info) | 214 static void staticStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::PropertyCallbackInfo<void>& info) |
| 207 { | 215 { |
| 208 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); | 216 V8StringResource<> cppValue = v8Value; |
| 217 if (!cppValue.prepare()) |
| 218 return; |
| 209 TestInterface5Implementation::setStaticStringAttribute(cppValue); | 219 TestInterface5Implementation::setStaticStringAttribute(cppValue); |
| 210 } | 220 } |
| 211 | 221 |
| 212 static void staticStringAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 222 static void staticStringAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 213 { | 223 { |
| 214 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 224 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 215 TestInterface5ImplementationV8Internal::staticStringAttributeAttributeSetter
(v8Value, info); | 225 TestInterface5ImplementationV8Internal::staticStringAttributeAttributeSetter
(v8Value, info); |
| 216 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 226 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 217 } | 227 } |
| 218 | 228 |
| 219 static void alwaysExposedAttributeAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) | 229 static void alwaysExposedAttributeAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) |
| 220 { | 230 { |
| 221 v8::Local<v8::Object> holder = info.Holder(); | 231 v8::Local<v8::Object> holder = info.Holder(); |
| 222 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); | 232 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); |
| 223 v8SetReturnValueInt(info, impl->alwaysExposedAttribute()); | 233 v8SetReturnValueInt(info, impl->alwaysExposedAttribute()); |
| 224 } | 234 } |
| 225 | 235 |
| 226 static void alwaysExposedAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | 236 static void alwaysExposedAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) |
| 227 { | 237 { |
| 228 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 238 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 229 TestInterface5ImplementationV8Internal::alwaysExposedAttributeAttributeGette
r(info); | 239 TestInterface5ImplementationV8Internal::alwaysExposedAttributeAttributeGette
r(info); |
| 230 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 240 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 231 } | 241 } |
| 232 | 242 |
| 233 static void alwaysExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) | 243 static void alwaysExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) |
| 234 { | 244 { |
| 235 v8::Local<v8::Object> holder = info.Holder(); | 245 v8::Local<v8::Object> holder = info.Holder(); |
| 236 ExceptionState exceptionState(ExceptionState::SetterContext, "alwaysExposedA
ttribute", "TestInterface5", holder, info.GetIsolate()); | 246 ExceptionState exceptionState(ExceptionState::SetterContext, "alwaysExposedA
ttribute", "TestInterface5", holder, info.GetIsolate()); |
| 237 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); | 247 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); |
| 238 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); | 248 int cppValue = toInt32(v8Value, exceptionState); |
| 249 if (exceptionState.throwIfNeeded()) |
| 250 return; |
| 239 impl->setAlwaysExposedAttribute(cppValue); | 251 impl->setAlwaysExposedAttribute(cppValue); |
| 240 } | 252 } |
| 241 | 253 |
| 242 static void alwaysExposedAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 254 static void alwaysExposedAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 243 { | 255 { |
| 244 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 256 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 245 TestInterface5ImplementationV8Internal::alwaysExposedAttributeAttributeSette
r(v8Value, info); | 257 TestInterface5ImplementationV8Internal::alwaysExposedAttributeAttributeSette
r(v8Value, info); |
| 246 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 258 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 247 } | 259 } |
| 248 | 260 |
| 249 static void workerExposedAttributeAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) | 261 static void workerExposedAttributeAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) |
| 250 { | 262 { |
| 251 v8::Local<v8::Object> holder = info.Holder(); | 263 v8::Local<v8::Object> holder = info.Holder(); |
| 252 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); | 264 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); |
| 253 v8SetReturnValueInt(info, impl->workerExposedAttribute()); | 265 v8SetReturnValueInt(info, impl->workerExposedAttribute()); |
| 254 } | 266 } |
| 255 | 267 |
| 256 static void workerExposedAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | 268 static void workerExposedAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) |
| 257 { | 269 { |
| 258 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 270 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 259 TestInterface5ImplementationV8Internal::workerExposedAttributeAttributeGette
r(info); | 271 TestInterface5ImplementationV8Internal::workerExposedAttributeAttributeGette
r(info); |
| 260 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 272 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 261 } | 273 } |
| 262 | 274 |
| 263 static void workerExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) | 275 static void workerExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) |
| 264 { | 276 { |
| 265 v8::Local<v8::Object> holder = info.Holder(); | 277 v8::Local<v8::Object> holder = info.Holder(); |
| 266 ExceptionState exceptionState(ExceptionState::SetterContext, "workerExposedA
ttribute", "TestInterface5", holder, info.GetIsolate()); | 278 ExceptionState exceptionState(ExceptionState::SetterContext, "workerExposedA
ttribute", "TestInterface5", holder, info.GetIsolate()); |
| 267 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); | 279 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); |
| 268 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); | 280 int cppValue = toInt32(v8Value, exceptionState); |
| 281 if (exceptionState.throwIfNeeded()) |
| 282 return; |
| 269 impl->setWorkerExposedAttribute(cppValue); | 283 impl->setWorkerExposedAttribute(cppValue); |
| 270 } | 284 } |
| 271 | 285 |
| 272 static void workerExposedAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 286 static void workerExposedAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 273 { | 287 { |
| 274 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 288 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 275 TestInterface5ImplementationV8Internal::workerExposedAttributeAttributeSette
r(v8Value, info); | 289 TestInterface5ImplementationV8Internal::workerExposedAttributeAttributeSette
r(v8Value, info); |
| 276 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 290 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 277 } | 291 } |
| 278 | 292 |
| 279 static void windowExposedAttributeAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) | 293 static void windowExposedAttributeAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) |
| 280 { | 294 { |
| 281 v8::Local<v8::Object> holder = info.Holder(); | 295 v8::Local<v8::Object> holder = info.Holder(); |
| 282 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); | 296 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); |
| 283 v8SetReturnValueInt(info, impl->windowExposedAttribute()); | 297 v8SetReturnValueInt(info, impl->windowExposedAttribute()); |
| 284 } | 298 } |
| 285 | 299 |
| 286 static void windowExposedAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | 300 static void windowExposedAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) |
| 287 { | 301 { |
| 288 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 302 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 289 TestInterface5ImplementationV8Internal::windowExposedAttributeAttributeGette
r(info); | 303 TestInterface5ImplementationV8Internal::windowExposedAttributeAttributeGette
r(info); |
| 290 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 304 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 291 } | 305 } |
| 292 | 306 |
| 293 static void windowExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) | 307 static void windowExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) |
| 294 { | 308 { |
| 295 v8::Local<v8::Object> holder = info.Holder(); | 309 v8::Local<v8::Object> holder = info.Holder(); |
| 296 ExceptionState exceptionState(ExceptionState::SetterContext, "windowExposedA
ttribute", "TestInterface5", holder, info.GetIsolate()); | 310 ExceptionState exceptionState(ExceptionState::SetterContext, "windowExposedA
ttribute", "TestInterface5", holder, info.GetIsolate()); |
| 297 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); | 311 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); |
| 298 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState)
, exceptionState); | 312 int cppValue = toInt32(v8Value, exceptionState); |
| 313 if (exceptionState.throwIfNeeded()) |
| 314 return; |
| 299 impl->setWindowExposedAttribute(cppValue); | 315 impl->setWindowExposedAttribute(cppValue); |
| 300 } | 316 } |
| 301 | 317 |
| 302 static void windowExposedAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 318 static void windowExposedAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 303 { | 319 { |
| 304 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 320 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 305 TestInterface5ImplementationV8Internal::windowExposedAttributeAttributeSette
r(v8Value, info); | 321 TestInterface5ImplementationV8Internal::windowExposedAttributeAttributeSette
r(v8Value, info); |
| 306 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 322 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 307 } | 323 } |
| 308 | 324 |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 357 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodD
oubleArgFloatArg", "TestInterface5", info.Holder(), info.GetIsolate()); | 373 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodD
oubleArgFloatArg", "TestInterface5", info.Holder(), info.GetIsolate()); |
| 358 if (UNLIKELY(info.Length() < 2)) { | 374 if (UNLIKELY(info.Length() < 2)) { |
| 359 setMinimumArityTypeError(exceptionState, 2, info.Length()); | 375 setMinimumArityTypeError(exceptionState, 2, info.Length()); |
| 360 exceptionState.throwIfNeeded(); | 376 exceptionState.throwIfNeeded(); |
| 361 return; | 377 return; |
| 362 } | 378 } |
| 363 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; | 379 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; |
| 364 double doubleArg; | 380 double doubleArg; |
| 365 float floatArg; | 381 float floatArg; |
| 366 { | 382 { |
| 367 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(doubleArg, toRestrictedDouble(info
[0], exceptionState), exceptionState); | 383 doubleArg = toRestrictedDouble(info[0], exceptionState); |
| 368 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(floatArg, toRestrictedFloat(info[1
], exceptionState), exceptionState); | 384 if (exceptionState.throwIfNeeded()) |
| 385 return; |
| 386 floatArg = toRestrictedFloat(info[1], exceptionState); |
| 387 if (exceptionState.throwIfNeeded()) |
| 388 return; |
| 369 } | 389 } |
| 370 impl->voidMethodDoubleArgFloatArg(doubleArg, floatArg); | 390 impl->voidMethodDoubleArgFloatArg(doubleArg, floatArg); |
| 371 } | 391 } |
| 372 | 392 |
| 373 static void voidMethodDoubleArgFloatArgMethodCallback(const v8::FunctionCallback
Info<v8::Value>& info) | 393 static void voidMethodDoubleArgFloatArgMethodCallback(const v8::FunctionCallback
Info<v8::Value>& info) |
| 374 { | 394 { |
| 375 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 395 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 376 TestInterface5ImplementationV8Internal::voidMethodDoubleArgFloatArgMethod(in
fo); | 396 TestInterface5ImplementationV8Internal::voidMethodDoubleArgFloatArgMethod(in
fo); |
| 377 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 397 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 378 } | 398 } |
| 379 | 399 |
| 380 static void voidMethodUnrestrictedDoubleArgUnrestrictedFloatArgMethod(const v8::
FunctionCallbackInfo<v8::Value>& info) | 400 static void voidMethodUnrestrictedDoubleArgUnrestrictedFloatArgMethod(const v8::
FunctionCallbackInfo<v8::Value>& info) |
| 381 { | 401 { |
| 382 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodU
nrestrictedDoubleArgUnrestrictedFloatArg", "TestInterface5", info.Holder(), info
.GetIsolate()); | 402 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodU
nrestrictedDoubleArgUnrestrictedFloatArg", "TestInterface5", info.Holder(), info
.GetIsolate()); |
| 383 if (UNLIKELY(info.Length() < 2)) { | 403 if (UNLIKELY(info.Length() < 2)) { |
| 384 setMinimumArityTypeError(exceptionState, 2, info.Length()); | 404 setMinimumArityTypeError(exceptionState, 2, info.Length()); |
| 385 exceptionState.throwIfNeeded(); | 405 exceptionState.throwIfNeeded(); |
| 386 return; | 406 return; |
| 387 } | 407 } |
| 388 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; | 408 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; |
| 389 double unrestrictedDoubleArg; | 409 double unrestrictedDoubleArg; |
| 390 float unrestrictedFloatArg; | 410 float unrestrictedFloatArg; |
| 391 { | 411 { |
| 392 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(unrestrictedDoubleArg, toDouble(in
fo[0], exceptionState), exceptionState); | 412 unrestrictedDoubleArg = toDouble(info[0], exceptionState); |
| 393 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(unrestrictedFloatArg, toFloat(info
[1], exceptionState), exceptionState); | 413 if (exceptionState.throwIfNeeded()) |
| 414 return; |
| 415 unrestrictedFloatArg = toFloat(info[1], exceptionState); |
| 416 if (exceptionState.throwIfNeeded()) |
| 417 return; |
| 394 } | 418 } |
| 395 impl->voidMethodUnrestrictedDoubleArgUnrestrictedFloatArg(unrestrictedDouble
Arg, unrestrictedFloatArg); | 419 impl->voidMethodUnrestrictedDoubleArgUnrestrictedFloatArg(unrestrictedDouble
Arg, unrestrictedFloatArg); |
| 396 } | 420 } |
| 397 | 421 |
| 398 static void voidMethodUnrestrictedDoubleArgUnrestrictedFloatArgMethodCallback(co
nst v8::FunctionCallbackInfo<v8::Value>& info) | 422 static void voidMethodUnrestrictedDoubleArgUnrestrictedFloatArgMethodCallback(co
nst v8::FunctionCallbackInfo<v8::Value>& info) |
| 399 { | 423 { |
| 400 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 424 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 401 TestInterface5ImplementationV8Internal::voidMethodUnrestrictedDoubleArgUnres
trictedFloatArgMethod(info); | 425 TestInterface5ImplementationV8Internal::voidMethodUnrestrictedDoubleArgUnres
trictedFloatArgMethod(info); |
| 402 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 426 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 403 } | 427 } |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 520 { | 544 { |
| 521 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodB
ooleanOrDOMStringArg", "TestInterface5", info.Holder(), info.GetIsolate()); | 545 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodB
ooleanOrDOMStringArg", "TestInterface5", info.Holder(), info.GetIsolate()); |
| 522 if (UNLIKELY(info.Length() < 1)) { | 546 if (UNLIKELY(info.Length() < 1)) { |
| 523 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 547 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
| 524 exceptionState.throwIfNeeded(); | 548 exceptionState.throwIfNeeded(); |
| 525 return; | 549 return; |
| 526 } | 550 } |
| 527 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; | 551 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; |
| 528 BooleanOrString arg; | 552 BooleanOrString arg; |
| 529 { | 553 { |
| 530 TONATIVE_VOID_EXCEPTIONSTATE_ARGINTERNAL(V8BooleanOrString::toImpl(info.
GetIsolate(), info[0], arg, exceptionState), exceptionState); | 554 V8BooleanOrString::toImpl(info.GetIsolate(), info[0], arg, exceptionStat
e); |
| 555 if (exceptionState.throwIfNeeded()) |
| 556 return; |
| 531 } | 557 } |
| 532 impl->voidMethodBooleanOrDOMStringArg(arg); | 558 impl->voidMethodBooleanOrDOMStringArg(arg); |
| 533 } | 559 } |
| 534 | 560 |
| 535 static void voidMethodBooleanOrDOMStringArgMethodCallback(const v8::FunctionCall
backInfo<v8::Value>& info) | 561 static void voidMethodBooleanOrDOMStringArgMethodCallback(const v8::FunctionCall
backInfo<v8::Value>& info) |
| 536 { | 562 { |
| 537 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 563 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 538 TestInterface5ImplementationV8Internal::voidMethodBooleanOrDOMStringArgMetho
d(info); | 564 TestInterface5ImplementationV8Internal::voidMethodBooleanOrDOMStringArgMetho
d(info); |
| 539 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 565 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 540 } | 566 } |
| 541 | 567 |
| 542 static void voidMethodDoubleOrDOMStringArgMethod(const v8::FunctionCallbackInfo<
v8::Value>& info) | 568 static void voidMethodDoubleOrDOMStringArgMethod(const v8::FunctionCallbackInfo<
v8::Value>& info) |
| 543 { | 569 { |
| 544 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodD
oubleOrDOMStringArg", "TestInterface5", info.Holder(), info.GetIsolate()); | 570 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodD
oubleOrDOMStringArg", "TestInterface5", info.Holder(), info.GetIsolate()); |
| 545 if (UNLIKELY(info.Length() < 1)) { | 571 if (UNLIKELY(info.Length() < 1)) { |
| 546 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 572 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
| 547 exceptionState.throwIfNeeded(); | 573 exceptionState.throwIfNeeded(); |
| 548 return; | 574 return; |
| 549 } | 575 } |
| 550 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; | 576 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; |
| 551 DoubleOrString arg; | 577 DoubleOrString arg; |
| 552 { | 578 { |
| 553 TONATIVE_VOID_EXCEPTIONSTATE_ARGINTERNAL(V8DoubleOrString::toImpl(info.G
etIsolate(), info[0], arg, exceptionState), exceptionState); | 579 V8DoubleOrString::toImpl(info.GetIsolate(), info[0], arg, exceptionState
); |
| 580 if (exceptionState.throwIfNeeded()) |
| 581 return; |
| 554 } | 582 } |
| 555 impl->voidMethodDoubleOrDOMStringArg(arg); | 583 impl->voidMethodDoubleOrDOMStringArg(arg); |
| 556 } | 584 } |
| 557 | 585 |
| 558 static void voidMethodDoubleOrDOMStringArgMethodCallback(const v8::FunctionCallb
ackInfo<v8::Value>& info) | 586 static void voidMethodDoubleOrDOMStringArgMethodCallback(const v8::FunctionCallb
ackInfo<v8::Value>& info) |
| 559 { | 587 { |
| 560 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 588 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 561 TestInterface5ImplementationV8Internal::voidMethodDoubleOrDOMStringArgMethod
(info); | 589 TestInterface5ImplementationV8Internal::voidMethodDoubleOrDOMStringArgMethod
(info); |
| 562 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 590 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 563 } | 591 } |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 629 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 657 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
| 630 exceptionState.throwIfNeeded(); | 658 exceptionState.throwIfNeeded(); |
| 631 return; | 659 return; |
| 632 } | 660 } |
| 633 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; | 661 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; |
| 634 ScriptValue callback; | 662 ScriptValue callback; |
| 635 ScriptValue thisArg; | 663 ScriptValue thisArg; |
| 636 { | 664 { |
| 637 if (!info[0]->IsFunction()) { | 665 if (!info[0]->IsFunction()) { |
| 638 exceptionState.throwTypeError("The callback provided as parameter 1
is not a function."); | 666 exceptionState.throwTypeError("The callback provided as parameter 1
is not a function."); |
| 639 exceptionState.throwIfNeeded(); | 667 exceptionState.throwIfNeeded(); |
| 640 return; | 668 return; |
| 641 } | 669 } |
| 642 callback = ScriptValue(ScriptState::current(info.GetIsolate()), info[0])
; | 670 callback = ScriptValue(ScriptState::current(info.GetIsolate()), info[0])
; |
| 643 thisArg = ScriptValue(ScriptState::current(info.GetIsolate()), info[1]); | 671 thisArg = ScriptValue(ScriptState::current(info.GetIsolate()), info[1]); |
| 644 } | 672 } |
| 645 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); | 673 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
| 646 impl->forEachForBinding(scriptState, ScriptValue(scriptState, info.This()),
callback, thisArg, exceptionState); | 674 impl->forEachForBinding(scriptState, ScriptValue(scriptState, info.This()),
callback, thisArg, exceptionState); |
| 647 if (exceptionState.hadException()) { | 675 if (exceptionState.hadException()) { |
| 648 exceptionState.throwIfNeeded(); | 676 exceptionState.throwIfNeeded(); |
| 649 return; | 677 return; |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 702 static void indexedPropertyGetterCallback(uint32_t index, const v8::PropertyCall
backInfo<v8::Value>& info) | 730 static void indexedPropertyGetterCallback(uint32_t index, const v8::PropertyCall
backInfo<v8::Value>& info) |
| 703 { | 731 { |
| 704 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMIndexedProperty"); | 732 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMIndexedProperty"); |
| 705 TestInterface5ImplementationV8Internal::indexedPropertyGetter(index, info); | 733 TestInterface5ImplementationV8Internal::indexedPropertyGetter(index, info); |
| 706 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 734 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 707 } | 735 } |
| 708 | 736 |
| 709 static void indexedPropertySetter(uint32_t index, v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<v8::Value>& info) | 737 static void indexedPropertySetter(uint32_t index, v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<v8::Value>& info) |
| 710 { | 738 { |
| 711 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; | 739 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; |
| 712 TOSTRING_VOID(V8StringResource<>, propertyValue, v8Value); | 740 V8StringResource<> propertyValue = v8Value; |
| 741 if (!propertyValue.prepare()) |
| 742 return; |
| 713 bool result = impl->anonymousIndexedSetter(index, propertyValue); | 743 bool result = impl->anonymousIndexedSetter(index, propertyValue); |
| 714 if (!result) | 744 if (!result) |
| 715 return; | 745 return; |
| 716 v8SetReturnValue(info, v8Value); | 746 v8SetReturnValue(info, v8Value); |
| 717 } | 747 } |
| 718 | 748 |
| 719 static void indexedPropertySetterCallback(uint32_t index, v8::Local<v8::Value> v
8Value, const v8::PropertyCallbackInfo<v8::Value>& info) | 749 static void indexedPropertySetterCallback(uint32_t index, v8::Local<v8::Value> v
8Value, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 720 { | 750 { |
| 721 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMIndexedProperty"); | 751 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMIndexedProperty"); |
| 722 TestInterface5ImplementationV8Internal::indexedPropertySetter(index, v8Value
, info); | 752 TestInterface5ImplementationV8Internal::indexedPropertySetter(index, v8Value
, info); |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 767 { | 797 { |
| 768 if (!name->IsString()) | 798 if (!name->IsString()) |
| 769 return; | 799 return; |
| 770 auto nameString = name.As<v8::String>(); | 800 auto nameString = name.As<v8::String>(); |
| 771 if (info.Holder()->HasRealNamedProperty(nameString)) | 801 if (info.Holder()->HasRealNamedProperty(nameString)) |
| 772 return; | 802 return; |
| 773 if (!info.Holder()->GetRealNamedPropertyInPrototypeChain(nameString).IsEmpty
()) | 803 if (!info.Holder()->GetRealNamedPropertyInPrototypeChain(nameString).IsEmpty
()) |
| 774 return; | 804 return; |
| 775 | 805 |
| 776 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; | 806 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; |
| 777 TOSTRING_VOID(V8StringResource<>, propertyName, nameString); | 807 V8StringResource<> propertyName(nameString); |
| 778 TOSTRING_VOID(V8StringResource<>, propertyValue, v8Value); | 808 if (!propertyName.prepare()) |
| 809 return; |
| 810 V8StringResource<> propertyValue = v8Value; |
| 811 if (!propertyValue.prepare()) |
| 812 return; |
| 779 bool result = impl->anonymousNamedSetter(propertyName, propertyValue); | 813 bool result = impl->anonymousNamedSetter(propertyName, propertyValue); |
| 780 if (!result) | 814 if (!result) |
| 781 return; | 815 return; |
| 782 v8SetReturnValue(info, v8Value); | 816 v8SetReturnValue(info, v8Value); |
| 783 } | 817 } |
| 784 | 818 |
| 785 static void namedPropertySetterCallback(v8::Local<v8::Name> name, v8::Local<v8::
Value> v8Value, const v8::PropertyCallbackInfo<v8::Value>& info) | 819 static void namedPropertySetterCallback(v8::Local<v8::Name> name, v8::Local<v8::
Value> v8Value, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 786 { | 820 { |
| 787 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMNamedProperty"); | 821 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMNamedProperty"); |
| 788 TestInterface5ImplementationV8Internal::namedPropertySetter(name, v8Value, i
nfo); | 822 TestInterface5ImplementationV8Internal::namedPropertySetter(name, v8Value, i
nfo); |
| (...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1013 scriptWrappable->toImpl<TestInterface5Implementation>()->ref(); | 1047 scriptWrappable->toImpl<TestInterface5Implementation>()->ref(); |
| 1014 } | 1048 } |
| 1015 | 1049 |
| 1016 void V8TestInterface5::derefObject(ScriptWrappable* scriptWrappable) | 1050 void V8TestInterface5::derefObject(ScriptWrappable* scriptWrappable) |
| 1017 { | 1051 { |
| 1018 scriptWrappable->toImpl<TestInterface5Implementation>()->deref(); | 1052 scriptWrappable->toImpl<TestInterface5Implementation>()->deref(); |
| 1019 } | 1053 } |
| 1020 | 1054 |
| 1021 } // namespace blink | 1055 } // namespace blink |
| 1022 #endif // ENABLE(CONDITION) | 1056 #endif // ENABLE(CONDITION) |
| OLD | NEW |