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

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

Issue 212593008: Bindings: rename |resultValue| => |jsValue| (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY! 5 // This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY!
6 6
7 #include "config.h" 7 #include "config.h"
8 #include "V8TestObject.h" 8 #include "V8TestObject.h"
9 9
10 #include "HTMLNames.h" 10 #include "HTMLNames.h"
(...skipping 1062 matching lines...) Expand 10 before | Expand all | Expand 10 after
1073 { 1073 {
1074 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 1074 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1075 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; 1075 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
1076 TestObjectV8Internal::reflectedTreatNullAsNullStringTreatUndefinedAsNullStri ngCustomURLAttrAttributeSetter(jsValue, info); 1076 TestObjectV8Internal::reflectedTreatNullAsNullStringTreatUndefinedAsNullStri ngCustomURLAttrAttributeSetter(jsValue, info);
1077 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 1077 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1078 } 1078 }
1079 1079
1080 static void limitedToOnlyOneAttributeAttributeGetter(const v8::PropertyCallbackI nfo<v8::Value>& info) 1080 static void limitedToOnlyOneAttributeAttributeGetter(const v8::PropertyCallbackI nfo<v8::Value>& info)
1081 { 1081 {
1082 TestObject* impl = V8TestObject::toNative(info.Holder()); 1082 TestObject* impl = V8TestObject::toNative(info.Holder());
1083 String resultValue = impl->fastGetAttribute(HTMLNames::limitedtoonlyoneattri buteAttr); 1083 String jsValue = impl->fastGetAttribute(HTMLNames::limitedtoonlyoneattribute Attr);
1084 if (resultValue.isEmpty()) { 1084 if (jsValue.isEmpty()) {
1085 ; 1085 ;
1086 } else if (equalIgnoringCase(resultValue, "unique")) { 1086 } else if (equalIgnoringCase(jsValue, "unique")) {
1087 resultValue = "unique"; 1087 jsValue = "unique";
1088 } else { 1088 } else {
1089 resultValue = ""; 1089 jsValue = "";
1090 } 1090 }
1091 v8SetReturnValueString(info, resultValue, info.GetIsolate()); 1091 v8SetReturnValueString(info, jsValue, info.GetIsolate());
1092 } 1092 }
1093 1093
1094 static void limitedToOnlyOneAttributeAttributeGetterCallback(v8::Local<v8::Strin g>, const v8::PropertyCallbackInfo<v8::Value>& info) 1094 static void limitedToOnlyOneAttributeAttributeGetterCallback(v8::Local<v8::Strin g>, const v8::PropertyCallbackInfo<v8::Value>& info)
1095 { 1095 {
1096 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 1096 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1097 TestObjectV8Internal::limitedToOnlyOneAttributeAttributeGetter(info); 1097 TestObjectV8Internal::limitedToOnlyOneAttributeAttributeGetter(info);
1098 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 1098 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1099 } 1099 }
1100 1100
1101 static void limitedToOnlyOneAttributeAttributeSetter(v8::Local<v8::Value> jsValu e, const v8::PropertyCallbackInfo<void>& info) 1101 static void limitedToOnlyOneAttributeAttributeSetter(v8::Local<v8::Value> jsValu e, const v8::PropertyCallbackInfo<void>& info)
1102 { 1102 {
1103 TestObject* impl = V8TestObject::toNative(info.Holder()); 1103 TestObject* impl = V8TestObject::toNative(info.Holder());
1104 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); 1104 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue);
1105 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; 1105 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
1106 impl->setAttribute(HTMLNames::limitedtoonlyoneattributeAttr, cppValue); 1106 impl->setAttribute(HTMLNames::limitedtoonlyoneattributeAttr, cppValue);
1107 } 1107 }
1108 1108
1109 static void limitedToOnlyOneAttributeAttributeSetterCallback(v8::Local<v8::Strin g>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 1109 static void limitedToOnlyOneAttributeAttributeSetterCallback(v8::Local<v8::Strin g>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1110 { 1110 {
1111 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 1111 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1112 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; 1112 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
1113 TestObjectV8Internal::limitedToOnlyOneAttributeAttributeSetter(jsValue, info ); 1113 TestObjectV8Internal::limitedToOnlyOneAttributeAttributeSetter(jsValue, info );
1114 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 1114 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1115 } 1115 }
1116 1116
1117 static void limitedToOnlyAttributeAttributeGetter(const v8::PropertyCallbackInfo <v8::Value>& info) 1117 static void limitedToOnlyAttributeAttributeGetter(const v8::PropertyCallbackInfo <v8::Value>& info)
1118 { 1118 {
1119 TestObject* impl = V8TestObject::toNative(info.Holder()); 1119 TestObject* impl = V8TestObject::toNative(info.Holder());
1120 String resultValue = impl->fastGetAttribute(HTMLNames::limitedtoonlyattribut eAttr); 1120 String jsValue = impl->fastGetAttribute(HTMLNames::limitedtoonlyattributeAtt r);
1121 if (resultValue.isEmpty()) { 1121 if (jsValue.isEmpty()) {
1122 ; 1122 ;
1123 } else if (equalIgnoringCase(resultValue, "Per")) { 1123 } else if (equalIgnoringCase(jsValue, "Per")) {
1124 resultValue = "Per"; 1124 jsValue = "Per";
1125 } else if (equalIgnoringCase(resultValue, "Paal")) { 1125 } else if (equalIgnoringCase(jsValue, "Paal")) {
1126 resultValue = "Paal"; 1126 jsValue = "Paal";
1127 } else if (equalIgnoringCase(resultValue, "Espen")) { 1127 } else if (equalIgnoringCase(jsValue, "Espen")) {
1128 resultValue = "Espen"; 1128 jsValue = "Espen";
1129 } else { 1129 } else {
1130 resultValue = ""; 1130 jsValue = "";
1131 } 1131 }
1132 v8SetReturnValueString(info, resultValue, info.GetIsolate()); 1132 v8SetReturnValueString(info, jsValue, info.GetIsolate());
1133 } 1133 }
1134 1134
1135 static void limitedToOnlyAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) 1135 static void limitedToOnlyAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1136 { 1136 {
1137 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 1137 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1138 TestObjectV8Internal::limitedToOnlyAttributeAttributeGetter(info); 1138 TestObjectV8Internal::limitedToOnlyAttributeAttributeGetter(info);
1139 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 1139 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1140 } 1140 }
1141 1141
1142 static void limitedToOnlyAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 1142 static void limitedToOnlyAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1143 { 1143 {
1144 TestObject* impl = V8TestObject::toNative(info.Holder()); 1144 TestObject* impl = V8TestObject::toNative(info.Holder());
1145 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); 1145 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue);
1146 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; 1146 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
1147 impl->setAttribute(HTMLNames::limitedtoonlyattributeAttr, cppValue); 1147 impl->setAttribute(HTMLNames::limitedtoonlyattributeAttr, cppValue);
1148 } 1148 }
1149 1149
1150 static void limitedToOnlyAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 1150 static void limitedToOnlyAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1151 { 1151 {
1152 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 1152 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1153 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; 1153 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
1154 TestObjectV8Internal::limitedToOnlyAttributeAttributeSetter(jsValue, info); 1154 TestObjectV8Internal::limitedToOnlyAttributeAttributeSetter(jsValue, info);
1155 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 1155 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1156 } 1156 }
1157 1157
1158 static void limitedToOnlyOtherAttributeAttributeGetter(const v8::PropertyCallbac kInfo<v8::Value>& info) 1158 static void limitedToOnlyOtherAttributeAttributeGetter(const v8::PropertyCallbac kInfo<v8::Value>& info)
1159 { 1159 {
1160 TestObject* impl = V8TestObject::toNative(info.Holder()); 1160 TestObject* impl = V8TestObject::toNative(info.Holder());
1161 String resultValue = impl->fastGetAttribute(HTMLNames::OtherAttr); 1161 String jsValue = impl->fastGetAttribute(HTMLNames::OtherAttr);
1162 if (resultValue.isEmpty()) { 1162 if (jsValue.isEmpty()) {
1163 ; 1163 ;
1164 } else if (equalIgnoringCase(resultValue, "Value1")) { 1164 } else if (equalIgnoringCase(jsValue, "Value1")) {
1165 resultValue = "Value1"; 1165 jsValue = "Value1";
1166 } else if (equalIgnoringCase(resultValue, "Value2")) { 1166 } else if (equalIgnoringCase(jsValue, "Value2")) {
1167 resultValue = "Value2"; 1167 jsValue = "Value2";
1168 } else { 1168 } else {
1169 resultValue = ""; 1169 jsValue = "";
1170 } 1170 }
1171 v8SetReturnValueString(info, resultValue, info.GetIsolate()); 1171 v8SetReturnValueString(info, jsValue, info.GetIsolate());
1172 } 1172 }
1173 1173
1174 static void limitedToOnlyOtherAttributeAttributeGetterCallback(v8::Local<v8::Str ing>, const v8::PropertyCallbackInfo<v8::Value>& info) 1174 static void limitedToOnlyOtherAttributeAttributeGetterCallback(v8::Local<v8::Str ing>, const v8::PropertyCallbackInfo<v8::Value>& info)
1175 { 1175 {
1176 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 1176 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1177 TestObjectV8Internal::limitedToOnlyOtherAttributeAttributeGetter(info); 1177 TestObjectV8Internal::limitedToOnlyOtherAttributeAttributeGetter(info);
1178 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 1178 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1179 } 1179 }
1180 1180
1181 static void limitedToOnlyOtherAttributeAttributeSetter(v8::Local<v8::Value> jsVa lue, const v8::PropertyCallbackInfo<void>& info) 1181 static void limitedToOnlyOtherAttributeAttributeSetter(v8::Local<v8::Value> jsVa lue, const v8::PropertyCallbackInfo<void>& info)
1182 { 1182 {
1183 TestObject* impl = V8TestObject::toNative(info.Holder()); 1183 TestObject* impl = V8TestObject::toNative(info.Holder());
1184 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); 1184 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue);
1185 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; 1185 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
1186 impl->setAttribute(HTMLNames::OtherAttr, cppValue); 1186 impl->setAttribute(HTMLNames::OtherAttr, cppValue);
1187 } 1187 }
1188 1188
1189 static void limitedToOnlyOtherAttributeAttributeSetterCallback(v8::Local<v8::Str ing>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 1189 static void limitedToOnlyOtherAttributeAttributeSetterCallback(v8::Local<v8::Str ing>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1190 { 1190 {
1191 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 1191 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1192 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; 1192 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
1193 TestObjectV8Internal::limitedToOnlyOtherAttributeAttributeSetter(jsValue, in fo); 1193 TestObjectV8Internal::limitedToOnlyOtherAttributeAttributeSetter(jsValue, in fo);
1194 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 1194 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1195 } 1195 }
1196 1196
1197 static void limitedWithMissingDefaultAttributeAttributeGetter(const v8::Property CallbackInfo<v8::Value>& info) 1197 static void limitedWithMissingDefaultAttributeAttributeGetter(const v8::Property CallbackInfo<v8::Value>& info)
1198 { 1198 {
1199 TestObject* impl = V8TestObject::toNative(info.Holder()); 1199 TestObject* impl = V8TestObject::toNative(info.Holder());
1200 String resultValue = impl->fastGetAttribute(HTMLNames::limitedwithmissingdef aultattributeAttr); 1200 String jsValue = impl->fastGetAttribute(HTMLNames::limitedwithmissingdefault attributeAttr);
1201 if (resultValue.isEmpty()) { 1201 if (jsValue.isEmpty()) {
1202 resultValue = "rsa"; 1202 jsValue = "rsa";
1203 } else if (equalIgnoringCase(resultValue, "rsa")) { 1203 } else if (equalIgnoringCase(jsValue, "rsa")) {
1204 resultValue = "rsa"; 1204 jsValue = "rsa";
1205 } else if (equalIgnoringCase(resultValue, "dsa")) { 1205 } else if (equalIgnoringCase(jsValue, "dsa")) {
1206 resultValue = "dsa"; 1206 jsValue = "dsa";
1207 } else { 1207 } else {
1208 resultValue = ""; 1208 jsValue = "";
1209 } 1209 }
1210 v8SetReturnValueString(info, resultValue, info.GetIsolate()); 1210 v8SetReturnValueString(info, jsValue, info.GetIsolate());
1211 } 1211 }
1212 1212
1213 static void limitedWithMissingDefaultAttributeAttributeGetterCallback(v8::Local< v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) 1213 static void limitedWithMissingDefaultAttributeAttributeGetterCallback(v8::Local< v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1214 { 1214 {
1215 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 1215 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1216 TestObjectV8Internal::limitedWithMissingDefaultAttributeAttributeGetter(info ); 1216 TestObjectV8Internal::limitedWithMissingDefaultAttributeAttributeGetter(info );
1217 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 1217 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1218 } 1218 }
1219 1219
1220 static void limitedWithMissingDefaultAttributeAttributeSetter(v8::Local<v8::Valu e> jsValue, const v8::PropertyCallbackInfo<void>& info) 1220 static void limitedWithMissingDefaultAttributeAttributeSetter(v8::Local<v8::Valu e> jsValue, const v8::PropertyCallbackInfo<void>& info)
1221 { 1221 {
1222 TestObject* impl = V8TestObject::toNative(info.Holder()); 1222 TestObject* impl = V8TestObject::toNative(info.Holder());
1223 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); 1223 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue);
1224 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; 1224 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
1225 impl->setAttribute(HTMLNames::limitedwithmissingdefaultattributeAttr, cppVal ue); 1225 impl->setAttribute(HTMLNames::limitedwithmissingdefaultattributeAttr, cppVal ue);
1226 } 1226 }
1227 1227
1228 static void limitedWithMissingDefaultAttributeAttributeSetterCallback(v8::Local< v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 1228 static void limitedWithMissingDefaultAttributeAttributeSetterCallback(v8::Local< v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1229 { 1229 {
1230 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 1230 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1231 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; 1231 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
1232 TestObjectV8Internal::limitedWithMissingDefaultAttributeAttributeSetter(jsVa lue, info); 1232 TestObjectV8Internal::limitedWithMissingDefaultAttributeAttributeSetter(jsVa lue, info);
1233 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 1233 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1234 } 1234 }
1235 1235
1236 static void limitedWithInvalidMissingDefaultAttributeAttributeGetter(const v8::P ropertyCallbackInfo<v8::Value>& info) 1236 static void limitedWithInvalidMissingDefaultAttributeAttributeGetter(const v8::P ropertyCallbackInfo<v8::Value>& info)
1237 { 1237 {
1238 TestObject* impl = V8TestObject::toNative(info.Holder()); 1238 TestObject* impl = V8TestObject::toNative(info.Holder());
1239 String resultValue = impl->fastGetAttribute(HTMLNames::limitedwithinvalidmis singdefaultattributeAttr); 1239 String jsValue = impl->fastGetAttribute(HTMLNames::limitedwithinvalidmissing defaultattributeAttr);
1240 if (resultValue.isEmpty()) { 1240 if (jsValue.isEmpty()) {
1241 resultValue = "auto"; 1241 jsValue = "auto";
1242 } else if (equalIgnoringCase(resultValue, "ltr")) { 1242 } else if (equalIgnoringCase(jsValue, "ltr")) {
1243 resultValue = "ltr"; 1243 jsValue = "ltr";
1244 } else if (equalIgnoringCase(resultValue, "rtl")) { 1244 } else if (equalIgnoringCase(jsValue, "rtl")) {
1245 resultValue = "rtl"; 1245 jsValue = "rtl";
1246 } else if (equalIgnoringCase(resultValue, "auto")) { 1246 } else if (equalIgnoringCase(jsValue, "auto")) {
1247 resultValue = "auto"; 1247 jsValue = "auto";
1248 } else { 1248 } else {
1249 resultValue = "ltr"; 1249 jsValue = "ltr";
1250 } 1250 }
1251 v8SetReturnValueString(info, resultValue, info.GetIsolate()); 1251 v8SetReturnValueString(info, jsValue, info.GetIsolate());
1252 } 1252 }
1253 1253
1254 static void limitedWithInvalidMissingDefaultAttributeAttributeGetterCallback(v8: :Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) 1254 static void limitedWithInvalidMissingDefaultAttributeAttributeGetterCallback(v8: :Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1255 { 1255 {
1256 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 1256 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1257 TestObjectV8Internal::limitedWithInvalidMissingDefaultAttributeAttributeGett er(info); 1257 TestObjectV8Internal::limitedWithInvalidMissingDefaultAttributeAttributeGett er(info);
1258 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 1258 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1259 } 1259 }
1260 1260
1261 static void limitedWithInvalidMissingDefaultAttributeAttributeSetter(v8::Local<v 8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 1261 static void limitedWithInvalidMissingDefaultAttributeAttributeSetter(v8::Local<v 8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1262 { 1262 {
1263 TestObject* impl = V8TestObject::toNative(info.Holder()); 1263 TestObject* impl = V8TestObject::toNative(info.Holder());
1264 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); 1264 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue);
1265 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; 1265 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
1266 impl->setAttribute(HTMLNames::limitedwithinvalidmissingdefaultattributeAttr, cppValue); 1266 impl->setAttribute(HTMLNames::limitedwithinvalidmissingdefaultattributeAttr, cppValue);
1267 } 1267 }
1268 1268
1269 static void limitedWithInvalidMissingDefaultAttributeAttributeSetterCallback(v8: :Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo <void>& info) 1269 static void limitedWithInvalidMissingDefaultAttributeAttributeSetterCallback(v8: :Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo <void>& info)
1270 { 1270 {
1271 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 1271 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1272 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; 1272 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
1273 TestObjectV8Internal::limitedWithInvalidMissingDefaultAttributeAttributeSett er(jsValue, info); 1273 TestObjectV8Internal::limitedWithInvalidMissingDefaultAttributeAttributeSett er(jsValue, info);
1274 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 1274 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1275 } 1275 }
1276 1276
1277 static void limitedWithInvalidAndMissingDefaultAttributeAttributeGetter(const v8 ::PropertyCallbackInfo<v8::Value>& info) 1277 static void limitedWithInvalidAndMissingDefaultAttributeAttributeGetter(const v8 ::PropertyCallbackInfo<v8::Value>& info)
1278 { 1278 {
1279 TestObject* impl = V8TestObject::toNative(info.Holder()); 1279 TestObject* impl = V8TestObject::toNative(info.Holder());
1280 String resultValue = impl->fastGetAttribute(HTMLNames::limitedwithinvalidand missingdefaultattributeAttr); 1280 String jsValue = impl->fastGetAttribute(HTMLNames::limitedwithinvalidandmiss ingdefaultattributeAttr);
1281 if (resultValue.isEmpty()) { 1281 if (jsValue.isEmpty()) {
1282 resultValue = "left"; 1282 jsValue = "left";
1283 } else if (equalIgnoringCase(resultValue, "left")) { 1283 } else if (equalIgnoringCase(jsValue, "left")) {
1284 resultValue = "left"; 1284 jsValue = "left";
1285 } else if (equalIgnoringCase(resultValue, "right")) { 1285 } else if (equalIgnoringCase(jsValue, "right")) {
1286 resultValue = "right"; 1286 jsValue = "right";
1287 } else { 1287 } else {
1288 resultValue = "left"; 1288 jsValue = "left";
1289 } 1289 }
1290 v8SetReturnValueString(info, resultValue, info.GetIsolate()); 1290 v8SetReturnValueString(info, jsValue, info.GetIsolate());
1291 } 1291 }
1292 1292
1293 static void limitedWithInvalidAndMissingDefaultAttributeAttributeGetterCallback( v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) 1293 static void limitedWithInvalidAndMissingDefaultAttributeAttributeGetterCallback( v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1294 { 1294 {
1295 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 1295 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1296 TestObjectV8Internal::limitedWithInvalidAndMissingDefaultAttributeAttributeG etter(info); 1296 TestObjectV8Internal::limitedWithInvalidAndMissingDefaultAttributeAttributeG etter(info);
1297 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 1297 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1298 } 1298 }
1299 1299
1300 static void limitedWithInvalidAndMissingDefaultAttributeAttributeSetter(v8::Loca l<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 1300 static void limitedWithInvalidAndMissingDefaultAttributeAttributeSetter(v8::Loca l<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
1301 { 1301 {
1302 TestObject* impl = V8TestObject::toNative(info.Holder()); 1302 TestObject* impl = V8TestObject::toNative(info.Holder());
1303 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); 1303 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue);
1304 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; 1304 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
1305 impl->setAttribute(HTMLNames::limitedwithinvalidandmissingdefaultattributeAt tr, cppValue); 1305 impl->setAttribute(HTMLNames::limitedwithinvalidandmissingdefaultattributeAt tr, cppValue);
1306 } 1306 }
1307 1307
1308 static void limitedWithInvalidAndMissingDefaultAttributeAttributeSetterCallback( v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackI nfo<void>& info) 1308 static void limitedWithInvalidAndMissingDefaultAttributeAttributeSetterCallback( v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackI nfo<void>& info)
1309 { 1309 {
1310 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 1310 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
1311 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; 1311 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
1312 TestObjectV8Internal::limitedWithInvalidAndMissingDefaultAttributeAttributeS etter(jsValue, info); 1312 TestObjectV8Internal::limitedWithInvalidAndMissingDefaultAttributeAttributeS etter(jsValue, info);
1313 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 1313 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1314 } 1314 }
1315 1315
1316 static void corsSettingAttributeAttributeGetter(const v8::PropertyCallbackInfo<v 8::Value>& info) 1316 static void corsSettingAttributeAttributeGetter(const v8::PropertyCallbackInfo<v 8::Value>& info)
1317 { 1317 {
1318 TestObject* impl = V8TestObject::toNative(info.Holder()); 1318 TestObject* impl = V8TestObject::toNative(info.Holder());
1319 String resultValue = impl->fastGetAttribute(HTMLNames::corssettingattributeA ttr); 1319 String jsValue = impl->fastGetAttribute(HTMLNames::corssettingattributeAttr) ;
1320 if (resultValue.isNull()) { 1320 if (jsValue.isNull()) {
1321 ; 1321 ;
1322 } else if (resultValue.isEmpty()) { 1322 } else if (jsValue.isEmpty()) {
1323 resultValue = "anonymous"; 1323 jsValue = "anonymous";
1324 } else if (equalIgnoringCase(resultValue, "anonymous")) { 1324 } else if (equalIgnoringCase(jsValue, "anonymous")) {
1325 resultValue = "anonymous"; 1325 jsValue = "anonymous";
1326 } else if (equalIgnoringCase(resultValue, "use-credentials")) { 1326 } else if (equalIgnoringCase(jsValue, "use-credentials")) {
1327 resultValue = "use-credentials"; 1327 jsValue = "use-credentials";
1328 } else { 1328 } else {
1329 resultValue = "anonymous"; 1329 jsValue = "anonymous";
1330 } 1330 }
1331 v8SetReturnValueString(info, resultValue, info.GetIsolate()); 1331 v8SetReturnValueString(info, jsValue, info.GetIsolate());
1332 } 1332 }
1333 1333
1334 static void corsSettingAttributeAttributeGetterCallback(v8::Local<v8::String>, c onst v8::PropertyCallbackInfo<v8::Value>& info) 1334 static void corsSettingAttributeAttributeGetterCallback(v8::Local<v8::String>, c onst v8::PropertyCallbackInfo<v8::Value>& info)
1335 { 1335 {
1336 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 1336 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1337 TestObjectV8Internal::corsSettingAttributeAttributeGetter(info); 1337 TestObjectV8Internal::corsSettingAttributeAttributeGetter(info);
1338 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 1338 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1339 } 1339 }
1340 1340
1341 static void limitedWithEmptyMissingInvalidAttributeAttributeGetter(const v8::Pro pertyCallbackInfo<v8::Value>& info) 1341 static void limitedWithEmptyMissingInvalidAttributeAttributeGetter(const v8::Pro pertyCallbackInfo<v8::Value>& info)
1342 { 1342 {
1343 TestObject* impl = V8TestObject::toNative(info.Holder()); 1343 TestObject* impl = V8TestObject::toNative(info.Holder());
1344 String resultValue = impl->fastGetAttribute(HTMLNames::limitedwithemptymissi nginvalidattributeAttr); 1344 String jsValue = impl->fastGetAttribute(HTMLNames::limitedwithemptymissingin validattributeAttr);
1345 if (resultValue.isNull()) { 1345 if (jsValue.isNull()) {
1346 resultValue = "missing"; 1346 jsValue = "missing";
1347 } else if (resultValue.isEmpty()) { 1347 } else if (jsValue.isEmpty()) {
1348 resultValue = "empty"; 1348 jsValue = "empty";
1349 } else if (equalIgnoringCase(resultValue, "empty")) { 1349 } else if (equalIgnoringCase(jsValue, "empty")) {
1350 resultValue = "empty"; 1350 jsValue = "empty";
1351 } else if (equalIgnoringCase(resultValue, "missing")) { 1351 } else if (equalIgnoringCase(jsValue, "missing")) {
1352 resultValue = "missing"; 1352 jsValue = "missing";
1353 } else if (equalIgnoringCase(resultValue, "invalid")) { 1353 } else if (equalIgnoringCase(jsValue, "invalid")) {
1354 resultValue = "invalid"; 1354 jsValue = "invalid";
1355 } else if (equalIgnoringCase(resultValue, "a-normal")) { 1355 } else if (equalIgnoringCase(jsValue, "a-normal")) {
1356 resultValue = "a-normal"; 1356 jsValue = "a-normal";
1357 } else { 1357 } else {
1358 resultValue = "invalid"; 1358 jsValue = "invalid";
1359 } 1359 }
1360 v8SetReturnValueString(info, resultValue, info.GetIsolate()); 1360 v8SetReturnValueString(info, jsValue, info.GetIsolate());
1361 } 1361 }
1362 1362
1363 static void limitedWithEmptyMissingInvalidAttributeAttributeGetterCallback(v8::L ocal<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) 1363 static void limitedWithEmptyMissingInvalidAttributeAttributeGetterCallback(v8::L ocal<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
1364 { 1364 {
1365 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 1365 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
1366 TestObjectV8Internal::limitedWithEmptyMissingInvalidAttributeAttributeGetter (info); 1366 TestObjectV8Internal::limitedWithEmptyMissingInvalidAttributeAttributeGetter (info);
1367 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 1367 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
1368 } 1368 }
1369 1369
1370 static void typedArrayAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Val ue>& info) 1370 static void typedArrayAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Val ue>& info)
(...skipping 4171 matching lines...) Expand 10 before | Expand all | Expand 10 after
5542 fromInternalPointer(object)->deref(); 5542 fromInternalPointer(object)->deref();
5543 } 5543 }
5544 5544
5545 template<> 5545 template<>
5546 v8::Handle<v8::Value> toV8NoInline(TestObject* impl, v8::Handle<v8::Object> crea tionContext, v8::Isolate* isolate) 5546 v8::Handle<v8::Value> toV8NoInline(TestObject* impl, v8::Handle<v8::Object> crea tionContext, v8::Isolate* isolate)
5547 { 5547 {
5548 return toV8(impl, creationContext, isolate); 5548 return toV8(impl, creationContext, isolate);
5549 } 5549 }
5550 5550
5551 } // namespace WebCore 5551 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/templates/attributes.cpp ('k') | Source/bindings/tests/results/V8TestObjectPython.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698