| OLD | NEW |
| 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 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 { | 208 { |
| 209 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMNamedProperty"); | 209 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMNamedProperty"); |
| 210 TestEventTargetV8Internal::namedPropertySetter(name, jsValue, info); | 210 TestEventTargetV8Internal::namedPropertySetter(name, jsValue, info); |
| 211 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 211 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 212 } | 212 } |
| 213 | 213 |
| 214 static void namedPropertyDeleter(v8::Local<v8::String> name, const v8::PropertyC
allbackInfo<v8::Boolean>& info) | 214 static void namedPropertyDeleter(v8::Local<v8::String> name, const v8::PropertyC
allbackInfo<v8::Boolean>& info) |
| 215 { | 215 { |
| 216 TestEventTarget* collection = V8TestEventTarget::toNative(info.Holder()); | 216 TestEventTarget* collection = V8TestEventTarget::toNative(info.Holder()); |
| 217 AtomicString propertyName = toCoreAtomicString(name); | 217 AtomicString propertyName = toCoreAtomicString(name); |
| 218 bool result = collection->anonymousNamedDeleter(propertyName); | 218 bool result = true; |
| 219 return v8SetReturnValueBool(info, result); | 219 bool knownProperty = collection->anonymousNamedDeleter(propertyName, result)
; |
| 220 if (knownProperty) |
| 221 return v8SetReturnValueBool(info, result); |
| 220 } | 222 } |
| 221 | 223 |
| 222 static void namedPropertyDeleterCallback(v8::Local<v8::String> name, const v8::P
ropertyCallbackInfo<v8::Boolean>& info) | 224 static void namedPropertyDeleterCallback(v8::Local<v8::String> name, const v8::P
ropertyCallbackInfo<v8::Boolean>& info) |
| 223 { | 225 { |
| 224 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMNamedProperty"); | 226 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMNamedProperty"); |
| 225 TestEventTargetV8Internal::namedPropertyDeleter(name, info); | 227 TestEventTargetV8Internal::namedPropertyDeleter(name, info); |
| 226 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 228 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 227 } | 229 } |
| 228 | 230 |
| 229 static void namedPropertyEnumerator(const v8::PropertyCallbackInfo<v8::Array>& i
nfo) | 231 static void namedPropertyEnumerator(const v8::PropertyCallbackInfo<v8::Array>& i
nfo) |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 351 fromInternalPointer(object)->deref(); | 353 fromInternalPointer(object)->deref(); |
| 352 } | 354 } |
| 353 | 355 |
| 354 template<> | 356 template<> |
| 355 v8::Handle<v8::Value> toV8NoInline(TestEventTarget* impl, v8::Handle<v8::Object>
creationContext, v8::Isolate* isolate) | 357 v8::Handle<v8::Value> toV8NoInline(TestEventTarget* impl, v8::Handle<v8::Object>
creationContext, v8::Isolate* isolate) |
| 356 { | 358 { |
| 357 return toV8(impl, creationContext, isolate); | 359 return toV8(impl, creationContext, isolate); |
| 358 } | 360 } |
| 359 | 361 |
| 360 } // namespace WebCore | 362 } // namespace WebCore |
| OLD | NEW |