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

Side by Side Diff: Source/bindings/tests/results/V8TestSpecialOperationsInt.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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 100
101 static void indexedPropertySetterCallback(uint32_t index, v8::Local<v8::Value> j sValue, const v8::PropertyCallbackInfo<v8::Value>& info) 101 static void indexedPropertySetterCallback(uint32_t index, v8::Local<v8::Value> j sValue, const v8::PropertyCallbackInfo<v8::Value>& info)
102 { 102 {
103 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMIndexedProperty"); 103 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMIndexedProperty");
104 TestSpecialOperationsIntV8Internal::indexedPropertySetter(index, jsValue, in fo); 104 TestSpecialOperationsIntV8Internal::indexedPropertySetter(index, jsValue, in fo);
105 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 105 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
106 } 106 }
107 107
108 static void namedPropertyGetter(v8::Local<v8::String> name, const v8::PropertyCa llbackInfo<v8::Value>& info) 108 static void namedPropertyGetter(v8::Local<v8::String> name, const v8::PropertyCa llbackInfo<v8::Value>& info)
109 { 109 {
110 if (info.Holder()->HasRealNamedProperty(name))
111 return;
110 if (!info.Holder()->GetRealNamedPropertyInPrototypeChain(name).IsEmpty()) 112 if (!info.Holder()->GetRealNamedPropertyInPrototypeChain(name).IsEmpty())
111 return; 113 return;
112 if (info.Holder()->HasRealNamedCallbackProperty(name))
113 return;
114 if (info.Holder()->HasRealNamedProperty(name))
115 return;
116 114
117 TestSpecialOperationsInt* collection = V8TestSpecialOperationsInt::toNative( info.Holder()); 115 TestSpecialOperationsInt* collection = V8TestSpecialOperationsInt::toNative( info.Holder());
118 AtomicString propertyName = toCoreAtomicString(name); 116 AtomicString propertyName = toCoreAtomicString(name);
119 int element = collection->anonymousNamedGetter(propertyName); 117 int element = collection->anonymousNamedGetter(propertyName);
120 if () 118 if ()
121 return; 119 return;
122 v8SetReturnValueInt(info, element); 120 v8SetReturnValueInt(info, element);
123 } 121 }
124 122
125 static void namedPropertyGetterCallback(v8::Local<v8::String> name, const v8::Pr opertyCallbackInfo<v8::Value>& info) 123 static void namedPropertyGetterCallback(v8::Local<v8::String> name, const v8::Pr opertyCallbackInfo<v8::Value>& info)
126 { 124 {
127 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMNamedProperty"); 125 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMNamedProperty");
128 TestSpecialOperationsIntV8Internal::namedPropertyGetter(name, info); 126 TestSpecialOperationsIntV8Internal::namedPropertyGetter(name, info);
129 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 127 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
130 } 128 }
131 129
132 static void namedPropertySetter(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<v8::Value>& info) 130 static void namedPropertySetter(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<v8::Value>& info)
133 { 131 {
132 if (info.Holder()->HasRealNamedProperty(name))
133 return;
134 if (!info.Holder()->GetRealNamedPropertyInPrototypeChain(name).IsEmpty()) 134 if (!info.Holder()->GetRealNamedPropertyInPrototypeChain(name).IsEmpty())
135 return; 135 return;
136 if (info.Holder()->HasRealNamedCallbackProperty(name))
137 return;
138 if (info.Holder()->HasRealNamedProperty(name))
139 return;
140 136
141 TestSpecialOperationsInt* collection = V8TestSpecialOperationsInt::toNative( info.Holder()); 137 TestSpecialOperationsInt* collection = V8TestSpecialOperationsInt::toNative( info.Holder());
142 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, propertyName, name) ; 138 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, propertyName, name) ;
143 V8TRYCATCH_EXCEPTION_VOID(unsigned, propertyValue, toUInt32(jsValue, excepti onState), exceptionState); 139 V8TRYCATCH_EXCEPTION_VOID(unsigned, propertyValue, toUInt32(jsValue, excepti onState), exceptionState);
144 ExceptionState exceptionState(info.Holder(), info.GetIsolate()); 140 ExceptionState exceptionState(info.Holder(), info.GetIsolate());
145 bool result = collection->anonymousNamedSetter(propertyName, propertyValue); 141 bool result = collection->anonymousNamedSetter(propertyName, propertyValue);
146 if (!result) 142 if (!result)
147 return; 143 return;
148 v8SetReturnValue(info, jsValue); 144 v8SetReturnValue(info, jsValue);
149 } 145 }
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 fromInternalPointer(object)->deref(); 259 fromInternalPointer(object)->deref();
264 } 260 }
265 261
266 template<> 262 template<>
267 v8::Handle<v8::Value> toV8NoInline(TestSpecialOperationsInt* impl, v8::Handle<v8 ::Object> creationContext, v8::Isolate* isolate) 263 v8::Handle<v8::Value> toV8NoInline(TestSpecialOperationsInt* impl, v8::Handle<v8 ::Object> creationContext, v8::Isolate* isolate)
268 { 264 {
269 return toV8(impl, creationContext, isolate); 265 return toV8(impl, creationContext, isolate);
270 } 266 }
271 267
272 } // namespace WebCore 268 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698