| 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 6279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6290 return; | 6290 return; |
| 6291 } | 6291 } |
| 6292 | 6292 |
| 6293 static void raisesExceptionVoidMethodMethodCallback(const v8::FunctionCallbackIn
fo<v8::Value>& info) | 6293 static void raisesExceptionVoidMethodMethodCallback(const v8::FunctionCallbackIn
fo<v8::Value>& info) |
| 6294 { | 6294 { |
| 6295 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 6295 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 6296 TestObjectPythonV8Internal::raisesExceptionVoidMethodMethod(info); | 6296 TestObjectPythonV8Internal::raisesExceptionVoidMethodMethod(info); |
| 6297 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 6297 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 6298 } | 6298 } |
| 6299 | 6299 |
| 6300 static void raisesExceptionStringMethodMethod(const v8::FunctionCallbackInfo<v8:
:Value>& info) |
| 6301 { |
| 6302 ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExcep
tionStringMethod", "TestObjectPython", info.Holder(), info.GetIsolate()); |
| 6303 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); |
| 6304 String result = imp->raisesExceptionStringMethod(exceptionState); |
| 6305 if (exceptionState.throwIfNeeded()) |
| 6306 return; |
| 6307 v8SetReturnValueString(info, result, info.GetIsolate()); |
| 6308 } |
| 6309 |
| 6310 static void raisesExceptionStringMethodMethodCallback(const v8::FunctionCallback
Info<v8::Value>& info) |
| 6311 { |
| 6312 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 6313 TestObjectPythonV8Internal::raisesExceptionStringMethodMethod(info); |
| 6314 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 6315 } |
| 6316 |
| 6300 static void raisesExceptionVoidMethodOptionalLongArgMethod(const v8::FunctionCal
lbackInfo<v8::Value>& info) | 6317 static void raisesExceptionVoidMethodOptionalLongArgMethod(const v8::FunctionCal
lbackInfo<v8::Value>& info) |
| 6301 { | 6318 { |
| 6302 ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExcep
tionVoidMethodOptionalLongArg", "TestObjectPython", info.Holder(), info.GetIsola
te()); | 6319 ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExcep
tionVoidMethodOptionalLongArg", "TestObjectPython", info.Holder(), info.GetIsola
te()); |
| 6303 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); | 6320 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); |
| 6304 if (UNLIKELY(info.Length() <= 0)) { | 6321 if (UNLIKELY(info.Length() <= 0)) { |
| 6305 imp->raisesExceptionVoidMethodOptionalLongArg(exceptionState); | 6322 imp->raisesExceptionVoidMethodOptionalLongArg(exceptionState); |
| 6306 if (exceptionState.throwIfNeeded()) | 6323 if (exceptionState.throwIfNeeded()) |
| 6307 return; | 6324 return; |
| 6308 return; | 6325 return; |
| 6309 } | 6326 } |
| (...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6767 #endif // ENABLE(CONDITION) | 6784 #endif // ENABLE(CONDITION) |
| 6768 {"customElementCallbacksVoidMethod", TestObjectPythonV8Internal::customEleme
ntCallbacksVoidMethodMethodCallback, 0, 0}, | 6785 {"customElementCallbacksVoidMethod", TestObjectPythonV8Internal::customEleme
ntCallbacksVoidMethodMethodCallback, 0, 0}, |
| 6769 {"deprecatedVoidMethod", TestObjectPythonV8Internal::deprecatedVoidMethodMet
hodCallback, 0, 0}, | 6786 {"deprecatedVoidMethod", TestObjectPythonV8Internal::deprecatedVoidMethodMet
hodCallback, 0, 0}, |
| 6770 {"implementedAsVoidMethod", TestObjectPythonV8Internal::implementedAsVoidMet
hodMethodCallback, 0, 0}, | 6787 {"implementedAsVoidMethod", TestObjectPythonV8Internal::implementedAsVoidMet
hodMethodCallback, 0, 0}, |
| 6771 {"measureAsVoidMethod", TestObjectPythonV8Internal::measureAsVoidMethodMetho
dCallback, 0, 0}, | 6788 {"measureAsVoidMethod", TestObjectPythonV8Internal::measureAsVoidMethodMetho
dCallback, 0, 0}, |
| 6772 {"perWorldBindingsVoidMethod", TestObjectPythonV8Internal::perWorldBindingsV
oidMethodMethodCallback, TestObjectPythonV8Internal::perWorldBindingsVoidMethodM
ethodCallbackForMainWorld, 0}, | 6789 {"perWorldBindingsVoidMethod", TestObjectPythonV8Internal::perWorldBindingsV
oidMethodMethodCallback, TestObjectPythonV8Internal::perWorldBindingsVoidMethodM
ethodCallbackForMainWorld, 0}, |
| 6773 {"activityLoggingForAllWorldsPerWorldBindingsVoidMethod", TestObjectPythonV8
Internal::activityLoggingForAllWorldsPerWorldBindingsVoidMethodMethodCallback, T
estObjectPythonV8Internal::activityLoggingForAllWorldsPerWorldBindingsVoidMethod
MethodCallbackForMainWorld, 0}, | 6790 {"activityLoggingForAllWorldsPerWorldBindingsVoidMethod", TestObjectPythonV8
Internal::activityLoggingForAllWorldsPerWorldBindingsVoidMethodMethodCallback, T
estObjectPythonV8Internal::activityLoggingForAllWorldsPerWorldBindingsVoidMethod
MethodCallbackForMainWorld, 0}, |
| 6774 {"activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethod", TestObjectPyt
honV8Internal::activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethodMethodC
allback, TestObjectPythonV8Internal::activityLoggingForIsolatedWorldsPerWorldBin
dingsVoidMethodMethodCallbackForMainWorld, 0}, | 6791 {"activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethod", TestObjectPyt
honV8Internal::activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethodMethodC
allback, TestObjectPythonV8Internal::activityLoggingForIsolatedWorldsPerWorldBin
dingsVoidMethodMethodCallbackForMainWorld, 0}, |
| 6775 {"perWorldBindingsVoidMethodTestInterfaceEmptyArg", TestObjectPythonV8Intern
al::perWorldBindingsVoidMethodTestInterfaceEmptyArgMethodCallback, TestObjectPyt
honV8Internal::perWorldBindingsVoidMethodTestInterfaceEmptyArgMethodCallbackForM
ainWorld, 1}, | 6792 {"perWorldBindingsVoidMethodTestInterfaceEmptyArg", TestObjectPythonV8Intern
al::perWorldBindingsVoidMethodTestInterfaceEmptyArgMethodCallback, TestObjectPyt
honV8Internal::perWorldBindingsVoidMethodTestInterfaceEmptyArgMethodCallbackForM
ainWorld, 1}, |
| 6776 {"raisesExceptionVoidMethod", TestObjectPythonV8Internal::raisesExceptionVoi
dMethodMethodCallback, 0, 0}, | 6793 {"raisesExceptionVoidMethod", TestObjectPythonV8Internal::raisesExceptionVoi
dMethodMethodCallback, 0, 0}, |
| 6794 {"raisesExceptionStringMethod", TestObjectPythonV8Internal::raisesExceptionS
tringMethodMethodCallback, 0, 0}, |
| 6777 {"raisesExceptionVoidMethodOptionalLongArg", TestObjectPythonV8Internal::rai
sesExceptionVoidMethodOptionalLongArgMethodCallback, 0, 0}, | 6795 {"raisesExceptionVoidMethodOptionalLongArg", TestObjectPythonV8Internal::rai
sesExceptionVoidMethodOptionalLongArgMethodCallback, 0, 0}, |
| 6778 {"raisesExceptionVoidMethodTestCallbackInterfaceArg", TestObjectPythonV8Inte
rnal::raisesExceptionVoidMethodTestCallbackInterfaceArgMethodCallback, 0, 1}, | 6796 {"raisesExceptionVoidMethodTestCallbackInterfaceArg", TestObjectPythonV8Inte
rnal::raisesExceptionVoidMethodTestCallbackInterfaceArgMethodCallback, 0, 1}, |
| 6779 {"raisesExceptionVoidMethodOptionalTestCallbackInterfaceArg", TestObjectPyth
onV8Internal::raisesExceptionVoidMethodOptionalTestCallbackInterfaceArgMethodCal
lback, 0, 0}, | 6797 {"raisesExceptionVoidMethodOptionalTestCallbackInterfaceArg", TestObjectPyth
onV8Internal::raisesExceptionVoidMethodOptionalTestCallbackInterfaceArgMethodCal
lback, 0, 0}, |
| 6780 {"strictTypeCheckingVoidMethodTestInterfaceEmptyArg", TestObjectPythonV8Inte
rnal::strictTypeCheckingVoidMethodTestInterfaceEmptyArgMethodCallback, 0, 1}, | 6798 {"strictTypeCheckingVoidMethodTestInterfaceEmptyArg", TestObjectPythonV8Inte
rnal::strictTypeCheckingVoidMethodTestInterfaceEmptyArgMethodCallback, 0, 1}, |
| 6781 {"treatReturnedNullStringAsNullStringMethod", TestObjectPythonV8Internal::tr
eatReturnedNullStringAsNullStringMethodMethodCallback, 0, 0}, | 6799 {"treatReturnedNullStringAsNullStringMethod", TestObjectPythonV8Internal::tr
eatReturnedNullStringAsNullStringMethodMethodCallback, 0, 0}, |
| 6782 {"treatReturnedNullStringAsUndefinedStringMethod", TestObjectPythonV8Interna
l::treatReturnedNullStringAsUndefinedStringMethodMethodCallback, 0, 0}, | 6800 {"treatReturnedNullStringAsUndefinedStringMethod", TestObjectPythonV8Interna
l::treatReturnedNullStringAsUndefinedStringMethodMethodCallback, 0, 0}, |
| 6783 }; | 6801 }; |
| 6784 | 6802 |
| 6785 static void configureV8TestObjectPythonTemplate(v8::Handle<v8::FunctionTemplate>
functionTemplate, v8::Isolate* isolate, WrapperWorldType currentWorldType) | 6803 static void configureV8TestObjectPythonTemplate(v8::Handle<v8::FunctionTemplate>
functionTemplate, v8::Isolate* isolate, WrapperWorldType currentWorldType) |
| 6786 { | 6804 { |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6945 fromInternalPointer(object)->deref(); | 6963 fromInternalPointer(object)->deref(); |
| 6946 } | 6964 } |
| 6947 | 6965 |
| 6948 template<> | 6966 template<> |
| 6949 v8::Handle<v8::Value> toV8NoInline(TestObjectPython* impl, v8::Handle<v8::Object
> creationContext, v8::Isolate* isolate) | 6967 v8::Handle<v8::Value> toV8NoInline(TestObjectPython* impl, v8::Handle<v8::Object
> creationContext, v8::Isolate* isolate) |
| 6950 { | 6968 { |
| 6951 return toV8(impl, creationContext, isolate); | 6969 return toV8(impl, creationContext, isolate); |
| 6952 } | 6970 } |
| 6953 | 6971 |
| 6954 } // namespace WebCore | 6972 } // namespace WebCore |
| OLD | NEW |