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

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

Issue 58963002: IDL compiler: [ActivityLogging] for methods (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 1 month 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 4883 matching lines...) Expand 10 before | Expand all | Expand 10 after
4894 imp->voidMethodTreatNullAsNullStringTreatUndefinedAsNullStringStringArg(trea tNullAsNullStringStringArg); 4894 imp->voidMethodTreatNullAsNullStringTreatUndefinedAsNullStringStringArg(trea tNullAsNullStringStringArg);
4895 } 4895 }
4896 4896
4897 static void voidMethodTreatNullAsNullStringTreatUndefinedAsNullStringStringArgMe thodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) 4897 static void voidMethodTreatNullAsNullStringTreatUndefinedAsNullStringStringArgMe thodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
4898 { 4898 {
4899 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 4899 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4900 TestObjectPythonV8Internal::voidMethodTreatNullAsNullStringTreatUndefinedAsN ullStringStringArgMethod(info); 4900 TestObjectPythonV8Internal::voidMethodTreatNullAsNullStringTreatUndefinedAsN ullStringStringArgMethod(info);
4901 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 4901 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
4902 } 4902 }
4903 4903
4904 static void activityLoggingAccessForAllWorldsMethodMethod(const v8::FunctionCall backInfo<v8::Value>& info)
4905 {
4906 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
4907 imp->activityLoggingAccessForAllWorldsMethod();
4908 }
4909
4910 static void activityLoggingAccessForAllWorldsMethodMethodCallback(const v8::Func tionCallbackInfo<v8::Value>& info)
4911 {
4912 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
4913 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext());
4914 if (contextData && contextData->activityLogger()) {
4915 Vector<v8::Handle<v8::Value> > loggerArgs = toVectorOfArguments(info);
4916 contextData->activityLogger()->log("TestObjectPython.activityLoggingAcce ssForAllWorldsMethod", info.Length(), loggerArgs.data(), "Method");
4917 }
4918 TestObjectPythonV8Internal::activityLoggingAccessForAllWorldsMethodMethod(in fo);
4919 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
4920 }
4921
4904 } // namespace TestObjectPythonV8Internal 4922 } // namespace TestObjectPythonV8Internal
4905 4923
4906 static const V8DOMConfiguration::AttributeConfiguration V8TestObjectPythonAttrib utes[] = { 4924 static const V8DOMConfiguration::AttributeConfiguration V8TestObjectPythonAttrib utes[] = {
4907 {"readonlyStringAttribute", TestObjectPythonV8Internal::readonlyStringAttrib uteAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAU LT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, 4925 {"readonlyStringAttribute", TestObjectPythonV8Internal::readonlyStringAttrib uteAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAU LT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
4908 {"readonlyTestInterfaceEmptyAttribute", TestObjectPythonV8Internal::readonly TestInterfaceEmptyAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8:: AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, 4926 {"readonlyTestInterfaceEmptyAttribute", TestObjectPythonV8Internal::readonly TestInterfaceEmptyAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8:: AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
4909 {"readonlyLongAttribute", TestObjectPythonV8Internal::readonlyLongAttributeA ttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, 4927 {"readonlyLongAttribute", TestObjectPythonV8Internal::readonlyLongAttributeA ttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
4910 {"dateAttribute", TestObjectPythonV8Internal::dateAttributeAttributeGetterCa llback, TestObjectPythonV8Internal::dateAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribut e>(v8::None), 0 /* on instance */}, 4928 {"dateAttribute", TestObjectPythonV8Internal::dateAttributeAttributeGetterCa llback, TestObjectPythonV8Internal::dateAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribut e>(v8::None), 0 /* on instance */},
4911 {"stringAttribute", TestObjectPythonV8Internal::stringAttributeAttributeGett erCallback, TestObjectPythonV8Internal::stringAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAt tribute>(v8::None), 0 /* on instance */}, 4929 {"stringAttribute", TestObjectPythonV8Internal::stringAttributeAttributeGett erCallback, TestObjectPythonV8Internal::stringAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAt tribute>(v8::None), 0 /* on instance */},
4912 {"readonlyDOMTimeStampAttribute", TestObjectPythonV8Internal::readonlyDOMTim eStampAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessContro l>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, 4930 {"readonlyDOMTimeStampAttribute", TestObjectPythonV8Internal::readonlyDOMTim eStampAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessContro l>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
4913 {"booleanAttribute", TestObjectPythonV8Internal::booleanAttributeAttributeGe tterCallback, TestObjectPythonV8Internal::booleanAttributeAttributeSetterCallbac k, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::Propert yAttribute>(v8::None), 0 /* on instance */}, 4931 {"booleanAttribute", TestObjectPythonV8Internal::booleanAttributeAttributeGe tterCallback, TestObjectPythonV8Internal::booleanAttributeAttributeSetterCallbac k, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::Propert yAttribute>(v8::None), 0 /* on instance */},
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
5098 {"voidMethodVariadicStringArg", TestObjectPythonV8Internal::voidMethodVariad icStringArgMethodCallback, 0, 1}, 5116 {"voidMethodVariadicStringArg", TestObjectPythonV8Internal::voidMethodVariad icStringArgMethodCallback, 0, 1},
5099 {"voidMethodStringArgVariadicStringArg", TestObjectPythonV8Internal::voidMet hodStringArgVariadicStringArgMethodCallback, 0, 2}, 5117 {"voidMethodStringArgVariadicStringArg", TestObjectPythonV8Internal::voidMet hodStringArgVariadicStringArgMethodCallback, 0, 2},
5100 {"voidMethodClampUnsignedShortArg", TestObjectPythonV8Internal::voidMethodCl ampUnsignedShortArgMethodCallback, 0, 1}, 5118 {"voidMethodClampUnsignedShortArg", TestObjectPythonV8Internal::voidMethodCl ampUnsignedShortArgMethodCallback, 0, 1},
5101 {"voidMethodClampUnsignedLongArg", TestObjectPythonV8Internal::voidMethodCla mpUnsignedLongArgMethodCallback, 0, 1}, 5119 {"voidMethodClampUnsignedLongArg", TestObjectPythonV8Internal::voidMethodCla mpUnsignedLongArgMethodCallback, 0, 1},
5102 {"voidMethodDefaultUndefinedLongArg", TestObjectPythonV8Internal::voidMethod DefaultUndefinedLongArgMethodCallback, 0, 0}, 5120 {"voidMethodDefaultUndefinedLongArg", TestObjectPythonV8Internal::voidMethod DefaultUndefinedLongArgMethodCallback, 0, 0},
5103 {"voidMethodDefaultUndefinedStringArg", TestObjectPythonV8Internal::voidMeth odDefaultUndefinedStringArgMethodCallback, 0, 0}, 5121 {"voidMethodDefaultUndefinedStringArg", TestObjectPythonV8Internal::voidMeth odDefaultUndefinedStringArgMethodCallback, 0, 0},
5104 {"voidMethodDefaultNullStringStringArg", TestObjectPythonV8Internal::voidMet hodDefaultNullStringStringArgMethodCallback, 0, 0}, 5122 {"voidMethodDefaultNullStringStringArg", TestObjectPythonV8Internal::voidMet hodDefaultNullStringStringArgMethodCallback, 0, 0},
5105 {"voidMethodEnforceRangeLongArg", TestObjectPythonV8Internal::voidMethodEnfo rceRangeLongArgMethodCallback, 0, 1}, 5123 {"voidMethodEnforceRangeLongArg", TestObjectPythonV8Internal::voidMethodEnfo rceRangeLongArgMethodCallback, 0, 1},
5106 {"voidMethodTreatNullAsNullStringStringArg", TestObjectPythonV8Internal::voi dMethodTreatNullAsNullStringStringArgMethodCallback, 0, 1}, 5124 {"voidMethodTreatNullAsNullStringStringArg", TestObjectPythonV8Internal::voi dMethodTreatNullAsNullStringStringArgMethodCallback, 0, 1},
5107 {"voidMethodTreatNullAsNullStringTreatUndefinedAsNullStringStringArg", TestO bjectPythonV8Internal::voidMethodTreatNullAsNullStringTreatUndefinedAsNullString StringArgMethodCallback, 0, 1}, 5125 {"voidMethodTreatNullAsNullStringTreatUndefinedAsNullStringStringArg", TestO bjectPythonV8Internal::voidMethodTreatNullAsNullStringTreatUndefinedAsNullString StringArgMethodCallback, 0, 1},
5126 {"activityLoggingAccessForAllWorldsMethod", TestObjectPythonV8Internal::acti vityLoggingAccessForAllWorldsMethodMethodCallback, 0, 0},
5108 }; 5127 };
5109 5128
5110 static v8::Handle<v8::FunctionTemplate> ConfigureV8TestObjectPythonTemplate(v8:: Handle<v8::FunctionTemplate> desc, v8::Isolate* isolate, WrapperWorldType curren tWorldType) 5129 static v8::Handle<v8::FunctionTemplate> ConfigureV8TestObjectPythonTemplate(v8:: Handle<v8::FunctionTemplate> desc, v8::Isolate* isolate, WrapperWorldType curren tWorldType)
5111 { 5130 {
5112 desc->ReadOnlyPrototype(); 5131 desc->ReadOnlyPrototype();
5113 5132
5114 v8::Local<v8::Signature> defaultSignature; 5133 v8::Local<v8::Signature> defaultSignature;
5115 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(desc, "TestOb jectPython", v8::Local<v8::FunctionTemplate>(), V8TestObjectPython::internalFiel dCount, 5134 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(desc, "TestOb jectPython", v8::Local<v8::FunctionTemplate>(), V8TestObjectPython::internalFiel dCount,
5116 V8TestObjectPythonAttributes, WTF_ARRAY_LENGTH(V8TestObjectPythonAttribu tes), 5135 V8TestObjectPythonAttributes, WTF_ARRAY_LENGTH(V8TestObjectPythonAttribu tes),
5117 V8TestObjectPythonMethods, WTF_ARRAY_LENGTH(V8TestObjectPythonMethods), 5136 V8TestObjectPythonMethods, WTF_ARRAY_LENGTH(V8TestObjectPythonMethods),
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
5300 V8DOMWrapper::associateObjectWithWrapper<V8TestObjectPython>(impl, &wrapperT ypeInfo, wrapper, isolate, WrapperConfiguration::Independent); 5319 V8DOMWrapper::associateObjectWithWrapper<V8TestObjectPython>(impl, &wrapperT ypeInfo, wrapper, isolate, WrapperConfiguration::Independent);
5301 return wrapper; 5320 return wrapper;
5302 } 5321 }
5303 5322
5304 void V8TestObjectPython::derefObject(void* object) 5323 void V8TestObjectPython::derefObject(void* object)
5305 { 5324 {
5306 fromInternalPointer(object)->deref(); 5325 fromInternalPointer(object)->deref();
5307 } 5326 }
5308 5327
5309 } // namespace WebCore 5328 } // namespace WebCore
OLDNEW
« Source/bindings/templates/methods.cpp ('K') | « Source/bindings/tests/idls/TestObjectPython.idl ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698