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

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

Issue 2116533003: [Origin Trials] Allow static attributes to be defined on origin trials (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix it harder Created 4 years, 5 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 7e8293f0995be165ebf9f2a5740375d9cbc4ca61..aa1b4ceafdd510d33a4ba46be1b0ff1ea6c781a2 100644
--- a/third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterfacePartial.cpp
+++ b/third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterfacePartial.cpp
@@ -58,6 +58,32 @@ static void partial4LongAttributeAttributeSetterCallback(const v8::FunctionCallb
TestInterfaceImplementationPartialV8Internal::partial4LongAttributeAttributeSetter(v8Value, info);
}
+static void partial4StaticLongAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
+{
+ v8SetReturnValueInt(info, TestInterfacePartial4::partial4StaticLongAttribute());
+}
+
+static void partial4StaticLongAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
+{
+ TestInterfaceImplementationPartialV8Internal::partial4StaticLongAttributeAttributeGetter(info);
+}
+
+static void partial4StaticLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
+{
+ v8::Local<v8::Object> holder = info.Holder();
+ ExceptionState exceptionState(ExceptionState::SetterContext, "partial4StaticLongAttribute", "TestInterface", holder, info.GetIsolate());
+ int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, exceptionState);
+ if (exceptionState.throwIfNeeded())
+ return;
+ TestInterfacePartial4::setPartial4StaticLongAttribute(cppValue);
+}
+
+static void partial4StaticLongAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
+{
+ v8::Local<v8::Value> v8Value = info[0];
+ TestInterfaceImplementationPartialV8Internal::partial4StaticLongAttributeAttributeSetter(v8Value, info);
+}
+
static void voidMethodPartialOverload3Method(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
@@ -366,9 +392,13 @@ void V8TestInterfacePartial::installOriginTrialPartialFeature(ScriptState* scrip
ALLOW_UNUSED_LOCAL(signature);
V8PerContextData* perContextData = V8PerContextData::from(scriptState->context());
v8::Local<v8::Function> interface = perContextData->constructorForType(&V8TestInterface::wrapperTypeInfo);
+ ALLOW_UNUSED_LOCAL(interface);
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);
+ V8DOMConfiguration::installAccessor(scriptState->isolate(), scriptState->world(), instance, prototype, interface, signature, accessorpartial4LongAttributeConfiguration);
+ const V8DOMConfiguration::AccessorConfiguration accessorpartial4StaticLongAttributeConfiguration = \
+ {"partial4StaticLongAttribute", TestInterfaceImplementationPartialV8Internal::partial4StaticLongAttributeAttributeGetterCallback, TestInterfaceImplementationPartialV8Internal::partial4StaticLongAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInterface, V8DOMConfiguration::CheckHolder};
+ V8DOMConfiguration::installAccessor(scriptState->isolate(), scriptState->world(), instance, prototype, interface, signature, accessorpartial4StaticLongAttributeConfiguration);
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};

Powered by Google App Engine
This is Rietveld 408576698