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

Unified Diff: third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterfacePartial.cpp

Issue 2106983002: Allow origin trials to be declared on IDL operations (methods) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removing unneeded includes, addressing nits Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterfacePartial.cpp
diff --git a/third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterfacePartial.cpp b/third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterfacePartial.cpp
index 7c55cd2bb7236b47f1237c8ec7a471fca7cdbce8..7e8293f0995be165ebf9f2a5740375d9cbc4ca61 100644
--- a/third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterfacePartial.cpp
+++ b/third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterfacePartial.cpp
@@ -317,6 +317,17 @@ static void unscopeableVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v
TestInterfaceImplementationPartialV8Internal::unscopeableVoidMethodMethod(info);
}
+static void partial4VoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
+{
+ TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
+ TestInterfacePartial4::partial4VoidMethod(*impl);
+}
+
+static void partial4VoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
+{
+ TestInterfaceImplementationPartialV8Internal::partial4VoidMethodMethod(info);
+}
+
} // namespace TestInterfaceImplementationPartialV8Internal
const V8DOMConfiguration::MethodConfiguration V8TestInterfaceMethods[] = {
@@ -348,18 +359,20 @@ void V8TestInterfacePartial::installV8TestInterfaceTemplate(v8::Isolate* isolate
void V8TestInterfacePartial::installOriginTrialPartialFeature(ScriptState* scriptState, v8::Local<v8::Object> instance)
{
v8::Local<v8::Object> prototype = instance->GetPrototype()->ToObject(scriptState->isolate());
+
V8PerIsolateData* perIsolateData = V8PerIsolateData::from(scriptState->isolate());
v8::Local<v8::FunctionTemplate> interfaceTemplate = perIsolateData->findInterfaceTemplate(scriptState->world(), &V8TestInterface::wrapperTypeInfo);
v8::Local<v8::Signature> signature = v8::Signature::New(scriptState->isolate(), interfaceTemplate);
ALLOW_UNUSED_LOCAL(signature);
+ V8PerContextData* perContextData = V8PerContextData::from(scriptState->context());
+ v8::Local<v8::Function> interface = perContextData->constructorForType(&V8TestInterface::wrapperTypeInfo);
const V8DOMConfiguration::AccessorConfiguration accessorpartial4LongAttributeConfiguration = \
{"partial4LongAttribute", TestInterfaceImplementationPartialV8Internal::partial4LongAttributeAttributeGetterCallback, TestInterfaceImplementationPartialV8Internal::partial4LongAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder};
V8DOMConfiguration::installAccessor(scriptState->isolate(), scriptState->world(), instance, prototype, v8::Local<v8::Function>(), signature, accessorpartial4LongAttributeConfiguration);
-
- V8PerContextData* perContextData = V8PerContextData::from(scriptState->context());
- v8::Local<v8::Function> interface = perContextData->constructorForType(&V8TestInterface::wrapperTypeInfo);
const V8DOMConfiguration::ConstantConfiguration constantPartial4UnsignedShortConfiguration = {"PARTIAL4_UNSIGNED_SHORT", 4, 0, V8DOMConfiguration::ConstantTypeUnsignedShort};
V8DOMConfiguration::installConstant(scriptState->isolate(), interface, prototype, constantPartial4UnsignedShortConfiguration);
+ const V8DOMConfiguration::MethodConfiguration methodPartial4VoidmethodConfiguration = {"partial4VoidMethod", TestInterfaceImplementationPartialV8Internal::partial4VoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype};
+ V8DOMConfiguration::installMethod(scriptState->isolate(), scriptState->world(), instance, prototype, interface, signature, methodPartial4VoidmethodConfiguration);
}
void V8TestInterfacePartial::preparePrototypeAndInterfaceObject(v8::Local<v8::Context> context, const DOMWrapperWorld& world, v8::Local<v8::Object> prototypeObject, v8::Local<v8::Function> interfaceObject, v8::Local<v8::FunctionTemplate> interfaceTemplate)
{

Powered by Google App Engine
This is Rietveld 408576698