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" |
(...skipping 1035 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1046 { | 1046 { |
1047 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 1047 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
1048 TestObjectV8Internal::promiseAttributeAttributeGetter(info); | 1048 TestObjectV8Internal::promiseAttributeAttributeGetter(info); |
1049 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1049 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
1050 } | 1050 } |
1051 | 1051 |
1052 static void promiseAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const
v8::PropertyCallbackInfo<void>& info) | 1052 static void promiseAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const
v8::PropertyCallbackInfo<void>& info) |
1053 { | 1053 { |
1054 v8::Handle<v8::Object> holder = info.Holder(); | 1054 v8::Handle<v8::Object> holder = info.Holder(); |
1055 TestObject* impl = V8TestObject::toImpl(holder); | 1055 TestObject* impl = V8TestObject::toImpl(holder); |
1056 TONATIVE_VOID(ScriptPromise, cppValue, ScriptPromise::cast(ScriptState::curr
ent(info.GetIsolate()), v8Value)); | 1056 ScriptPromise cppValue = ScriptPromise::cast(ScriptState::current(info.GetIs
olate()), v8Value); |
1057 impl->setPromiseAttribute(cppValue); | 1057 impl->setPromiseAttribute(cppValue); |
1058 } | 1058 } |
1059 | 1059 |
1060 static void promiseAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::L
ocal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 1060 static void promiseAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::L
ocal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
1061 { | 1061 { |
1062 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 1062 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
1063 TestObjectV8Internal::promiseAttributeAttributeSetter(v8Value, info); | 1063 TestObjectV8Internal::promiseAttributeAttributeSetter(v8Value, info); |
1064 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1064 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
1065 } | 1065 } |
1066 | 1066 |
(...skipping 5643 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6710 | 6710 |
6711 static void voidMethodPromiseArgMethod(const v8::FunctionCallbackInfo<v8::Value>
& info) | 6711 static void voidMethodPromiseArgMethod(const v8::FunctionCallbackInfo<v8::Value>
& info) |
6712 { | 6712 { |
6713 if (UNLIKELY(info.Length() < 1)) { | 6713 if (UNLIKELY(info.Length() < 1)) { |
6714 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodPromiseArg", "TestObject", 1, info.Length(), info.GetIsolate()), info.G
etIsolate()); | 6714 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v
oidMethodPromiseArg", "TestObject", 1, info.Length(), info.GetIsolate()), info.G
etIsolate()); |
6715 return; | 6715 return; |
6716 } | 6716 } |
6717 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 6717 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
6718 ScriptPromise promiseArg; | 6718 ScriptPromise promiseArg; |
6719 { | 6719 { |
6720 v8::TryCatch block; | 6720 promiseArg = ScriptPromise::cast(ScriptState::current(info.GetIsolate())
, info[0]); |
6721 V8RethrowTryCatchScope rethrow(block); | |
6722 TONATIVE_VOID_INTERNAL(promiseArg, ScriptPromise::cast(ScriptState::curr
ent(info.GetIsolate()), info[0])); | |
6723 if (!promiseArg.isUndefinedOrNull() && !promiseArg.isObject()) { | 6721 if (!promiseArg.isUndefinedOrNull() && !promiseArg.isObject()) { |
6724 V8ThrowException::throwTypeError(ExceptionMessages::failedToExecute(
"voidMethodPromiseArg", "TestObject", "parameter 1 ('promiseArg') is not an obje
ct."), info.GetIsolate()); | 6722 V8ThrowException::throwTypeError(ExceptionMessages::failedToExecute(
"voidMethodPromiseArg", "TestObject", "parameter 1 ('promiseArg') is not an obje
ct."), info.GetIsolate()); |
6725 return; | 6723 return; |
6726 } | 6724 } |
6727 } | 6725 } |
6728 impl->voidMethodPromiseArg(promiseArg); | 6726 impl->voidMethodPromiseArg(promiseArg); |
6729 } | 6727 } |
6730 | 6728 |
6731 static void voidMethodPromiseArgMethodCallback(const v8::FunctionCallbackInfo<v8
::Value>& info) | 6729 static void voidMethodPromiseArgMethodCallback(const v8::FunctionCallbackInfo<v8
::Value>& info) |
6732 { | 6730 { |
(...skipping 4325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11058 return false; | 11056 return false; |
11059 | 11057 |
11060 ScriptState::Scope scope(scriptState); | 11058 ScriptState::Scope scope(scriptState); |
11061 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); | 11059 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); |
11062 | 11060 |
11063 ExceptionState exceptionState(ExceptionState::SetterContext, "enumForPrivate
Script", "TestObject", scriptState->context()->Global(), scriptState->isolate())
; | 11061 ExceptionState exceptionState(ExceptionState::SetterContext, "enumForPrivate
Script", "TestObject", scriptState->context()->Global(), scriptState->isolate())
; |
11064 return PrivateScriptRunner::runDOMAttributeSetter(scriptState, scriptStateIn
UserScript, "TestObject", "enumForPrivateScript", holder, v8String(scriptState->
isolate(), cppValue)); | 11062 return PrivateScriptRunner::runDOMAttributeSetter(scriptState, scriptStateIn
UserScript, "TestObject", "enumForPrivateScript", holder, v8String(scriptState->
isolate(), cppValue)); |
11065 } | 11063 } |
11066 | 11064 |
11067 } // namespace blink | 11065 } // namespace blink |
OLD | NEW |