Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1059)

Side by Side Diff: Source/bindings/tests/results/core/V8TestObject.cpp

Issue 871013007: Use enum BinaryType for WebSocket.binaryType, instead of DOMString (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 1625 matching lines...) Expand 10 before | Expand all | Expand 10 after
1636 TestObjectV8Internal::testEnumAttributeAttributeGetter(info); 1636 TestObjectV8Internal::testEnumAttributeAttributeGetter(info);
1637 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 1637 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
1638 } 1638 }
1639 1639
1640 static void testEnumAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) 1640 static void testEnumAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
1641 { 1641 {
1642 v8::Local<v8::Object> holder = info.Holder(); 1642 v8::Local<v8::Object> holder = info.Holder();
1643 TestObject* impl = V8TestObject::toImpl(holder); 1643 TestObject* impl = V8TestObject::toImpl(holder);
1644 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); 1644 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value);
1645 String string = cppValue; 1645 String string = cppValue;
1646 if (!(string == "" || string == "EnumValue1" || string == "EnumValue2" || st ring == "EnumValue3")) 1646 if (!(string == "" || string == "EnumValue1" || string == "EnumValue2" || st ring == "EnumValue3")) {
1647 currentExecutionContext(info.GetIsolate())->addConsoleMessage(ConsoleMes sage::create(JSMessageSource, ErrorMessageLevel, "The provided value '"+string+" ' is not a valid value of type 'TestEnum'."));
1647 return; 1648 return;
1649 }
1648 impl->setTestEnumAttribute(cppValue); 1650 impl->setTestEnumAttribute(cppValue);
1649 } 1651 }
1650 1652
1651 static void testEnumAttributeAttributeSetterCallback(v8::Local<v8::String>, v8:: Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) 1653 static void testEnumAttributeAttributeSetterCallback(v8::Local<v8::String>, v8:: Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
1652 { 1654 {
1653 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); 1655 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
1654 TestObjectV8Internal::testEnumAttributeAttributeSetter(v8Value, info); 1656 TestObjectV8Internal::testEnumAttributeAttributeSetter(v8Value, info);
1655 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 1657 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
1656 } 1658 }
1657 1659
(...skipping 3380 matching lines...) Expand 10 before | Expand all | Expand 10 after
5038 TestObjectV8Internal::enumForPrivateScriptAttributeGetter(info); 5040 TestObjectV8Internal::enumForPrivateScriptAttributeGetter(info);
5039 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 5041 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
5040 } 5042 }
5041 5043
5042 static void enumForPrivateScriptAttributeSetter(v8::Local<v8::Value> v8Value, co nst v8::PropertyCallbackInfo<void>& info) 5044 static void enumForPrivateScriptAttributeSetter(v8::Local<v8::Value> v8Value, co nst v8::PropertyCallbackInfo<void>& info)
5043 { 5045 {
5044 v8::Local<v8::Object> holder = info.Holder(); 5046 v8::Local<v8::Object> holder = info.Holder();
5045 TestObject* impl = V8TestObject::toImpl(holder); 5047 TestObject* impl = V8TestObject::toImpl(holder);
5046 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); 5048 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value);
5047 String string = cppValue; 5049 String string = cppValue;
5048 if (!(string == "" || string == "EnumValue1" || string == "EnumValue2" || st ring == "EnumValue3")) 5050 if (!(string == "" || string == "EnumValue1" || string == "EnumValue2" || st ring == "EnumValue3")) {
5051 currentExecutionContext(info.GetIsolate())->addConsoleMessage(ConsoleMes sage::create(JSMessageSource, ErrorMessageLevel, "The provided value '"+string+" ' is not a valid value of type 'TestEnum'."));
5049 return; 5052 return;
5053 }
5050 V8TestObject::PrivateScript::enumForPrivateScriptAttributeSetter(toFrameIfNo tDetached(info.GetIsolate()->GetCurrentContext()), impl, cppValue); 5054 V8TestObject::PrivateScript::enumForPrivateScriptAttributeSetter(toFrameIfNo tDetached(info.GetIsolate()->GetCurrentContext()), impl, cppValue);
5051 } 5055 }
5052 5056
5053 static void enumForPrivateScriptAttributeSetterCallback(v8::Local<v8::String>, v 8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) 5057 static void enumForPrivateScriptAttributeSetterCallback(v8::Local<v8::String>, v 8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
5054 { 5058 {
5055 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); 5059 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
5056 TestObjectV8Internal::enumForPrivateScriptAttributeSetter(v8Value, info); 5060 TestObjectV8Internal::enumForPrivateScriptAttributeSetter(v8Value, info);
5057 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 5061 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
5058 } 5062 }
5059 5063
(...skipping 6607 matching lines...) Expand 10 before | Expand all | Expand 10 after
11667 return false; 11671 return false;
11668 11672
11669 ScriptState::Scope scope(scriptState); 11673 ScriptState::Scope scope(scriptState);
11670 v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Globa l(), scriptState->isolate()); 11674 v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Globa l(), scriptState->isolate());
11671 11675
11672 ExceptionState exceptionState(ExceptionState::SetterContext, "enumForPrivate Script", "TestObject", scriptState->context()->Global(), scriptState->isolate()) ; 11676 ExceptionState exceptionState(ExceptionState::SetterContext, "enumForPrivate Script", "TestObject", scriptState->context()->Global(), scriptState->isolate()) ;
11673 return PrivateScriptRunner::runDOMAttributeSetter(scriptState, scriptStateIn UserScript, "TestObject", "enumForPrivateScript", holder, v8String(scriptState-> isolate(), cppValue)); 11677 return PrivateScriptRunner::runDOMAttributeSetter(scriptState, scriptStateIn UserScript, "TestObject", "enumForPrivateScript", holder, v8String(scriptState-> isolate(), cppValue));
11674 } 11678 }
11675 11679
11676 } // namespace blink 11680 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698