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

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

Issue 158273002: Remove [OverrideBuiltins] from HTMLCollection (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 10 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 /* 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 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 161
162 static void indexedPropertyDeleterCallback(uint32_t index, const v8::PropertyCal lbackInfo<v8::Boolean>& info) 162 static void indexedPropertyDeleterCallback(uint32_t index, const v8::PropertyCal lbackInfo<v8::Boolean>& info)
163 { 163 {
164 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMIndexedProperty"); 164 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMIndexedProperty");
165 TestEventTargetV8Internal::indexedPropertyDeleter(index, info); 165 TestEventTargetV8Internal::indexedPropertyDeleter(index, info);
166 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 166 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
167 } 167 }
168 168
169 static void namedPropertyGetter(v8::Local<v8::String> name, const v8::PropertyCa llbackInfo<v8::Value>& info) 169 static void namedPropertyGetter(v8::Local<v8::String> name, const v8::PropertyCa llbackInfo<v8::Value>& info)
170 { 170 {
171 if (info.Holder()->HasRealNamedProperty(name))
172 return;
171 if (!info.Holder()->GetRealNamedPropertyInPrototypeChain(name).IsEmpty()) 173 if (!info.Holder()->GetRealNamedPropertyInPrototypeChain(name).IsEmpty())
172 return; 174 return;
173 if (info.Holder()->HasRealNamedCallbackProperty(name))
174 return;
175 if (info.Holder()->HasRealNamedProperty(name))
176 return;
177 175
178 TestEventTarget* collection = V8TestEventTarget::toNative(info.Holder()); 176 TestEventTarget* collection = V8TestEventTarget::toNative(info.Holder());
179 AtomicString propertyName = toCoreAtomicString(name); 177 AtomicString propertyName = toCoreAtomicString(name);
180 RefPtr<Node> element = collection->namedItem(propertyName); 178 RefPtr<Node> element = collection->namedItem(propertyName);
181 if (!element) 179 if (!element)
182 return; 180 return;
183 v8SetReturnValueFast(info, element.release(), collection); 181 v8SetReturnValueFast(info, element.release(), collection);
184 } 182 }
185 183
186 static void namedPropertyGetterCallback(v8::Local<v8::String> name, const v8::Pr opertyCallbackInfo<v8::Value>& info) 184 static void namedPropertyGetterCallback(v8::Local<v8::String> name, const v8::Pr opertyCallbackInfo<v8::Value>& info)
187 { 185 {
188 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMNamedProperty"); 186 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMNamedProperty");
189 TestEventTargetV8Internal::namedPropertyGetter(name, info); 187 TestEventTargetV8Internal::namedPropertyGetter(name, info);
190 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 188 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
191 } 189 }
192 190
193 static void namedPropertySetter(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<v8::Value>& info) 191 static void namedPropertySetter(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<v8::Value>& info)
194 { 192 {
193 if (info.Holder()->HasRealNamedProperty(name))
194 return;
195 if (!info.Holder()->GetRealNamedPropertyInPrototypeChain(name).IsEmpty()) 195 if (!info.Holder()->GetRealNamedPropertyInPrototypeChain(name).IsEmpty())
196 return; 196 return;
197 if (info.Holder()->HasRealNamedCallbackProperty(name))
198 return;
199 if (info.Holder()->HasRealNamedProperty(name))
200 return;
201 197
202 TestEventTarget* collection = V8TestEventTarget::toNative(info.Holder()); 198 TestEventTarget* collection = V8TestEventTarget::toNative(info.Holder());
203 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, propertyName, name) ; 199 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, propertyName, name) ;
204 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, propertyValue, jsVa lue); 200 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, propertyValue, jsVa lue);
205 bool result = collection->anonymousNamedSetter(propertyName, propertyValue); 201 bool result = collection->anonymousNamedSetter(propertyName, propertyValue);
206 if (!result) 202 if (!result)
207 return; 203 return;
208 v8SetReturnValue(info, jsValue); 204 v8SetReturnValue(info, jsValue);
209 } 205 }
210 206
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 fromInternalPointer(object)->deref(); 345 fromInternalPointer(object)->deref();
350 } 346 }
351 347
352 template<> 348 template<>
353 v8::Handle<v8::Value> toV8NoInline(TestEventTarget* impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate) 349 v8::Handle<v8::Value> toV8NoInline(TestEventTarget* impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
354 { 350 {
355 return toV8(impl, creationContext, isolate); 351 return toV8(impl, creationContext, isolate);
356 } 352 }
357 353
358 } // namespace WebCore 354 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698