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

Side by Side Diff: third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterface5.cpp

Issue 1993593003: binding: Check the type of property names in FooCallback instead of Foo. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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
« no previous file with comments | « third_party/WebKit/Source/bindings/tests/results/core/V8TestSpecialOperationsNotEnumerable.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "V8TestInterface5.h" 7 #include "V8TestInterface5.h"
8 8
9 #include "bindings/core/v8/ExceptionState.h" 9 #include "bindings/core/v8/ExceptionState.h"
10 #include "bindings/core/v8/ScriptState.h" 10 #include "bindings/core/v8/ScriptState.h"
(...skipping 663 matching lines...) Expand 10 before | Expand all | Expand 10 after
674 return v8SetReturnValueBool(info, result == DeleteSuccess); 674 return v8SetReturnValueBool(info, result == DeleteSuccess);
675 } 675 }
676 676
677 static void indexedPropertyDeleterCallback(uint32_t index, const v8::PropertyCal lbackInfo<v8::Boolean>& info) 677 static void indexedPropertyDeleterCallback(uint32_t index, const v8::PropertyCal lbackInfo<v8::Boolean>& info)
678 { 678 {
679 TestInterface5ImplementationV8Internal::indexedPropertyDeleter(index, info); 679 TestInterface5ImplementationV8Internal::indexedPropertyDeleter(index, info);
680 } 680 }
681 681
682 static void namedPropertyGetter(v8::Local<v8::Name> name, const v8::PropertyCall backInfo<v8::Value>& info) 682 static void namedPropertyGetter(v8::Local<v8::Name> name, const v8::PropertyCall backInfo<v8::Value>& info)
683 { 683 {
684 if (!name->IsString())
685 return;
686 auto nameString = name.As<v8::String>(); 684 auto nameString = name.As<v8::String>();
687 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()) ; 685 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()) ;
688 AtomicString propertyName = toCoreAtomicString(nameString); 686 AtomicString propertyName = toCoreAtomicString(nameString);
689 String result = impl->anonymousNamedGetter(propertyName); 687 String result = impl->anonymousNamedGetter(propertyName);
690 if (result.isNull()) 688 if (result.isNull())
691 return; 689 return;
692 v8SetReturnValueString(info, result, info.GetIsolate()); 690 v8SetReturnValueString(info, result, info.GetIsolate());
693 } 691 }
694 692
695 static void namedPropertyGetterCallback(v8::Local<v8::Name> name, const v8::Prop ertyCallbackInfo<v8::Value>& info) 693 static void namedPropertyGetterCallback(v8::Local<v8::Name> name, const v8::Prop ertyCallbackInfo<v8::Value>& info)
696 { 694 {
695 if (!name->IsString())
696 return;
697 TestInterface5ImplementationV8Internal::namedPropertyGetter(name, info); 697 TestInterface5ImplementationV8Internal::namedPropertyGetter(name, info);
698 } 698 }
699 699
700 static void namedPropertySetter(v8::Local<v8::Name> name, v8::Local<v8::Value> v 8Value, const v8::PropertyCallbackInfo<v8::Value>& info) 700 static void namedPropertySetter(v8::Local<v8::Name> name, v8::Local<v8::Value> v 8Value, const v8::PropertyCallbackInfo<v8::Value>& info)
701 { 701 {
702 if (!name->IsString())
703 return;
704 auto nameString = name.As<v8::String>(); 702 auto nameString = name.As<v8::String>();
705 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()) ; 703 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()) ;
706 V8StringResource<> propertyName(nameString); 704 V8StringResource<> propertyName(nameString);
707 if (!propertyName.prepare()) 705 if (!propertyName.prepare())
708 return; 706 return;
709 V8StringResource<> propertyValue = v8Value; 707 V8StringResource<> propertyValue = v8Value;
710 if (!propertyValue.prepare()) 708 if (!propertyValue.prepare())
711 return; 709 return;
712 bool result = impl->anonymousNamedSetter(propertyName, propertyValue); 710 bool result = impl->anonymousNamedSetter(propertyName, propertyValue);
713 if (!result) 711 if (!result)
714 return; 712 return;
715 v8SetReturnValue(info, v8Value); 713 v8SetReturnValue(info, v8Value);
716 } 714 }
717 715
718 static void namedPropertySetterCallback(v8::Local<v8::Name> name, v8::Local<v8:: Value> v8Value, const v8::PropertyCallbackInfo<v8::Value>& info) 716 static void namedPropertySetterCallback(v8::Local<v8::Name> name, v8::Local<v8:: Value> v8Value, const v8::PropertyCallbackInfo<v8::Value>& info)
719 { 717 {
718 if (!name->IsString())
719 return;
720 TestInterface5ImplementationV8Internal::namedPropertySetter(name, v8Value, i nfo); 720 TestInterface5ImplementationV8Internal::namedPropertySetter(name, v8Value, i nfo);
721 } 721 }
722 722
723 static void namedPropertyQuery(v8::Local<v8::Name> name, const v8::PropertyCallb ackInfo<v8::Integer>& info) 723 static void namedPropertyQuery(v8::Local<v8::Name> name, const v8::PropertyCallb ackInfo<v8::Integer>& info)
724 { 724 {
725 if (!name->IsString())
726 return;
727 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()) ; 725 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()) ;
728 AtomicString propertyName = toCoreAtomicString(name.As<v8::String>()); 726 AtomicString propertyName = toCoreAtomicString(name.As<v8::String>());
729 v8::String::Utf8Value namedProperty(name); 727 v8::String::Utf8Value namedProperty(name);
730 ExceptionState exceptionState(ExceptionState::GetterContext, *namedProperty, "TestInterface5", info.Holder(), info.GetIsolate()); 728 ExceptionState exceptionState(ExceptionState::GetterContext, *namedProperty, "TestInterface5", info.Holder(), info.GetIsolate());
731 bool result = impl->namedPropertyQuery(propertyName, exceptionState); 729 bool result = impl->namedPropertyQuery(propertyName, exceptionState);
732 if (exceptionState.throwIfNeeded()) 730 if (exceptionState.throwIfNeeded())
733 return; 731 return;
734 if (!result) 732 if (!result)
735 return; 733 return;
736 v8SetReturnValueInt(info, v8::None); 734 v8SetReturnValueInt(info, v8::None);
737 } 735 }
738 736
739 static void namedPropertyQueryCallback(v8::Local<v8::Name> name, const v8::Prope rtyCallbackInfo<v8::Integer>& info) 737 static void namedPropertyQueryCallback(v8::Local<v8::Name> name, const v8::Prope rtyCallbackInfo<v8::Integer>& info)
740 { 738 {
739 if (!name->IsString())
740 return;
741 TestInterface5ImplementationV8Internal::namedPropertyQuery(name, info); 741 TestInterface5ImplementationV8Internal::namedPropertyQuery(name, info);
742 } 742 }
743 743
744 static void namedPropertyDeleter(v8::Local<v8::Name> name, const v8::PropertyCal lbackInfo<v8::Boolean>& info) 744 static void namedPropertyDeleter(v8::Local<v8::Name> name, const v8::PropertyCal lbackInfo<v8::Boolean>& info)
745 { 745 {
746 if (!name->IsString())
747 return;
748 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()) ; 746 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()) ;
749 AtomicString propertyName = toCoreAtomicString(name.As<v8::String>()); 747 AtomicString propertyName = toCoreAtomicString(name.As<v8::String>());
750 DeleteResult result = impl->anonymousNamedDeleter(propertyName); 748 DeleteResult result = impl->anonymousNamedDeleter(propertyName);
751 if (result != DeleteUnknownProperty) 749 if (result != DeleteUnknownProperty)
752 return v8SetReturnValueBool(info, result == DeleteSuccess); 750 return v8SetReturnValueBool(info, result == DeleteSuccess);
753 } 751 }
754 752
755 static void namedPropertyDeleterCallback(v8::Local<v8::Name> name, const v8::Pro pertyCallbackInfo<v8::Boolean>& info) 753 static void namedPropertyDeleterCallback(v8::Local<v8::Name> name, const v8::Pro pertyCallbackInfo<v8::Boolean>& info)
756 { 754 {
755 if (!name->IsString())
756 return;
757 TestInterface5ImplementationV8Internal::namedPropertyDeleter(name, info); 757 TestInterface5ImplementationV8Internal::namedPropertyDeleter(name, info);
758 } 758 }
759 759
760 static void namedPropertyEnumerator(const v8::PropertyCallbackInfo<v8::Array>& i nfo) 760 static void namedPropertyEnumerator(const v8::PropertyCallbackInfo<v8::Array>& i nfo)
761 { 761 {
762 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()) ; 762 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()) ;
763 Vector<String> names; 763 Vector<String> names;
764 ExceptionState exceptionState(ExceptionState::EnumerationContext, "TestInter face5", info.Holder(), info.GetIsolate()); 764 ExceptionState exceptionState(ExceptionState::EnumerationContext, "TestInter face5", info.Holder(), info.GetIsolate());
765 impl->namedPropertyEnumerator(names, exceptionState); 765 impl->namedPropertyEnumerator(names, exceptionState);
766 if (exceptionState.throwIfNeeded()) 766 if (exceptionState.throwIfNeeded())
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
921 V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>( ), prototypeObject, interfaceObject, signature, windowAndServiceWorkerExposedMet hodMethodConfiguration); 921 V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>( ), prototypeObject, interfaceObject, signature, windowAndServiceWorkerExposedMet hodMethodConfiguration);
922 } 922 }
923 } 923 }
924 924
925 ActiveScriptWrappable* V8TestInterface5::toActiveScriptWrappable(v8::Local<v8::O bject> wrapper) 925 ActiveScriptWrappable* V8TestInterface5::toActiveScriptWrappable(v8::Local<v8::O bject> wrapper)
926 { 926 {
927 return toImpl(wrapper); 927 return toImpl(wrapper);
928 } 928 }
929 929
930 } // namespace blink 930 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/bindings/tests/results/core/V8TestSpecialOperationsNotEnumerable.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698