| 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 7119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7130 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 7130 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 7131 } | 7131 } |
| 7132 | 7132 |
| 7133 static void strictTypeCheckingVoidMethodTestInterfaceEmptyArgMethod(const v8::Fu
nctionCallbackInfo<v8::Value>& info) | 7133 static void strictTypeCheckingVoidMethodTestInterfaceEmptyArgMethod(const v8::Fu
nctionCallbackInfo<v8::Value>& info) |
| 7134 { | 7134 { |
| 7135 if (UNLIKELY(info.Length() < 1)) { | 7135 if (UNLIKELY(info.Length() < 1)) { |
| 7136 throwTypeError(ExceptionMessages::failedToExecute("strictTypeCheckingVoi
dMethodTestInterfaceEmptyArg", "TestObjectPython", ExceptionMessages::notEnoughA
rguments(1, info.Length())), info.GetIsolate()); | 7136 throwTypeError(ExceptionMessages::failedToExecute("strictTypeCheckingVoi
dMethodTestInterfaceEmptyArg", "TestObjectPython", ExceptionMessages::notEnoughA
rguments(1, info.Length())), info.GetIsolate()); |
| 7137 return; | 7137 return; |
| 7138 } | 7138 } |
| 7139 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); | 7139 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); |
| 7140 if (info.Length() > 0 && !info[0]->IsUndefined() && !V8TestInterfaceEmpty::h
asInstance(info[0], info.GetIsolate())) { | 7140 if (info.Length() > 0 && (isUndefinedOrNull(info[0]) || !V8TestInterfaceEmpt
y::hasInstance(info[0], info.GetIsolate()))) { |
| 7141 throwTypeError(ExceptionMessages::failedToExecute("strictTypeCheckingVoi
dMethodTestInterfaceEmptyArg", "TestObjectPython", "parameter 1 is not of type '
TestInterfaceEmpty'."), info.GetIsolate()); | 7141 throwTypeError(ExceptionMessages::failedToExecute("strictTypeCheckingVoi
dMethodTestInterfaceEmptyArg", "TestObjectPython", "parameter 1 is not of type '
TestInterfaceEmpty'."), info.GetIsolate()); |
| 7142 return; | 7142 return; |
| 7143 } | 7143 } |
| 7144 V8TRYCATCH_VOID(TestInterfaceEmpty*, testInterfaceEmptyArg, V8TestInterfaceE
mpty::hasInstance(info[0], info.GetIsolate()) ? V8TestInterfaceEmpty::toNative(v
8::Handle<v8::Object>::Cast(info[0])) : 0); | 7144 V8TRYCATCH_VOID(TestInterfaceEmpty*, testInterfaceEmptyArg, V8TestInterfaceE
mpty::hasInstance(info[0], info.GetIsolate()) ? V8TestInterfaceEmpty::toNative(v
8::Handle<v8::Object>::Cast(info[0])) : 0); |
| 7145 imp->strictTypeCheckingVoidMethodTestInterfaceEmptyArg(testInterfaceEmptyArg
); | 7145 imp->strictTypeCheckingVoidMethodTestInterfaceEmptyArg(testInterfaceEmptyArg
); |
| 7146 } | 7146 } |
| 7147 | 7147 |
| 7148 static void strictTypeCheckingVoidMethodTestInterfaceEmptyArgMethodCallback(cons
t v8::FunctionCallbackInfo<v8::Value>& info) | 7148 static void strictTypeCheckingVoidMethodTestInterfaceEmptyArgMethodCallback(cons
t v8::FunctionCallbackInfo<v8::Value>& info) |
| 7149 { | 7149 { |
| 7150 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 7150 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 7151 TestObjectPythonV8Internal::strictTypeCheckingVoidMethodTestInterfaceEmptyAr
gMethod(info); | 7151 TestObjectPythonV8Internal::strictTypeCheckingVoidMethodTestInterfaceEmptyAr
gMethod(info); |
| 7152 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 7152 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 7153 } | 7153 } |
| 7154 | 7154 |
| 7155 static void strictTypeCheckingVoidMethodNullableTestInterfaceEmptyArgMethod(cons
t v8::FunctionCallbackInfo<v8::Value>& info) | 7155 static void strictTypeCheckingVoidMethodNullableTestInterfaceEmptyArgMethod(cons
t v8::FunctionCallbackInfo<v8::Value>& info) |
| 7156 { | 7156 { |
| 7157 if (UNLIKELY(info.Length() < 1)) { | 7157 if (UNLIKELY(info.Length() < 1)) { |
| 7158 throwTypeError(ExceptionMessages::failedToExecute("strictTypeCheckingVoi
dMethodNullableTestInterfaceEmptyArg", "TestObjectPython", ExceptionMessages::no
tEnoughArguments(1, info.Length())), info.GetIsolate()); | 7158 throwTypeError(ExceptionMessages::failedToExecute("strictTypeCheckingVoi
dMethodNullableTestInterfaceEmptyArg", "TestObjectPython", ExceptionMessages::no
tEnoughArguments(1, info.Length())), info.GetIsolate()); |
| 7159 return; | 7159 return; |
| 7160 } | 7160 } |
| 7161 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); | 7161 TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder()); |
| 7162 if (info.Length() > 0 && !isUndefinedOrNull(info[0]) && !V8TestInterfaceEmpt
y::hasInstance(info[0], info.GetIsolate())) { | 7162 if (info.Length() > 0 && (!isUndefinedOrNull(info[0]) && !V8TestInterfaceEmp
ty::hasInstance(info[0], info.GetIsolate()))) { |
| 7163 throwTypeError(ExceptionMessages::failedToExecute("strictTypeCheckingVoi
dMethodNullableTestInterfaceEmptyArg", "TestObjectPython", "parameter 1 is not o
f type 'TestInterfaceEmpty'."), info.GetIsolate()); | 7163 throwTypeError(ExceptionMessages::failedToExecute("strictTypeCheckingVoi
dMethodNullableTestInterfaceEmptyArg", "TestObjectPython", "parameter 1 is not o
f type 'TestInterfaceEmpty'."), info.GetIsolate()); |
| 7164 return; | 7164 return; |
| 7165 } | 7165 } |
| 7166 V8TRYCATCH_VOID(TestInterfaceEmpty*, testInterfaceEmptyArg, V8TestInterfaceE
mpty::hasInstance(info[0], info.GetIsolate()) ? V8TestInterfaceEmpty::toNative(v
8::Handle<v8::Object>::Cast(info[0])) : 0); | 7166 V8TRYCATCH_VOID(TestInterfaceEmpty*, testInterfaceEmptyArg, V8TestInterfaceE
mpty::hasInstance(info[0], info.GetIsolate()) ? V8TestInterfaceEmpty::toNative(v
8::Handle<v8::Object>::Cast(info[0])) : 0); |
| 7167 imp->strictTypeCheckingVoidMethodNullableTestInterfaceEmptyArg(testInterface
EmptyArg); | 7167 imp->strictTypeCheckingVoidMethodNullableTestInterfaceEmptyArg(testInterface
EmptyArg); |
| 7168 } | 7168 } |
| 7169 | 7169 |
| 7170 static void strictTypeCheckingVoidMethodNullableTestInterfaceEmptyArgMethodCallb
ack(const v8::FunctionCallbackInfo<v8::Value>& info) | 7170 static void strictTypeCheckingVoidMethodNullableTestInterfaceEmptyArgMethodCallb
ack(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 7171 { | 7171 { |
| 7172 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 7172 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| (...skipping 507 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7680 fromInternalPointer(object)->deref(); | 7680 fromInternalPointer(object)->deref(); |
| 7681 } | 7681 } |
| 7682 | 7682 |
| 7683 template<> | 7683 template<> |
| 7684 v8::Handle<v8::Value> toV8NoInline(TestObjectPython* impl, v8::Handle<v8::Object
> creationContext, v8::Isolate* isolate) | 7684 v8::Handle<v8::Value> toV8NoInline(TestObjectPython* impl, v8::Handle<v8::Object
> creationContext, v8::Isolate* isolate) |
| 7685 { | 7685 { |
| 7686 return toV8(impl, creationContext, isolate); | 7686 return toV8(impl, creationContext, isolate); |
| 7687 } | 7687 } |
| 7688 | 7688 |
| 7689 } // namespace WebCore | 7689 } // namespace WebCore |
| OLD | NEW |