| 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 16 matching lines...) Expand all Loading... |
| 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 29 */ | 29 */ |
| 30 | 30 |
| 31 // This file has been auto-generated by code_generator_v8.pm. DO NOT MODIFY! | 31 // This file has been auto-generated by code_generator_v8.pm. DO NOT MODIFY! |
| 32 | 32 |
| 33 #include "config.h" | 33 #include "config.h" |
| 34 #include "V8TestSpecialOperationsIdentifierRaisesException.h" | 34 #include "V8TestSpecialOperationsIdentifierRaisesException.h" |
| 35 | 35 |
| 36 #include "RuntimeEnabledFeatures.h" | 36 #include "RuntimeEnabledFeatures.h" |
| 37 #include "V8TestInterfaceEmpty.h" |
| 37 #include "bindings/v8/ExceptionState.h" | 38 #include "bindings/v8/ExceptionState.h" |
| 38 #include "bindings/v8/V8DOMConfiguration.h" | 39 #include "bindings/v8/V8DOMConfiguration.h" |
| 39 #include "bindings/v8/V8ObjectConstructor.h" | 40 #include "bindings/v8/V8ObjectConstructor.h" |
| 40 #include "core/dom/ContextFeatures.h" | 41 #include "core/dom/ContextFeatures.h" |
| 41 #include "core/dom/Document.h" | 42 #include "core/dom/Document.h" |
| 42 #include "platform/TraceEvent.h" | 43 #include "platform/TraceEvent.h" |
| 44 #include "wtf/GetPtr.h" |
| 45 #include "wtf/RefPtr.h" |
| 43 | 46 |
| 44 namespace WebCore { | 47 namespace WebCore { |
| 45 | 48 |
| 46 static void initializeScriptWrappableForInterface(TestSpecialOperationsIdentifie
rRaisesException* object) | 49 static void initializeScriptWrappableForInterface(TestSpecialOperationsIdentifie
rRaisesException* object) |
| 47 { | 50 { |
| 48 if (ScriptWrappable::wrapperCanBeStoredInObject(object)) | 51 if (ScriptWrappable::wrapperCanBeStoredInObject(object)) |
| 49 ScriptWrappable::setTypeInfoInObject(object, &V8TestSpecialOperationsIde
ntifierRaisesException::wrapperTypeInfo); | 52 ScriptWrappable::setTypeInfoInObject(object, &V8TestSpecialOperationsIde
ntifierRaisesException::wrapperTypeInfo); |
| 50 else | 53 else |
| 51 ASSERT_NOT_REACHED(); | 54 ASSERT_NOT_REACHED(); |
| 52 } | 55 } |
| (...skipping 19 matching lines...) Expand all Loading... |
| 72 static void itemMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 75 static void itemMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 73 { | 76 { |
| 74 ExceptionState exceptionState(ExceptionState::ExecutionContext, "item", "Tes
tSpecialOperationsIdentifierRaisesException", info.Holder(), info.GetIsolate()); | 77 ExceptionState exceptionState(ExceptionState::ExecutionContext, "item", "Tes
tSpecialOperationsIdentifierRaisesException", info.Holder(), info.GetIsolate()); |
| 75 if (UNLIKELY(info.Length() < 1)) { | 78 if (UNLIKELY(info.Length() < 1)) { |
| 76 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); | 79 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); |
| 77 exceptionState.throwIfNeeded(); | 80 exceptionState.throwIfNeeded(); |
| 78 return; | 81 return; |
| 79 } | 82 } |
| 80 TestSpecialOperationsIdentifierRaisesException* imp = V8TestSpecialOperation
sIdentifierRaisesException::toNative(info.Holder()); | 83 TestSpecialOperationsIdentifierRaisesException* imp = V8TestSpecialOperation
sIdentifierRaisesException::toNative(info.Holder()); |
| 81 V8TRYCATCH_EXCEPTION_VOID(unsigned, index, toUInt32(info[0], exceptionState)
, exceptionState); | 84 V8TRYCATCH_EXCEPTION_VOID(unsigned, index, toUInt32(info[0], exceptionState)
, exceptionState); |
| 82 String result = imp->item(index, exceptionState); | 85 RefPtr<TestInterfaceEmpty> result = imp->item(index, exceptionState); |
| 83 if (exceptionState.throwIfNeeded()) | 86 if (exceptionState.throwIfNeeded()) |
| 84 return; | 87 return; |
| 85 v8SetReturnValueString(info, result, info.GetIsolate()); | 88 v8SetReturnValue(info, result.release()); |
| 86 } | 89 } |
| 87 | 90 |
| 88 static void itemMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) | 91 static void itemMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 89 { | 92 { |
| 90 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 93 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 91 TestSpecialOperationsIdentifierRaisesExceptionV8Internal::itemMethod(info); | 94 TestSpecialOperationsIdentifierRaisesExceptionV8Internal::itemMethod(info); |
| 92 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 95 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 93 } | 96 } |
| 94 | 97 |
| 95 static void setItemMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 98 static void setItemMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 static void namedItemMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 145 static void namedItemMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 143 { | 146 { |
| 144 ExceptionState exceptionState(ExceptionState::ExecutionContext, "namedItem",
"TestSpecialOperationsIdentifierRaisesException", info.Holder(), info.GetIsolat
e()); | 147 ExceptionState exceptionState(ExceptionState::ExecutionContext, "namedItem",
"TestSpecialOperationsIdentifierRaisesException", info.Holder(), info.GetIsolat
e()); |
| 145 if (UNLIKELY(info.Length() < 1)) { | 148 if (UNLIKELY(info.Length() < 1)) { |
| 146 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); | 149 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); |
| 147 exceptionState.throwIfNeeded(); | 150 exceptionState.throwIfNeeded(); |
| 148 return; | 151 return; |
| 149 } | 152 } |
| 150 TestSpecialOperationsIdentifierRaisesException* imp = V8TestSpecialOperation
sIdentifierRaisesException::toNative(info.Holder()); | 153 TestSpecialOperationsIdentifierRaisesException* imp = V8TestSpecialOperation
sIdentifierRaisesException::toNative(info.Holder()); |
| 151 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, name, info[0]); | 154 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, name, info[0]); |
| 152 String result = imp->namedItem(name, exceptionState); | 155 RefPtr<TestInterfaceEmpty> result = imp->namedItem(name, exceptionState); |
| 153 if (exceptionState.throwIfNeeded()) | 156 if (exceptionState.throwIfNeeded()) |
| 154 return; | 157 return; |
| 155 v8SetReturnValueString(info, result, info.GetIsolate()); | 158 v8SetReturnValue(info, result.release()); |
| 156 } | 159 } |
| 157 | 160 |
| 158 static void namedItemMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) | 161 static void namedItemMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) |
| 159 { | 162 { |
| 160 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 163 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 161 TestSpecialOperationsIdentifierRaisesExceptionV8Internal::namedItemMethod(in
fo); | 164 TestSpecialOperationsIdentifierRaisesExceptionV8Internal::namedItemMethod(in
fo); |
| 162 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 165 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 163 } | 166 } |
| 164 | 167 |
| 165 static void setNamedItemMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 168 static void setNamedItemMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 206 { | 209 { |
| 207 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 210 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 208 TestSpecialOperationsIdentifierRaisesExceptionV8Internal::deleteNamedItemMet
hod(info); | 211 TestSpecialOperationsIdentifierRaisesExceptionV8Internal::deleteNamedItemMet
hod(info); |
| 209 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 212 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 210 } | 213 } |
| 211 | 214 |
| 212 static void indexedPropertyGetter(uint32_t index, const v8::PropertyCallbackInfo
<v8::Value>& info) | 215 static void indexedPropertyGetter(uint32_t index, const v8::PropertyCallbackInfo
<v8::Value>& info) |
| 213 { | 216 { |
| 214 TestSpecialOperationsIdentifierRaisesException* collection = V8TestSpecialOp
erationsIdentifierRaisesException::toNative(info.Holder()); | 217 TestSpecialOperationsIdentifierRaisesException* collection = V8TestSpecialOp
erationsIdentifierRaisesException::toNative(info.Holder()); |
| 215 ExceptionState exceptionState(info.Holder(), info.GetIsolate()); | 218 ExceptionState exceptionState(info.Holder(), info.GetIsolate()); |
| 216 String element = collection->item(index, exceptionState); | 219 RefPtr<TestInterfaceEmpty> element = collection->item(index, exceptionState)
; |
| 217 if (exceptionState.throwIfNeeded()) | 220 if (exceptionState.throwIfNeeded()) |
| 218 return; | 221 return; |
| 219 if (element.isNull()) | 222 if (!element) |
| 220 return; | 223 return; |
| 221 v8SetReturnValueString(info, element, info.GetIsolate()); | 224 v8SetReturnValueFast(info, element.release(), collection); |
| 222 } | 225 } |
| 223 | 226 |
| 224 static void indexedPropertyGetterCallback(uint32_t index, const v8::PropertyCall
backInfo<v8::Value>& info) | 227 static void indexedPropertyGetterCallback(uint32_t index, const v8::PropertyCall
backInfo<v8::Value>& info) |
| 225 { | 228 { |
| 226 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMIndexedProperty"); | 229 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMIndexedProperty"); |
| 227 TestSpecialOperationsIdentifierRaisesExceptionV8Internal::indexedPropertyGet
ter(index, info); | 230 TestSpecialOperationsIdentifierRaisesExceptionV8Internal::indexedPropertyGet
ter(index, info); |
| 228 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 231 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 229 } | 232 } |
| 230 | 233 |
| 231 static void indexedPropertySetter(uint32_t index, v8::Local<v8::Value> jsValue,
const v8::PropertyCallbackInfo<v8::Value>& info) | 234 static void indexedPropertySetter(uint32_t index, v8::Local<v8::Value> jsValue,
const v8::PropertyCallbackInfo<v8::Value>& info) |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 271 if (!info.Holder()->GetRealNamedPropertyInPrototypeChain(name).IsEmpty()) | 274 if (!info.Holder()->GetRealNamedPropertyInPrototypeChain(name).IsEmpty()) |
| 272 return; | 275 return; |
| 273 if (info.Holder()->HasRealNamedCallbackProperty(name)) | 276 if (info.Holder()->HasRealNamedCallbackProperty(name)) |
| 274 return; | 277 return; |
| 275 if (info.Holder()->HasRealNamedProperty(name)) | 278 if (info.Holder()->HasRealNamedProperty(name)) |
| 276 return; | 279 return; |
| 277 | 280 |
| 278 TestSpecialOperationsIdentifierRaisesException* collection = V8TestSpecialOp
erationsIdentifierRaisesException::toNative(info.Holder()); | 281 TestSpecialOperationsIdentifierRaisesException* collection = V8TestSpecialOp
erationsIdentifierRaisesException::toNative(info.Holder()); |
| 279 AtomicString propertyName = toCoreAtomicString(name); | 282 AtomicString propertyName = toCoreAtomicString(name); |
| 280 ExceptionState exceptionState(info.Holder(), info.GetIsolate()); | 283 ExceptionState exceptionState(info.Holder(), info.GetIsolate()); |
| 281 String element = collection->namedItem(propertyName, exceptionState); | 284 RefPtr<TestInterfaceEmpty> element = collection->namedItem(propertyName, exc
eptionState); |
| 282 if (exceptionState.throwIfNeeded()) | 285 if (exceptionState.throwIfNeeded()) |
| 283 return; | 286 return; |
| 284 if (element.isNull()) | 287 if (!element) |
| 285 return; | 288 return; |
| 286 v8SetReturnValueString(info, element, info.GetIsolate()); | 289 v8SetReturnValueFast(info, element.release(), collection); |
| 287 } | 290 } |
| 288 | 291 |
| 289 static void namedPropertyGetterCallback(v8::Local<v8::String> name, const v8::Pr
opertyCallbackInfo<v8::Value>& info) | 292 static void namedPropertyGetterCallback(v8::Local<v8::String> name, const v8::Pr
opertyCallbackInfo<v8::Value>& info) |
| 290 { | 293 { |
| 291 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMNamedProperty"); | 294 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMNamedProperty"); |
| 292 TestSpecialOperationsIdentifierRaisesExceptionV8Internal::namedPropertyGette
r(name, info); | 295 TestSpecialOperationsIdentifierRaisesExceptionV8Internal::namedPropertyGette
r(name, info); |
| 293 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 296 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 294 } | 297 } |
| 295 | 298 |
| 296 static void namedPropertySetter(v8::Local<v8::String> name, v8::Local<v8::Value>
jsValue, const v8::PropertyCallbackInfo<v8::Value>& info) | 299 static void namedPropertySetter(v8::Local<v8::String> name, v8::Local<v8::Value>
jsValue, const v8::PropertyCallbackInfo<v8::Value>& info) |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 457 fromInternalPointer(object)->deref(); | 460 fromInternalPointer(object)->deref(); |
| 458 } | 461 } |
| 459 | 462 |
| 460 template<> | 463 template<> |
| 461 v8::Handle<v8::Value> toV8NoInline(TestSpecialOperationsIdentifierRaisesExceptio
n* impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate) | 464 v8::Handle<v8::Value> toV8NoInline(TestSpecialOperationsIdentifierRaisesExceptio
n* impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate) |
| 462 { | 465 { |
| 463 return toV8(impl, creationContext, isolate); | 466 return toV8(impl, creationContext, isolate); |
| 464 } | 467 } |
| 465 | 468 |
| 466 } // namespace WebCore | 469 } // namespace WebCore |
| OLD | NEW |