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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 #include "core/dom/ContextFeatures.h" | 56 #include "core/dom/ContextFeatures.h" |
57 #include "core/dom/Document.h" | 57 #include "core/dom/Document.h" |
58 #include "core/dom/TagCollection.h" | 58 #include "core/dom/TagCollection.h" |
59 #include "core/dom/custom/CustomElementProcessingStack.h" | 59 #include "core/dom/custom/CustomElementProcessingStack.h" |
60 #include "core/frame/LocalFrame.h" | 60 #include "core/frame/LocalFrame.h" |
61 #include "core/frame/UseCounter.h" | 61 #include "core/frame/UseCounter.h" |
62 #include "core/html/HTMLCollection.h" | 62 #include "core/html/HTMLCollection.h" |
63 #include "core/html/HTMLDataListOptionsCollection.h" | 63 #include "core/html/HTMLDataListOptionsCollection.h" |
64 #include "core/html/HTMLFormControlsCollection.h" | 64 #include "core/html/HTMLFormControlsCollection.h" |
65 #include "core/html/HTMLTableRowsCollection.h" | 65 #include "core/html/HTMLTableRowsCollection.h" |
| 66 #include "core/inspector/ConsoleMessage.h" |
66 #include "core/inspector/ScriptArguments.h" | 67 #include "core/inspector/ScriptArguments.h" |
67 #include "platform/RuntimeEnabledFeatures.h" | 68 #include "platform/RuntimeEnabledFeatures.h" |
68 #include "platform/ScriptForbiddenScope.h" | 69 #include "platform/ScriptForbiddenScope.h" |
69 #include "platform/TraceEvent.h" | 70 #include "platform/TraceEvent.h" |
70 #include "wtf/GetPtr.h" | 71 #include "wtf/GetPtr.h" |
71 #include "wtf/RefPtr.h" | 72 #include "wtf/RefPtr.h" |
72 | 73 |
73 namespace blink { | 74 namespace blink { |
74 | 75 |
75 const WrapperTypeInfo V8TestObject::wrapperTypeInfo = { gin::kEmbedderBlink, V8T
estObject::domTemplate, V8TestObject::refObject, V8TestObject::derefObject, V8Te
stObject::trace, 0, 0, V8TestObject::installConditionallyEnabledMethods, V8TestO
bject::installConditionallyEnabledProperties, "TestObject", 0, WrapperTypeInfo::
WrapperTypeObjectPrototype, WrapperTypeInfo::ObjectClassId, WrapperTypeInfo::Not
InheritFromEventTarget, WrapperTypeInfo::Independent, WrapperTypeInfo::RefCounte
dObject }; | 76 const WrapperTypeInfo V8TestObject::wrapperTypeInfo = { gin::kEmbedderBlink, V8T
estObject::domTemplate, V8TestObject::refObject, V8TestObject::derefObject, V8Te
stObject::trace, 0, 0, V8TestObject::installConditionallyEnabledMethods, V8TestO
bject::installConditionallyEnabledProperties, "TestObject", 0, WrapperTypeInfo::
WrapperTypeObjectPrototype, WrapperTypeInfo::ObjectClassId, WrapperTypeInfo::Not
InheritFromEventTarget, WrapperTypeInfo::Independent, WrapperTypeInfo::RefCounte
dObject }; |
(...skipping 1640 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1716 } | 1717 } |
1717 | 1718 |
1718 static void testEnumAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const
v8::PropertyCallbackInfo<void>& info) | 1719 static void testEnumAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const
v8::PropertyCallbackInfo<void>& info) |
1719 { | 1720 { |
1720 v8::Local<v8::Object> holder = info.Holder(); | 1721 v8::Local<v8::Object> holder = info.Holder(); |
1721 TestObject* impl = V8TestObject::toImpl(holder); | 1722 TestObject* impl = V8TestObject::toImpl(holder); |
1722 V8StringResource<> cppValue = v8Value; | 1723 V8StringResource<> cppValue = v8Value; |
1723 if (!cppValue.prepare()) | 1724 if (!cppValue.prepare()) |
1724 return; | 1725 return; |
1725 String string = cppValue; | 1726 String string = cppValue; |
1726 if (!(string == "" || string == "EnumValue1" || string == "EnumValue2" || st
ring == "EnumValue3")) | 1727 if (!(string == "" || string == "EnumValue1" || string == "EnumValue2" || st
ring == "EnumValue3")) { |
| 1728 currentExecutionContext(info.GetIsolate())->addConsoleMessage(ConsoleMes
sage::create(JSMessageSource, WarningMessageLevel, "The provided value '" + stri
ng + "' is not a valid value of type 'TestEnum'.")); |
1727 return; | 1729 return; |
| 1730 } |
1728 impl->setTestEnumAttribute(cppValue); | 1731 impl->setTestEnumAttribute(cppValue); |
1729 } | 1732 } |
1730 | 1733 |
1731 static void testEnumAttributeAttributeSetterCallback(v8::Local<v8::Name>, v8::Lo
cal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 1734 static void testEnumAttributeAttributeSetterCallback(v8::Local<v8::Name>, v8::Lo
cal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
1732 { | 1735 { |
1733 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 1736 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
1734 TestObjectV8Internal::testEnumAttributeAttributeSetter(v8Value, info); | 1737 TestObjectV8Internal::testEnumAttributeAttributeSetter(v8Value, info); |
1735 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1738 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
1736 } | 1739 } |
1737 | 1740 |
(...skipping 12 matching lines...) Expand all Loading... |
1750 } | 1753 } |
1751 | 1754 |
1752 static void testEnumOrNullAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) | 1755 static void testEnumOrNullAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) |
1753 { | 1756 { |
1754 v8::Local<v8::Object> holder = info.Holder(); | 1757 v8::Local<v8::Object> holder = info.Holder(); |
1755 TestObject* impl = V8TestObject::toImpl(holder); | 1758 TestObject* impl = V8TestObject::toImpl(holder); |
1756 V8StringResource<TreatNullAsNullString> cppValue = v8Value; | 1759 V8StringResource<TreatNullAsNullString> cppValue = v8Value; |
1757 if (!cppValue.prepare()) | 1760 if (!cppValue.prepare()) |
1758 return; | 1761 return; |
1759 String string = cppValue; | 1762 String string = cppValue; |
1760 if (!(string == "" || string == "EnumValue1" || string == "EnumValue2" || st
ring == "EnumValue3")) | 1763 if (!(string == "" || string == "EnumValue1" || string == "EnumValue2" || st
ring == "EnumValue3")) { |
| 1764 currentExecutionContext(info.GetIsolate())->addConsoleMessage(ConsoleMes
sage::create(JSMessageSource, WarningMessageLevel, "The provided value '" + stri
ng + "' is not a valid value of type 'TestEnum'.")); |
1761 return; | 1765 return; |
| 1766 } |
1762 impl->setTestEnumOrNullAttribute(cppValue); | 1767 impl->setTestEnumOrNullAttribute(cppValue); |
1763 } | 1768 } |
1764 | 1769 |
1765 static void testEnumOrNullAttributeAttributeSetterCallback(v8::Local<v8::Name>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 1770 static void testEnumOrNullAttributeAttributeSetterCallback(v8::Local<v8::Name>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
1766 { | 1771 { |
1767 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 1772 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
1768 TestObjectV8Internal::testEnumOrNullAttributeAttributeSetter(v8Value, info); | 1773 TestObjectV8Internal::testEnumOrNullAttributeAttributeSetter(v8Value, info); |
1769 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1774 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
1770 } | 1775 } |
1771 | 1776 |
(...skipping 3750 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5522 } | 5527 } |
5523 | 5528 |
5524 static void enumForPrivateScriptAttributeSetter(v8::Local<v8::Value> v8Value, co
nst v8::PropertyCallbackInfo<void>& info) | 5529 static void enumForPrivateScriptAttributeSetter(v8::Local<v8::Value> v8Value, co
nst v8::PropertyCallbackInfo<void>& info) |
5525 { | 5530 { |
5526 v8::Local<v8::Object> holder = info.Holder(); | 5531 v8::Local<v8::Object> holder = info.Holder(); |
5527 TestObject* impl = V8TestObject::toImpl(holder); | 5532 TestObject* impl = V8TestObject::toImpl(holder); |
5528 V8StringResource<> cppValue = v8Value; | 5533 V8StringResource<> cppValue = v8Value; |
5529 if (!cppValue.prepare()) | 5534 if (!cppValue.prepare()) |
5530 return; | 5535 return; |
5531 String string = cppValue; | 5536 String string = cppValue; |
5532 if (!(string == "" || string == "EnumValue1" || string == "EnumValue2" || st
ring == "EnumValue3")) | 5537 if (!(string == "" || string == "EnumValue1" || string == "EnumValue2" || st
ring == "EnumValue3")) { |
| 5538 currentExecutionContext(info.GetIsolate())->addConsoleMessage(ConsoleMes
sage::create(JSMessageSource, WarningMessageLevel, "The provided value '" + stri
ng + "' is not a valid value of type 'TestEnum'.")); |
5533 return; | 5539 return; |
| 5540 } |
5534 V8TestObject::PrivateScript::enumForPrivateScriptAttributeSetter(toLocalFram
e(toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext())), impl, cppValue)
; | 5541 V8TestObject::PrivateScript::enumForPrivateScriptAttributeSetter(toLocalFram
e(toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext())), impl, cppValue)
; |
5535 } | 5542 } |
5536 | 5543 |
5537 static void enumForPrivateScriptAttributeSetterCallback(v8::Local<v8::Name>, v8:
:Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 5544 static void enumForPrivateScriptAttributeSetterCallback(v8::Local<v8::Name>, v8:
:Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
5538 { | 5545 { |
5539 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 5546 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
5540 TestObjectV8Internal::enumForPrivateScriptAttributeSetter(v8Value, info); | 5547 TestObjectV8Internal::enumForPrivateScriptAttributeSetter(v8Value, info); |
5541 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 5548 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
5542 } | 5549 } |
5543 | 5550 |
(...skipping 7644 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
13188 return false; | 13195 return false; |
13189 | 13196 |
13190 ScriptState::Scope scope(scriptState); | 13197 ScriptState::Scope scope(scriptState); |
13191 v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Globa
l(), scriptState->isolate()); | 13198 v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Globa
l(), scriptState->isolate()); |
13192 | 13199 |
13193 ExceptionState exceptionState(ExceptionState::SetterContext, "enumForPrivate
Script", "TestObject", scriptState->context()->Global(), scriptState->isolate())
; | 13200 ExceptionState exceptionState(ExceptionState::SetterContext, "enumForPrivate
Script", "TestObject", scriptState->context()->Global(), scriptState->isolate())
; |
13194 return PrivateScriptRunner::runDOMAttributeSetter(scriptState, scriptStateIn
UserScript, "TestObject", "enumForPrivateScript", holder, v8String(scriptState->
isolate(), cppValue)); | 13201 return PrivateScriptRunner::runDOMAttributeSetter(scriptState, scriptStateIn
UserScript, "TestObject", "enumForPrivateScript", holder, v8String(scriptState->
isolate(), cppValue)); |
13195 } | 13202 } |
13196 | 13203 |
13197 } // namespace blink | 13204 } // namespace blink |
OLD | NEW |