| 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 6404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6415 return; | 6415 return; |
| 6416 } | 6416 } |
| 6417 | 6417 |
| 6418 static void raisesExceptionVoidMethodOptionalTestCallbackInterfaceArgMethodCallb
ack(const v8::FunctionCallbackInfo<v8::Value>& info) | 6418 static void raisesExceptionVoidMethodOptionalTestCallbackInterfaceArgMethodCallb
ack(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 6419 { | 6419 { |
| 6420 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 6420 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 6421 TestObjectPythonV8Internal::raisesExceptionVoidMethodOptionalTestCallbackInt
erfaceArgMethod(info); | 6421 TestObjectPythonV8Internal::raisesExceptionVoidMethodOptionalTestCallbackInt
erfaceArgMethod(info); |
| 6422 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 6422 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 6423 } | 6423 } |
| 6424 | 6424 |
| 6425 static void raisesExceptionTestInterfaceEmptyVoidMethodMethod(const v8::Function
CallbackInfo<v8::Value>& info) |
| 6426 { |
| 6427 ExceptionState exceptionState(ExceptionState::ExecutionContext, "raisesExcep
tionTestInterfaceEmptyVoidMethod", "TestObjectPython", info.Holder(), info.GetIs
olate()); |
| 6428 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); |
| 6429 RefPtr<TestInterfaceEmpty> result = imp->raisesExceptionTestInterfaceEmptyVo
idMethod(exceptionState); |
| 6430 if (exceptionState.throwIfNeeded()) |
| 6431 return; |
| 6432 v8SetReturnValue(info, result.release()); |
| 6433 } |
| 6434 |
| 6435 static void raisesExceptionTestInterfaceEmptyVoidMethodMethodCallback(const v8::
FunctionCallbackInfo<v8::Value>& info) |
| 6436 { |
| 6437 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 6438 TestObjectPythonV8Internal::raisesExceptionTestInterfaceEmptyVoidMethodMetho
d(info); |
| 6439 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 6440 } |
| 6441 |
| 6425 static void readOnlyVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>&
info) | 6442 static void readOnlyVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>&
info) |
| 6426 { | 6443 { |
| 6427 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); | 6444 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); |
| 6428 imp->readOnlyVoidMethod(); | 6445 imp->readOnlyVoidMethod(); |
| 6429 } | 6446 } |
| 6430 | 6447 |
| 6431 static void readOnlyVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::
Value>& info) | 6448 static void readOnlyVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::
Value>& info) |
| 6432 { | 6449 { |
| 6433 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 6450 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 6434 TestObjectPythonV8Internal::readOnlyVoidMethodMethod(info); | 6451 TestObjectPythonV8Internal::readOnlyVoidMethodMethod(info); |
| (...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6844 {"measureAsVoidMethod", TestObjectPythonV8Internal::measureAsVoidMethodMetho
dCallback, 0, 0}, | 6861 {"measureAsVoidMethod", TestObjectPythonV8Internal::measureAsVoidMethodMetho
dCallback, 0, 0}, |
| 6845 {"perWorldBindingsVoidMethod", TestObjectPythonV8Internal::perWorldBindingsV
oidMethodMethodCallback, TestObjectPythonV8Internal::perWorldBindingsVoidMethodM
ethodCallbackForMainWorld, 0}, | 6862 {"perWorldBindingsVoidMethod", TestObjectPythonV8Internal::perWorldBindingsV
oidMethodMethodCallback, TestObjectPythonV8Internal::perWorldBindingsVoidMethodM
ethodCallbackForMainWorld, 0}, |
| 6846 {"activityLoggingForAllWorldsPerWorldBindingsVoidMethod", TestObjectPythonV8
Internal::activityLoggingForAllWorldsPerWorldBindingsVoidMethodMethodCallback, T
estObjectPythonV8Internal::activityLoggingForAllWorldsPerWorldBindingsVoidMethod
MethodCallbackForMainWorld, 0}, | 6863 {"activityLoggingForAllWorldsPerWorldBindingsVoidMethod", TestObjectPythonV8
Internal::activityLoggingForAllWorldsPerWorldBindingsVoidMethodMethodCallback, T
estObjectPythonV8Internal::activityLoggingForAllWorldsPerWorldBindingsVoidMethod
MethodCallbackForMainWorld, 0}, |
| 6847 {"activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethod", TestObjectPyt
honV8Internal::activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethodMethodC
allback, TestObjectPythonV8Internal::activityLoggingForIsolatedWorldsPerWorldBin
dingsVoidMethodMethodCallbackForMainWorld, 0}, | 6864 {"activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethod", TestObjectPyt
honV8Internal::activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethodMethodC
allback, TestObjectPythonV8Internal::activityLoggingForIsolatedWorldsPerWorldBin
dingsVoidMethodMethodCallbackForMainWorld, 0}, |
| 6848 {"perWorldBindingsVoidMethodTestInterfaceEmptyArg", TestObjectPythonV8Intern
al::perWorldBindingsVoidMethodTestInterfaceEmptyArgMethodCallback, TestObjectPyt
honV8Internal::perWorldBindingsVoidMethodTestInterfaceEmptyArgMethodCallbackForM
ainWorld, 1}, | 6865 {"perWorldBindingsVoidMethodTestInterfaceEmptyArg", TestObjectPythonV8Intern
al::perWorldBindingsVoidMethodTestInterfaceEmptyArgMethodCallback, TestObjectPyt
honV8Internal::perWorldBindingsVoidMethodTestInterfaceEmptyArgMethodCallbackForM
ainWorld, 1}, |
| 6849 {"raisesExceptionVoidMethod", TestObjectPythonV8Internal::raisesExceptionVoi
dMethodMethodCallback, 0, 0}, | 6866 {"raisesExceptionVoidMethod", TestObjectPythonV8Internal::raisesExceptionVoi
dMethodMethodCallback, 0, 0}, |
| 6850 {"raisesExceptionStringMethod", TestObjectPythonV8Internal::raisesExceptionS
tringMethodMethodCallback, 0, 0}, | 6867 {"raisesExceptionStringMethod", TestObjectPythonV8Internal::raisesExceptionS
tringMethodMethodCallback, 0, 0}, |
| 6851 {"raisesExceptionVoidMethodOptionalLongArg", TestObjectPythonV8Internal::rai
sesExceptionVoidMethodOptionalLongArgMethodCallback, 0, 0}, | 6868 {"raisesExceptionVoidMethodOptionalLongArg", TestObjectPythonV8Internal::rai
sesExceptionVoidMethodOptionalLongArgMethodCallback, 0, 0}, |
| 6852 {"raisesExceptionVoidMethodTestCallbackInterfaceArg", TestObjectPythonV8Inte
rnal::raisesExceptionVoidMethodTestCallbackInterfaceArgMethodCallback, 0, 1}, | 6869 {"raisesExceptionVoidMethodTestCallbackInterfaceArg", TestObjectPythonV8Inte
rnal::raisesExceptionVoidMethodTestCallbackInterfaceArgMethodCallback, 0, 1}, |
| 6853 {"raisesExceptionVoidMethodOptionalTestCallbackInterfaceArg", TestObjectPyth
onV8Internal::raisesExceptionVoidMethodOptionalTestCallbackInterfaceArgMethodCal
lback, 0, 0}, | 6870 {"raisesExceptionVoidMethodOptionalTestCallbackInterfaceArg", TestObjectPyth
onV8Internal::raisesExceptionVoidMethodOptionalTestCallbackInterfaceArgMethodCal
lback, 0, 0}, |
| 6871 {"raisesExceptionTestInterfaceEmptyVoidMethod", TestObjectPythonV8Internal::
raisesExceptionTestInterfaceEmptyVoidMethodMethodCallback, 0, 0}, |
| 6854 {"strictTypeCheckingVoidMethodTestInterfaceEmptyArg", TestObjectPythonV8Inte
rnal::strictTypeCheckingVoidMethodTestInterfaceEmptyArgMethodCallback, 0, 1}, | 6872 {"strictTypeCheckingVoidMethodTestInterfaceEmptyArg", TestObjectPythonV8Inte
rnal::strictTypeCheckingVoidMethodTestInterfaceEmptyArgMethodCallback, 0, 1}, |
| 6855 {"strictTypeCheckingVoidMethodNullableTestInterfaceEmptyArg", TestObjectPyth
onV8Internal::strictTypeCheckingVoidMethodNullableTestInterfaceEmptyArgMethodCal
lback, 0, 1}, | 6873 {"strictTypeCheckingVoidMethodNullableTestInterfaceEmptyArg", TestObjectPyth
onV8Internal::strictTypeCheckingVoidMethodNullableTestInterfaceEmptyArgMethodCal
lback, 0, 1}, |
| 6856 {"treatReturnedNullStringAsNullStringMethod", TestObjectPythonV8Internal::tr
eatReturnedNullStringAsNullStringMethodMethodCallback, 0, 0}, | 6874 {"treatReturnedNullStringAsNullStringMethod", TestObjectPythonV8Internal::tr
eatReturnedNullStringAsNullStringMethodMethodCallback, 0, 0}, |
| 6857 {"treatReturnedNullStringAsUndefinedStringMethod", TestObjectPythonV8Interna
l::treatReturnedNullStringAsUndefinedStringMethodMethodCallback, 0, 0}, | 6875 {"treatReturnedNullStringAsUndefinedStringMethod", TestObjectPythonV8Interna
l::treatReturnedNullStringAsUndefinedStringMethodMethodCallback, 0, 0}, |
| 6858 }; | 6876 }; |
| 6859 | 6877 |
| 6860 static void configureV8TestObjectPythonTemplate(v8::Handle<v8::FunctionTemplate>
functionTemplate, v8::Isolate* isolate, WrapperWorldType currentWorldType) | 6878 static void configureV8TestObjectPythonTemplate(v8::Handle<v8::FunctionTemplate>
functionTemplate, v8::Isolate* isolate, WrapperWorldType currentWorldType) |
| 6861 { | 6879 { |
| 6862 functionTemplate->ReadOnlyPrototype(); | 6880 functionTemplate->ReadOnlyPrototype(); |
| 6863 | 6881 |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7020 fromInternalPointer(object)->deref(); | 7038 fromInternalPointer(object)->deref(); |
| 7021 } | 7039 } |
| 7022 | 7040 |
| 7023 template<> | 7041 template<> |
| 7024 v8::Handle<v8::Value> toV8NoInline(TestObjectPython* impl, v8::Handle<v8::Object
> creationContext, v8::Isolate* isolate) | 7042 v8::Handle<v8::Value> toV8NoInline(TestObjectPython* impl, v8::Handle<v8::Object
> creationContext, v8::Isolate* isolate) |
| 7025 { | 7043 { |
| 7026 return toV8(impl, creationContext, isolate); | 7044 return toV8(impl, creationContext, isolate); |
| 7027 } | 7045 } |
| 7028 | 7046 |
| 7029 } // namespace WebCore | 7047 } // namespace WebCore |
| OLD | NEW |