| 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 if (result.isTestInterfaceGarbageCollected()) { |
| 6340 if (result0) { | 6341 v8SetReturnValue(info, result.getAsTestInterfaceGarbageCollected()); |
| 6341 v8SetReturnValue(info, result0.release()); | |
| 6342 return; | 6342 return; |
| 6343 } | 6343 } |
| 6344 if (!result1.isNull()) { | 6344 if (result.isString()) { |
| 6345 v8SetReturnValueString(info, result1, info.GetIsolate()); | 6345 v8SetReturnValueString(info, result.getAsString(), info.GetIsolate()); |
| 6346 return; | 6346 return; |
| 6347 } | 6347 } |
| 6348 v8SetReturnValueNull(info); | 6348 v8SetReturnValueNull(info); |
| 6349 } | 6349 } |
| 6350 | 6350 |
| 6351 static void testInterfaceGarbageCollectedOrDOMStringMethodMethodCallback(const v
8::FunctionCallbackInfo<v8::Value>& info) | 6351 static void testInterfaceGarbageCollectedOrDOMStringMethodMethodCallback(const v
8::FunctionCallbackInfo<v8::Value>& info) |
| 6352 { | 6352 { |
| 6353 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 6353 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 6354 TestObjectV8Internal::testInterfaceGarbageCollectedOrDOMStringMethodMethod(i
nfo); | 6354 TestObjectV8Internal::testInterfaceGarbageCollectedOrDOMStringMethodMethod(i
nfo); |
| 6355 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 6355 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 6356 } | 6356 } |
| 6357 | 6357 |
| 6358 static void testInterfaceWillBeGarbageCollectedOrTestDictionaryMethodMethod(cons
t v8::FunctionCallbackInfo<v8::Value>& info) | 6358 static void testInterfaceWillBeGarbageCollectedOrTestDictionaryMethodMethod(cons
t v8::FunctionCallbackInfo<v8::Value>& info) |
| 6359 { | 6359 { |
| 6360 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 6360 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 6361 RefPtrWillBeRawPtr<TestInterfaceWillBeGarbageCollected> result0 = nullptr; | 6361 TestInterfaceWillBeGarbageCollectedOrTestDictionary result; |
| 6362 Nullable<TestDictionary> result1; | 6362 impl->testInterfaceWillBeGarbageCollectedOrTestDictionaryMethod(result); |
| 6363 impl->testInterfaceWillBeGarbageCollectedOrTestDictionaryMethod(result0, res
ult1); | 6363 if (result.isTestInterfaceWillBeGarbageCollected()) { |
| 6364 if (result0) { | 6364 v8SetReturnValue(info, result.getAsTestInterfaceWillBeGarbageCollected()
); |
| 6365 v8SetReturnValue(info, result0.release()); | |
| 6366 return; | 6365 return; |
| 6367 } | 6366 } |
| 6368 if (result1) { | 6367 if (result.isTestDictionary()) { |
| 6369 v8SetReturnValue(info, result); | 6368 v8SetReturnValue(info, result); |
| 6370 return; | 6369 return; |
| 6371 } | 6370 } |
| 6372 v8SetReturnValueNull(info); | 6371 v8SetReturnValueNull(info); |
| 6373 } | 6372 } |
| 6374 | 6373 |
| 6375 static void testInterfaceWillBeGarbageCollectedOrTestDictionaryMethodMethodCallb
ack(const v8::FunctionCallbackInfo<v8::Value>& info) | 6374 static void testInterfaceWillBeGarbageCollectedOrTestDictionaryMethodMethodCallb
ack(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 6376 { | 6375 { |
| 6377 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 6376 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 6378 TestObjectV8Internal::testInterfaceWillBeGarbageCollectedOrTestDictionaryMet
hodMethod(info); | 6377 TestObjectV8Internal::testInterfaceWillBeGarbageCollectedOrTestDictionaryMet
hodMethod(info); |
| 6379 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 6378 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 6380 } | 6379 } |
| 6381 | 6380 |
| 6382 static void longSequenceOrDOMStringArrayOrUnrestrictedDoubleMethodMethod(const v
8::FunctionCallbackInfo<v8::Value>& info) | 6381 static void longSequenceOrDOMStringArrayOrUnrestrictedDoubleMethodMethod(const v
8::FunctionCallbackInfo<v8::Value>& info) |
| 6383 { | 6382 { |
| 6384 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 6383 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 6385 Nullable<Vector<int> > result0; | 6384 LongSequenceOrStringArrayOrUnrestrictedDouble result; |
| 6386 Nullable<Vector<String> > result1; | 6385 impl->longSequenceOrDOMStringArrayOrUnrestrictedDoubleMethod(result); |
| 6387 Nullable<double> result2; | 6386 if (result.isLongSequence()) { |
| 6388 impl->longSequenceOrDOMStringArrayOrUnrestrictedDoubleMethod(result0, result
1, result2); | 6387 v8SetReturnValue(info, v8Array(result.getAsLongSequence(), info.Holder()
, info.GetIsolate())); |
| 6389 if (result0) { | |
| 6390 v8SetReturnValue(info, v8Array(result0.get(), info.Holder(), info.GetIso
late())); | |
| 6391 return; | 6388 return; |
| 6392 } | 6389 } |
| 6393 if (result1) { | 6390 if (result.isStringArray()) { |
| 6394 v8SetReturnValue(info, v8Array(result1.get(), info.Holder(), info.GetIso
late())); | 6391 v8SetReturnValue(info, v8Array(result.getAsStringArray(), info.Holder(),
info.GetIsolate())); |
| 6395 return; | 6392 return; |
| 6396 } | 6393 } |
| 6397 if (result2) { | 6394 if (result.isUnrestrictedDouble()) { |
| 6398 v8SetReturnValue(info, result2.get()); | 6395 v8SetReturnValue(info, result.getAsUnrestrictedDouble()); |
| 6399 return; | 6396 return; |
| 6400 } | 6397 } |
| 6401 v8SetReturnValueNull(info); | 6398 v8SetReturnValueNull(info); |
| 6402 } | 6399 } |
| 6403 | 6400 |
| 6404 static void longSequenceOrDOMStringArrayOrUnrestrictedDoubleMethodMethodCallback
(const v8::FunctionCallbackInfo<v8::Value>& info) | 6401 static void longSequenceOrDOMStringArrayOrUnrestrictedDoubleMethodMethodCallback
(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 6405 { | 6402 { |
| 6406 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 6403 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 6407 TestObjectV8Internal::longSequenceOrDOMStringArrayOrUnrestrictedDoubleMethod
Method(info); | 6404 TestObjectV8Internal::longSequenceOrDOMStringArrayOrUnrestrictedDoubleMethod
Method(info); |
| 6408 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 6405 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| (...skipping 4764 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11173 return false; | 11170 return false; |
| 11174 | 11171 |
| 11175 ScriptState::Scope scope(scriptState); | 11172 ScriptState::Scope scope(scriptState); |
| 11176 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); | 11173 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); |
| 11177 | 11174 |
| 11178 ExceptionState exceptionState(ExceptionState::SetterContext, "enumForPrivate
Script", "TestObject", scriptState->context()->Global(), scriptState->isolate())
; | 11175 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)); | 11176 return PrivateScriptRunner::runDOMAttributeSetter(scriptState, scriptStateIn
UserScript, "TestObject", "enumForPrivateScript", holder, v8String(scriptState->
isolate(), cppValue)); |
| 11180 } | 11177 } |
| 11181 | 11178 |
| 11182 } // namespace blink | 11179 } // namespace blink |
| OLD | NEW |