| 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 "V8TestObject.h" | 8 #include "V8TestObject.h" |
| 9 | 9 |
| 10 #include "bindings/core/v8/BindingSecurity.h" | 10 #include "bindings/core/v8/BindingSecurity.h" |
| 11 #include "bindings/core/v8/Dictionary.h" | 11 #include "bindings/core/v8/Dictionary.h" |
| 12 #include "bindings/core/v8/ExceptionState.h" | 12 #include "bindings/core/v8/ExceptionState.h" |
| 13 #include "bindings/core/v8/PrivateScriptRunner.h" | 13 #include "bindings/core/v8/PrivateScriptRunner.h" |
| 14 #include "bindings/core/v8/ScriptCallStackFactory.h" | 14 #include "bindings/core/v8/ScriptCallStackFactory.h" |
| 15 #include "bindings/core/v8/ScriptPromise.h" | 15 #include "bindings/core/v8/ScriptPromise.h" |
| 16 #include "bindings/core/v8/ScriptState.h" | 16 #include "bindings/core/v8/ScriptState.h" |
| 17 #include "bindings/core/v8/ScriptValue.h" | 17 #include "bindings/core/v8/ScriptValue.h" |
| 18 #include "bindings/core/v8/SerializedScriptValue.h" | 18 #include "bindings/core/v8/SerializedScriptValue.h" |
| 19 #include "bindings/core/v8/UnionTypesCore.h" |
| 19 #include "bindings/core/v8/V8AbstractEventListener.h" | 20 #include "bindings/core/v8/V8AbstractEventListener.h" |
| 20 #include "bindings/core/v8/V8ArrayBuffer.h" | 21 #include "bindings/core/v8/V8ArrayBuffer.h" |
| 21 #include "bindings/core/v8/V8ArrayBufferView.h" | 22 #include "bindings/core/v8/V8ArrayBufferView.h" |
| 22 #include "bindings/core/v8/V8Attr.h" | 23 #include "bindings/core/v8/V8Attr.h" |
| 23 #include "bindings/core/v8/V8DOMActivityLogger.h" | 24 #include "bindings/core/v8/V8DOMActivityLogger.h" |
| 24 #include "bindings/core/v8/V8DOMConfiguration.h" | 25 #include "bindings/core/v8/V8DOMConfiguration.h" |
| 25 #include "bindings/core/v8/V8Document.h" | 26 #include "bindings/core/v8/V8Document.h" |
| 26 #include "bindings/core/v8/V8DocumentFragment.h" | 27 #include "bindings/core/v8/V8DocumentFragment.h" |
| 27 #include "bindings/core/v8/V8DocumentType.h" | 28 #include "bindings/core/v8/V8DocumentType.h" |
| 28 #include "bindings/core/v8/V8Element.h" | 29 #include "bindings/core/v8/V8Element.h" |
| (...skipping 6298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6327 static void nullableLongSequenceMethodMethodCallback(const v8::FunctionCallbackI
nfo<v8::Value>& info) | 6328 static void nullableLongSequenceMethodMethodCallback(const v8::FunctionCallbackI
nfo<v8::Value>& info) |
| 6328 { | 6329 { |
| 6329 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 6330 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 6330 TestObjectV8Internal::nullableLongSequenceMethodMethod(info); | 6331 TestObjectV8Internal::nullableLongSequenceMethodMethod(info); |
| 6331 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 6332 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 6332 } | 6333 } |
| 6333 | 6334 |
| 6334 static void testInterfaceGarbageCollectedOrDOMStringMethodMethod(const v8::Funct
ionCallbackInfo<v8::Value>& info) | 6335 static void testInterfaceGarbageCollectedOrDOMStringMethodMethod(const v8::Funct
ionCallbackInfo<v8::Value>& info) |
| 6335 { | 6336 { |
| 6336 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 6337 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 6337 RawPtr<TestInterfaceGarbageCollected> result0 = nullptr; | 6338 TestInterfaceGarbageCollectedOrString result; |
| 6338 String result1; | 6339 impl->testInterfaceGarbageCollectedOrDOMStringMethod(result); |
| 6339 impl->testInterfaceGarbageCollectedOrDOMStringMethod(result0, result1); | 6340 v8SetReturnValue(info, result); |
| 6340 if (result0) { | |
| 6341 v8SetReturnValue(info, result0.release()); | |
| 6342 return; | |
| 6343 } | |
| 6344 if (!result1.isNull()) { | |
| 6345 v8SetReturnValueString(info, result1, info.GetIsolate()); | |
| 6346 return; | |
| 6347 } | |
| 6348 v8SetReturnValueNull(info); | |
| 6349 } | 6341 } |
| 6350 | 6342 |
| 6351 static void testInterfaceGarbageCollectedOrDOMStringMethodMethodCallback(const v
8::FunctionCallbackInfo<v8::Value>& info) | 6343 static void testInterfaceGarbageCollectedOrDOMStringMethodMethodCallback(const v
8::FunctionCallbackInfo<v8::Value>& info) |
| 6352 { | 6344 { |
| 6353 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 6345 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 6354 TestObjectV8Internal::testInterfaceGarbageCollectedOrDOMStringMethodMethod(i
nfo); | 6346 TestObjectV8Internal::testInterfaceGarbageCollectedOrDOMStringMethodMethod(i
nfo); |
| 6355 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 6347 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 6356 } | 6348 } |
| 6357 | 6349 |
| 6358 static void testInterfaceWillBeGarbageCollectedOrTestDictionaryMethodMethod(cons
t v8::FunctionCallbackInfo<v8::Value>& info) | 6350 static void testInterfaceWillBeGarbageCollectedOrTestDictionaryMethodMethod(cons
t v8::FunctionCallbackInfo<v8::Value>& info) |
| 6359 { | 6351 { |
| 6360 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 6352 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 6361 RefPtrWillBeRawPtr<TestInterfaceWillBeGarbageCollected> result0 = nullptr; | 6353 TestInterfaceWillBeGarbageCollectedOrTestDictionary result; |
| 6362 Nullable<TestDictionary> result1; | 6354 impl->testInterfaceWillBeGarbageCollectedOrTestDictionaryMethod(result); |
| 6363 impl->testInterfaceWillBeGarbageCollectedOrTestDictionaryMethod(result0, res
ult1); | 6355 v8SetReturnValue(info, result); |
| 6364 if (result0) { | |
| 6365 v8SetReturnValue(info, result0.release()); | |
| 6366 return; | |
| 6367 } | |
| 6368 if (result1) { | |
| 6369 v8SetReturnValue(info, result); | |
| 6370 return; | |
| 6371 } | |
| 6372 v8SetReturnValueNull(info); | |
| 6373 } | 6356 } |
| 6374 | 6357 |
| 6375 static void testInterfaceWillBeGarbageCollectedOrTestDictionaryMethodMethodCallb
ack(const v8::FunctionCallbackInfo<v8::Value>& info) | 6358 static void testInterfaceWillBeGarbageCollectedOrTestDictionaryMethodMethodCallb
ack(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 6376 { | 6359 { |
| 6377 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 6360 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 6378 TestObjectV8Internal::testInterfaceWillBeGarbageCollectedOrTestDictionaryMet
hodMethod(info); | 6361 TestObjectV8Internal::testInterfaceWillBeGarbageCollectedOrTestDictionaryMet
hodMethod(info); |
| 6379 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 6362 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 6380 } | 6363 } |
| 6381 | 6364 |
| 6382 static void longSequenceOrDOMStringArrayOrUnrestrictedDoubleMethodMethod(const v
8::FunctionCallbackInfo<v8::Value>& info) | 6365 static void longSequenceOrDOMStringArrayOrUnrestrictedDoubleMethodMethod(const v
8::FunctionCallbackInfo<v8::Value>& info) |
| 6383 { | 6366 { |
| 6384 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 6367 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 6385 Nullable<Vector<int> > result0; | 6368 LongSequenceOrStringArrayOrUnrestrictedDouble result; |
| 6386 Nullable<Vector<String> > result1; | 6369 impl->longSequenceOrDOMStringArrayOrUnrestrictedDoubleMethod(result); |
| 6387 Nullable<double> result2; | 6370 v8SetReturnValue(info, result); |
| 6388 impl->longSequenceOrDOMStringArrayOrUnrestrictedDoubleMethod(result0, result
1, result2); | |
| 6389 if (result0) { | |
| 6390 v8SetReturnValue(info, v8Array(result0.get(), info.Holder(), info.GetIso
late())); | |
| 6391 return; | |
| 6392 } | |
| 6393 if (result1) { | |
| 6394 v8SetReturnValue(info, v8Array(result1.get(), info.Holder(), info.GetIso
late())); | |
| 6395 return; | |
| 6396 } | |
| 6397 if (result2) { | |
| 6398 v8SetReturnValue(info, result2.get()); | |
| 6399 return; | |
| 6400 } | |
| 6401 v8SetReturnValueNull(info); | |
| 6402 } | 6371 } |
| 6403 | 6372 |
| 6404 static void longSequenceOrDOMStringArrayOrUnrestrictedDoubleMethodMethodCallback
(const v8::FunctionCallbackInfo<v8::Value>& info) | 6373 static void longSequenceOrDOMStringArrayOrUnrestrictedDoubleMethodMethodCallback
(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 6405 { | 6374 { |
| 6406 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 6375 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 6407 TestObjectV8Internal::longSequenceOrDOMStringArrayOrUnrestrictedDoubleMethod
Method(info); | 6376 TestObjectV8Internal::longSequenceOrDOMStringArrayOrUnrestrictedDoubleMethod
Method(info); |
| 6408 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 6377 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 6409 } | 6378 } |
| 6410 | 6379 |
| 6411 static void voidMethodTestInterfaceEmptyOrNullArgMethod(const v8::FunctionCallba
ckInfo<v8::Value>& info) | 6380 static void voidMethodTestInterfaceEmptyOrNullArgMethod(const v8::FunctionCallba
ckInfo<v8::Value>& info) |
| (...skipping 4761 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11173 return false; | 11142 return false; |
| 11174 | 11143 |
| 11175 ScriptState::Scope scope(scriptState); | 11144 ScriptState::Scope scope(scriptState); |
| 11176 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); | 11145 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); |
| 11177 | 11146 |
| 11178 ExceptionState exceptionState(ExceptionState::SetterContext, "enumForPrivate
Script", "TestObject", scriptState->context()->Global(), scriptState->isolate())
; | 11147 ExceptionState exceptionState(ExceptionState::SetterContext, "enumForPrivate
Script", "TestObject", scriptState->context()->Global(), scriptState->isolate())
; |
| 11179 return PrivateScriptRunner::runDOMAttributeSetter(scriptState, scriptStateIn
UserScript, "TestObject", "enumForPrivateScript", holder, v8String(scriptState->
isolate(), cppValue)); | 11148 return PrivateScriptRunner::runDOMAttributeSetter(scriptState, scriptStateIn
UserScript, "TestObject", "enumForPrivateScript", holder, v8String(scriptState->
isolate(), cppValue)); |
| 11180 } | 11149 } |
| 11181 | 11150 |
| 11182 } // namespace blink | 11151 } // namespace blink |
| OLD | NEW |