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

Side by Side Diff: Source/bindings/tests/results/V8TestObjectPython.cpp

Issue 26785002: IDL compiler: [GetterRaisesException], [RaisesException] for getter (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased Created 7 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « Source/bindings/tests/idls/TestObjectPython.idl ('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 /* 1 /*
2 This file is part of the Blink open source project. 2 This file is part of the Blink open source project.
3 This file has been auto-generated by CodeGeneratorV8.pm. DO NOT MODIFY! 3 This file has been auto-generated by CodeGeneratorV8.pm. DO NOT MODIFY!
4 4
5 This library is free software; you can redistribute it and/or 5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public 6 modify it under the terms of the GNU Library General Public
7 License as published by the Free Software Foundation; either 7 License as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version. 8 version 2 of the License, or (at your option) any later version.
9 9
10 This library is distributed in the hope that it will be useful, 10 This library is distributed in the hope that it will be useful,
(...skipping 902 matching lines...) Expand 10 before | Expand all | Expand 10 after
913 v8SetReturnValueInt(info, imp->enforceRangeReadonlyLongAttribute()); 913 v8SetReturnValueInt(info, imp->enforceRangeReadonlyLongAttribute());
914 } 914 }
915 915
916 static void enforceRangeReadonlyLongAttributeAttributeGetterCallback(v8::Local<v 8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) 916 static void enforceRangeReadonlyLongAttributeAttributeGetterCallback(v8::Local<v 8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
917 { 917 {
918 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 918 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
919 TestObjectPythonV8Internal::enforceRangeReadonlyLongAttributeAttributeGetter (name, info); 919 TestObjectPythonV8Internal::enforceRangeReadonlyLongAttributeAttributeGetter (name, info);
920 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 920 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
921 } 921 }
922 922
923 static void getterRaisesExceptionReadonlyLongAttributeAttributeGetter(v8::Local< v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
924 {
925 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
926 ExceptionState es(info.GetIsolate());
927 int value = imp->getterRaisesExceptionReadonlyLongAttribute(es);
928 if (UNLIKELY(es.throwIfNeeded()))
929 return;
930 v8SetReturnValueInt(info, value);
931 }
932
933 static void getterRaisesExceptionReadonlyLongAttributeAttributeGetterCallback(v8 ::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
934 {
935 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
936 TestObjectPythonV8Internal::getterRaisesExceptionReadonlyLongAttributeAttrib uteGetter(name, info);
937 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
938 }
939
923 static void readonlyDocumentFragmentAttributeAttributeGetter(v8::Local<v8::Strin g> name, const v8::PropertyCallbackInfo<v8::Value>& info) 940 static void readonlyDocumentFragmentAttributeAttributeGetter(v8::Local<v8::Strin g> name, const v8::PropertyCallbackInfo<v8::Value>& info)
924 { 941 {
925 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); 942 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
926 RefPtr<DocumentFragment> result = imp->readonlyDocumentFragmentAttribute(); 943 RefPtr<DocumentFragment> result = imp->readonlyDocumentFragmentAttribute();
927 if (result && DOMDataStore::setReturnValueFromWrapper<V8DocumentFragment>(in fo.GetReturnValue(), result.get())) 944 if (result && DOMDataStore::setReturnValueFromWrapper<V8DocumentFragment>(in fo.GetReturnValue(), result.get()))
928 return; 945 return;
929 v8::Handle<v8::Value> wrapper = toV8(result.get(), info.Holder(), info.GetIs olate()); 946 v8::Handle<v8::Value> wrapper = toV8(result.get(), info.Holder(), info.GetIs olate());
930 if (!wrapper.IsEmpty()) { 947 if (!wrapper.IsEmpty()) {
931 V8HiddenPropertyName::setNamedHiddenReference(info.Holder(), "readonlyDo cumentFragmentAttribute", wrapper); 948 V8HiddenPropertyName::setNamedHiddenReference(info.Holder(), "readonlyDo cumentFragmentAttribute", wrapper);
932 v8SetReturnValue(info, wrapper); 949 v8SetReturnValue(info, wrapper);
933 } 950 }
934 } 951 }
935 952
936 static void readonlyDocumentFragmentAttributeAttributeGetterCallback(v8::Local<v 8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) 953 static void readonlyDocumentFragmentAttributeAttributeGetterCallback(v8::Local<v 8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
937 { 954 {
938 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 955 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
939 TestObjectPythonV8Internal::readonlyDocumentFragmentAttributeAttributeGetter (name, info); 956 TestObjectPythonV8Internal::readonlyDocumentFragmentAttributeAttributeGetter (name, info);
940 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 957 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
941 } 958 }
942 959
960 static void raisesExceptionReadonlyLongAttributeAttributeGetter(v8::Local<v8::St ring> name, const v8::PropertyCallbackInfo<v8::Value>& info)
961 {
962 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
963 ExceptionState es(info.GetIsolate());
964 int value = imp->raisesExceptionReadonlyLongAttribute(es);
965 if (UNLIKELY(es.throwIfNeeded()))
966 return;
967 v8SetReturnValueInt(info, value);
968 }
969
970 static void raisesExceptionReadonlyLongAttributeAttributeGetterCallback(v8::Loca l<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
971 {
972 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
973 TestObjectPythonV8Internal::raisesExceptionReadonlyLongAttributeAttributeGet ter(name, info);
974 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
975 }
976
943 static void enabledAtRuntimeReadonlyLongAttributeAttributeGetter(v8::Local<v8::S tring> name, const v8::PropertyCallbackInfo<v8::Value>& info) 977 static void enabledAtRuntimeReadonlyLongAttributeAttributeGetter(v8::Local<v8::S tring> name, const v8::PropertyCallbackInfo<v8::Value>& info)
944 { 978 {
945 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); 979 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
946 v8SetReturnValueInt(info, imp->enabledAtRuntimeReadonlyLongAttribute()); 980 v8SetReturnValueInt(info, imp->enabledAtRuntimeReadonlyLongAttribute());
947 } 981 }
948 982
949 static void enabledAtRuntimeReadonlyLongAttributeAttributeGetterCallback(v8::Loc al<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info) 983 static void enabledAtRuntimeReadonlyLongAttributeAttributeGetterCallback(v8::Loc al<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
950 { 984 {
951 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 985 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
952 TestObjectPythonV8Internal::enabledAtRuntimeReadonlyLongAttributeAttributeGe tter(name, info); 986 TestObjectPythonV8Internal::enabledAtRuntimeReadonlyLongAttributeAttributeGe tter(name, info);
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
1034 #endif // ENABLE(Condition) 1068 #endif // ENABLE(Condition)
1035 #if ENABLE(Condition) 1069 #if ENABLE(Condition)
1036 {"customGetterReadonlyLongAttribute", TestObjectPythonV8Internal::customGett erReadonlyLongAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::Acce ssControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on i nstance */}, 1070 {"customGetterReadonlyLongAttribute", TestObjectPythonV8Internal::customGett erReadonlyLongAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::Acce ssControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on i nstance */},
1037 #endif // ENABLE(Condition) 1071 #endif // ENABLE(Condition)
1038 {"customElementsCallbacksReadonlyLongAttribute", TestObjectPythonV8Internal: :customElementsCallbacksReadonlyLongAttributeAttributeGetterCallback, 0, 0, 0, 0 , static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute >(v8::None), 0 /* on instance */}, 1072 {"customElementsCallbacksReadonlyLongAttribute", TestObjectPythonV8Internal: :customElementsCallbacksReadonlyLongAttributeAttributeGetterCallback, 0, 0, 0, 0 , static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute >(v8::None), 0 /* on instance */},
1039 {"deprecatedReadonlyLongAttribute", TestObjectPythonV8Internal::deprecatedRe adonlyLongAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessCo ntrol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on insta nce */}, 1073 {"deprecatedReadonlyLongAttribute", TestObjectPythonV8Internal::deprecatedRe adonlyLongAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessCo ntrol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on insta nce */},
1040 {"doNotCheckSecurityReadonlyLongAttribute", TestObjectPythonV8Internal::doNo tCheckSecurityReadonlyLongAttributeAttributeGetterCallback, 0, 0, 0, 0, static_c ast<v8::AccessControl>(v8::ALL_CAN_READ), static_cast<v8::PropertyAttribute>(v8: :None), 0 /* on instance */}, 1074 {"doNotCheckSecurityReadonlyLongAttribute", TestObjectPythonV8Internal::doNo tCheckSecurityReadonlyLongAttributeAttributeGetterCallback, 0, 0, 0, 0, static_c ast<v8::AccessControl>(v8::ALL_CAN_READ), static_cast<v8::PropertyAttribute>(v8: :None), 0 /* on instance */},
1041 {"doNotCheckSecurityOnGetterReadonlyLongAttribute", TestObjectPythonV8Intern al::doNotCheckSecurityOnGetterReadonlyLongAttributeAttributeGetterCallback, 0, 0 , 0, 0, static_cast<v8::AccessControl>(v8::ALL_CAN_READ), static_cast<v8::Proper tyAttribute>(v8::None), 0 /* on instance */}, 1075 {"doNotCheckSecurityOnGetterReadonlyLongAttribute", TestObjectPythonV8Intern al::doNotCheckSecurityOnGetterReadonlyLongAttributeAttributeGetterCallback, 0, 0 , 0, 0, static_cast<v8::AccessControl>(v8::ALL_CAN_READ), static_cast<v8::Proper tyAttribute>(v8::None), 0 /* on instance */},
1042 {"doNotCheckSecurityOnSetterReadonlyLongAttribute", TestObjectPythonV8Intern al::doNotCheckSecurityOnSetterReadonlyLongAttributeAttributeGetterCallback, 0, 0 , 0, 0, static_cast<v8::AccessControl>(v8::ALL_CAN_WRITE), static_cast<v8::Prope rtyAttribute>(v8::None), 0 /* on instance */}, 1076 {"doNotCheckSecurityOnSetterReadonlyLongAttribute", TestObjectPythonV8Intern al::doNotCheckSecurityOnSetterReadonlyLongAttributeAttributeGetterCallback, 0, 0 , 0, 0, static_cast<v8::AccessControl>(v8::ALL_CAN_WRITE), static_cast<v8::Prope rtyAttribute>(v8::None), 0 /* on instance */},
1043 {"enforceRangeReadonlyLongAttribute", TestObjectPythonV8Internal::enforceRan geReadonlyLongAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::Acce ssControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on i nstance */}, 1077 {"enforceRangeReadonlyLongAttribute", TestObjectPythonV8Internal::enforceRan geReadonlyLongAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::Acce ssControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on i nstance */},
1078 {"getterRaisesExceptionReadonlyLongAttribute", TestObjectPythonV8Internal::g etterRaisesExceptionReadonlyLongAttributeAttributeGetterCallback, 0, 0, 0, 0, st atic_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8 ::None), 0 /* on instance */},
1044 {"readonlyDocumentFragmentAttribute", TestObjectPythonV8Internal::readonlyDo cumentFragmentAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::Acce ssControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on i nstance */}, 1079 {"readonlyDocumentFragmentAttribute", TestObjectPythonV8Internal::readonlyDo cumentFragmentAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::Acce ssControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on i nstance */},
1080 {"raisesExceptionReadonlyLongAttribute", TestObjectPythonV8Internal::raisesE xceptionReadonlyLongAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8 ::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 / * on instance */},
1045 }; 1081 };
1046 1082
1047 static v8::Handle<v8::FunctionTemplate> ConfigureV8TestObjectPythonTemplate(v8:: Handle<v8::FunctionTemplate> desc, v8::Isolate* isolate, WrapperWorldType curren tWorldType) 1083 static v8::Handle<v8::FunctionTemplate> ConfigureV8TestObjectPythonTemplate(v8:: Handle<v8::FunctionTemplate> desc, v8::Isolate* isolate, WrapperWorldType curren tWorldType)
1048 { 1084 {
1049 desc->ReadOnlyPrototype(); 1085 desc->ReadOnlyPrototype();
1050 1086
1051 v8::Local<v8::Signature> defaultSignature; 1087 v8::Local<v8::Signature> defaultSignature;
1052 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(desc, "TestOb jectPython", v8::Local<v8::FunctionTemplate>(), V8TestObjectPython::internalFiel dCount, 1088 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(desc, "TestOb jectPython", v8::Local<v8::FunctionTemplate>(), V8TestObjectPython::internalFiel dCount,
1053 V8TestObjectPythonAttributes, WTF_ARRAY_LENGTH(V8TestObjectPythonAttribu tes), 1089 V8TestObjectPythonAttributes, WTF_ARRAY_LENGTH(V8TestObjectPythonAttribu tes),
1054 0, 0, isolate, currentWorldType); 1090 0, 0, isolate, currentWorldType);
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
1123 V8DOMWrapper::associateObjectWithWrapper<V8TestObjectPython>(impl, &info, wr apper, isolate, WrapperConfiguration::Independent); 1159 V8DOMWrapper::associateObjectWithWrapper<V8TestObjectPython>(impl, &info, wr apper, isolate, WrapperConfiguration::Independent);
1124 return wrapper; 1160 return wrapper;
1125 } 1161 }
1126 1162
1127 void V8TestObjectPython::derefObject(void* object) 1163 void V8TestObjectPython::derefObject(void* object)
1128 { 1164 {
1129 fromInternalPointer(object)->deref(); 1165 fromInternalPointer(object)->deref();
1130 } 1166 }
1131 1167
1132 } // namespace WebCore 1168 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/tests/idls/TestObjectPython.idl ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698