| 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 "V8TestInterfaceGarbageCollected.h" | 8 #include "V8TestInterfaceGarbageCollected.h" |
| 9 | 9 |
| 10 #include "bindings/core/v8/ExceptionState.h" | 10 #include "bindings/core/v8/ExceptionState.h" |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 151 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
| 152 exceptionState.throwIfNeeded(); | 152 exceptionState.throwIfNeeded(); |
| 153 return; | 153 return; |
| 154 } | 154 } |
| 155 TestInterfaceGarbageCollected* impl = V8TestInterfaceGarbageCollected::toImp
l(info.Holder()); | 155 TestInterfaceGarbageCollected* impl = V8TestInterfaceGarbageCollected::toImp
l(info.Holder()); |
| 156 ScriptValue callback; | 156 ScriptValue callback; |
| 157 ScriptValue thisArg; | 157 ScriptValue thisArg; |
| 158 { | 158 { |
| 159 if (!info[0]->IsFunction()) { | 159 if (!info[0]->IsFunction()) { |
| 160 exceptionState.throwTypeError("The callback provided as parameter 1
is not a function."); | 160 exceptionState.throwTypeError("The callback provided as parameter 1
is not a function."); |
| 161 exceptionState.throwIfNeeded(); | 161 exceptionState.throwIfNeeded(); |
| 162 return; | 162 return; |
| 163 } | 163 } |
| 164 callback = ScriptValue(ScriptState::current(info.GetIsolate()), info[0])
; | 164 callback = ScriptValue(ScriptState::current(info.GetIsolate()), info[0])
; |
| 165 thisArg = ScriptValue(ScriptState::current(info.GetIsolate()), info[1]); | 165 thisArg = ScriptValue(ScriptState::current(info.GetIsolate()), info[1]); |
| 166 } | 166 } |
| 167 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); | 167 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
| 168 impl->forEachForBinding(scriptState, ScriptValue(scriptState, info.This()),
callback, thisArg, exceptionState); | 168 impl->forEachForBinding(scriptState, ScriptValue(scriptState, info.This()),
callback, thisArg, exceptionState); |
| 169 if (exceptionState.hadException()) { | 169 if (exceptionState.hadException()) { |
| 170 exceptionState.throwIfNeeded(); | 170 exceptionState.throwIfNeeded(); |
| 171 return; | 171 return; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 183 { | 183 { |
| 184 ExceptionState exceptionState(ExceptionState::ExecutionContext, "has", "Test
InterfaceGarbageCollected", info.Holder(), info.GetIsolate()); | 184 ExceptionState exceptionState(ExceptionState::ExecutionContext, "has", "Test
InterfaceGarbageCollected", info.Holder(), info.GetIsolate()); |
| 185 if (UNLIKELY(info.Length() < 1)) { | 185 if (UNLIKELY(info.Length() < 1)) { |
| 186 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 186 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
| 187 exceptionState.throwIfNeeded(); | 187 exceptionState.throwIfNeeded(); |
| 188 return; | 188 return; |
| 189 } | 189 } |
| 190 TestInterfaceGarbageCollected* impl = V8TestInterfaceGarbageCollected::toImp
l(info.Holder()); | 190 TestInterfaceGarbageCollected* impl = V8TestInterfaceGarbageCollected::toImp
l(info.Holder()); |
| 191 V8StringResource<> value; | 191 V8StringResource<> value; |
| 192 { | 192 { |
| 193 TOSTRING_VOID_INTERNAL(value, info[0]); | 193 TONATIVE_CONVERT((value = info[0]).prepare(), return); |
| 194 } | 194 } |
| 195 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); | 195 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
| 196 bool result = impl->hasForBinding(scriptState, value, exceptionState); | 196 bool result = impl->hasForBinding(scriptState, value, exceptionState); |
| 197 if (exceptionState.hadException()) { | 197 if (exceptionState.hadException()) { |
| 198 exceptionState.throwIfNeeded(); | 198 exceptionState.throwIfNeeded(); |
| 199 return; | 199 return; |
| 200 } | 200 } |
| 201 v8SetReturnValueBool(info, result); | 201 v8SetReturnValueBool(info, result); |
| 202 } | 202 } |
| 203 | 203 |
| 204 static void hasMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) | 204 static void hasMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 205 { | 205 { |
| 206 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 206 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 207 TestInterfaceGarbageCollectedV8Internal::hasMethod(info); | 207 TestInterfaceGarbageCollectedV8Internal::hasMethod(info); |
| 208 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 208 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 209 } | 209 } |
| 210 | 210 |
| 211 static void addMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 211 static void addMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 212 { | 212 { |
| 213 ExceptionState exceptionState(ExceptionState::ExecutionContext, "add", "Test
InterfaceGarbageCollected", info.Holder(), info.GetIsolate()); | 213 ExceptionState exceptionState(ExceptionState::ExecutionContext, "add", "Test
InterfaceGarbageCollected", info.Holder(), info.GetIsolate()); |
| 214 if (UNLIKELY(info.Length() < 1)) { | 214 if (UNLIKELY(info.Length() < 1)) { |
| 215 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 215 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
| 216 exceptionState.throwIfNeeded(); | 216 exceptionState.throwIfNeeded(); |
| 217 return; | 217 return; |
| 218 } | 218 } |
| 219 TestInterfaceGarbageCollected* impl = V8TestInterfaceGarbageCollected::toImp
l(info.Holder()); | 219 TestInterfaceGarbageCollected* impl = V8TestInterfaceGarbageCollected::toImp
l(info.Holder()); |
| 220 V8StringResource<> value; | 220 V8StringResource<> value; |
| 221 { | 221 { |
| 222 TOSTRING_VOID_INTERNAL(value, info[0]); | 222 TONATIVE_CONVERT((value = info[0]).prepare(), return); |
| 223 } | 223 } |
| 224 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); | 224 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
| 225 RawPtr<TestInterfaceGarbageCollected> result = impl->addForBinding(scriptSta
te, value, exceptionState); | 225 RawPtr<TestInterfaceGarbageCollected> result = impl->addForBinding(scriptSta
te, value, exceptionState); |
| 226 if (exceptionState.hadException()) { | 226 if (exceptionState.hadException()) { |
| 227 exceptionState.throwIfNeeded(); | 227 exceptionState.throwIfNeeded(); |
| 228 return; | 228 return; |
| 229 } | 229 } |
| 230 v8SetReturnValue(info, result.release()); | 230 v8SetReturnValue(info, result.release()); |
| 231 } | 231 } |
| 232 | 232 |
| (...skipping 27 matching lines...) Expand all Loading... |
| 260 { | 260 { |
| 261 ExceptionState exceptionState(ExceptionState::ExecutionContext, "delete", "T
estInterfaceGarbageCollected", info.Holder(), info.GetIsolate()); | 261 ExceptionState exceptionState(ExceptionState::ExecutionContext, "delete", "T
estInterfaceGarbageCollected", info.Holder(), info.GetIsolate()); |
| 262 if (UNLIKELY(info.Length() < 1)) { | 262 if (UNLIKELY(info.Length() < 1)) { |
| 263 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 263 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
| 264 exceptionState.throwIfNeeded(); | 264 exceptionState.throwIfNeeded(); |
| 265 return; | 265 return; |
| 266 } | 266 } |
| 267 TestInterfaceGarbageCollected* impl = V8TestInterfaceGarbageCollected::toImp
l(info.Holder()); | 267 TestInterfaceGarbageCollected* impl = V8TestInterfaceGarbageCollected::toImp
l(info.Holder()); |
| 268 V8StringResource<> value; | 268 V8StringResource<> value; |
| 269 { | 269 { |
| 270 TOSTRING_VOID_INTERNAL(value, info[0]); | 270 TONATIVE_CONVERT((value = info[0]).prepare(), return); |
| 271 } | 271 } |
| 272 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); | 272 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
| 273 bool result = impl->deleteForBinding(scriptState, value, exceptionState); | 273 bool result = impl->deleteForBinding(scriptState, value, exceptionState); |
| 274 if (exceptionState.hadException()) { | 274 if (exceptionState.hadException()) { |
| 275 exceptionState.throwIfNeeded(); | 275 exceptionState.throwIfNeeded(); |
| 276 return; | 276 return; |
| 277 } | 277 } |
| 278 v8SetReturnValueBool(info, result); | 278 v8SetReturnValueBool(info, result); |
| 279 } | 279 } |
| 280 | 280 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 306 } | 306 } |
| 307 | 307 |
| 308 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info) | 308 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 309 { | 309 { |
| 310 if (UNLIKELY(info.Length() < 1)) { | 310 if (UNLIKELY(info.Length() < 1)) { |
| 311 V8ThrowException::throwException(createMinimumArityTypeErrorForConstruct
or(info.GetIsolate(), "TestInterfaceGarbageCollected", 1, info.Length()), info.G
etIsolate()); | 311 V8ThrowException::throwException(createMinimumArityTypeErrorForConstruct
or(info.GetIsolate(), "TestInterfaceGarbageCollected", 1, info.Length()), info.G
etIsolate()); |
| 312 return; | 312 return; |
| 313 } | 313 } |
| 314 V8StringResource<> str; | 314 V8StringResource<> str; |
| 315 { | 315 { |
| 316 TOSTRING_VOID_INTERNAL(str, info[0]); | 316 TONATIVE_CONVERT((str = info[0]).prepare(), return); |
| 317 } | 317 } |
| 318 RawPtr<TestInterfaceGarbageCollected> impl = TestInterfaceGarbageCollected::
create(str); | 318 RawPtr<TestInterfaceGarbageCollected> impl = TestInterfaceGarbageCollected::
create(str); |
| 319 v8::Local<v8::Object> wrapper = info.Holder(); | 319 v8::Local<v8::Object> wrapper = info.Holder(); |
| 320 impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceGarbageCollect
ed::wrapperTypeInfo, wrapper); | 320 impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceGarbageCollect
ed::wrapperTypeInfo, wrapper); |
| 321 v8SetReturnValue(info, wrapper); | 321 v8SetReturnValue(info, wrapper); |
| 322 } | 322 } |
| 323 | 323 |
| 324 } // namespace TestInterfaceGarbageCollectedV8Internal | 324 } // namespace TestInterfaceGarbageCollectedV8Internal |
| 325 | 325 |
| 326 static const V8DOMConfiguration::AttributeConfiguration V8TestInterfaceGarbageCo
llectedAttributes[] = { | 326 static const V8DOMConfiguration::AttributeConfiguration V8TestInterfaceGarbageCo
llectedAttributes[] = { |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 399 | 399 |
| 400 void V8TestInterfaceGarbageCollected::refObject(ScriptWrappable* scriptWrappable
) | 400 void V8TestInterfaceGarbageCollected::refObject(ScriptWrappable* scriptWrappable
) |
| 401 { | 401 { |
| 402 } | 402 } |
| 403 | 403 |
| 404 void V8TestInterfaceGarbageCollected::derefObject(ScriptWrappable* scriptWrappab
le) | 404 void V8TestInterfaceGarbageCollected::derefObject(ScriptWrappable* scriptWrappab
le) |
| 405 { | 405 { |
| 406 } | 406 } |
| 407 | 407 |
| 408 } // namespace blink | 408 } // namespace blink |
| OLD | NEW |