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

Unified Diff: third_party/WebKit/Source/bindings/tests/results/core/V8TestIntegerIndexed.cpp

Issue 2342053002: binding: Refactors bindings/templates/attributes.cpp. (Closed)
Patch Set: Reverted the replacement from hidden values to private properties. Created 4 years, 3 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/core/V8TestIntegerIndexed.cpp
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestIntegerIndexed.cpp b/third_party/WebKit/Source/bindings/tests/results/core/V8TestIntegerIndexed.cpp
index 719ff05adc719ce983b96687abfe3e37d77466c7..6ff934f2c5feacc0fedb3fd49450b9bf923c939d 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestIntegerIndexed.cpp
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestIntegerIndexed.cpp
@@ -52,7 +52,9 @@ namespace TestIntegerIndexedV8Internal {
static void lengthAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
+
TestIntegerIndexed* impl = V8TestIntegerIndexed::toImpl(holder);
+
v8SetReturnValueInt(info, impl->length());
}
@@ -64,17 +66,22 @@ void lengthAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& in
static void lengthAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Object> holder = info.Holder();
- ExceptionState exceptionState(ExceptionState::SetterContext, "length", "TestIntegerIndexed", holder, info.GetIsolate());
TestIntegerIndexed* impl = V8TestIntegerIndexed::toImpl(holder);
+
+ ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext, "TestIntegerIndexed", "length");
+
+ // Prepare the value to be set.
int cppValue = toInt16(info.GetIsolate(), v8Value, NormalConversion, exceptionState);
if (exceptionState.hadException())
return;
+
impl->setLength(cppValue);
}
void lengthAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
v8::Local<v8::Value> v8Value = info[0];
+
TestIntegerIndexedV8Internal::lengthAttributeSetter(v8Value, info);
}

Powered by Google App Engine
This is Rietveld 408576698