| OLD | NEW |
| 1 /* | 1 /* |
| 2 This file is part of the Blink open source project. | 2 This file is part of the Blink open source project. |
| 3 This file has been auto-generated by CodeGeneratorV8.pm. DO NOT MODIFY! | 3 This file has been auto-generated by CodeGeneratorV8.pm. DO NOT MODIFY! |
| 4 | 4 |
| 5 This library is free software; you can redistribute it and/or | 5 This library is free software; you can redistribute it and/or |
| 6 modify it under the terms of the GNU Library General Public | 6 modify it under the terms of the GNU Library General Public |
| 7 License as published by the Free Software Foundation; either | 7 License as published by the Free Software Foundation; either |
| 8 version 2 of the License, or (at your option) any later version. | 8 version 2 of the License, or (at your option) any later version. |
| 9 | 9 |
| 10 This library is distributed in the hope that it will be useful, | 10 This library is distributed in the hope that it will be useful, |
| 11 but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 13 Library General Public License for more details. | 13 Library General Public License for more details. |
| 14 | 14 |
| 15 You should have received a copy of the GNU Library General Public License | 15 You should have received a copy of the GNU Library General Public License |
| 16 along with this library; see the file COPYING.LIB. If not, write to | 16 along with this library; see the file COPYING.LIB. If not, write to |
| 17 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | 17 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
| 18 Boston, MA 02111-1307, USA. | 18 Boston, MA 02111-1307, USA. |
| 19 */ | 19 */ |
| 20 | 20 |
| 21 #include "config.h" | 21 #include "config.h" |
| 22 #include "V8TestInterfaceImplementedAs.h" | 22 #include "V8TestInterfaceImplementedAs.h" |
| 23 | 23 |
| 24 #include "RuntimeEnabledFeatures.h" | 24 #include "RuntimeEnabledFeatures.h" |
| 25 #include "bindings/v8/ExceptionMessages.h" |
| 25 #include "bindings/v8/ExceptionState.h" | 26 #include "bindings/v8/ExceptionState.h" |
| 26 #include "bindings/v8/ScriptController.h" | 27 #include "bindings/v8/ScriptController.h" |
| 27 #include "bindings/v8/V8Binding.h" | 28 #include "bindings/v8/V8Binding.h" |
| 28 #include "bindings/v8/V8DOMConfiguration.h" | 29 #include "bindings/v8/V8DOMConfiguration.h" |
| 29 #include "bindings/v8/V8DOMWrapper.h" | 30 #include "bindings/v8/V8DOMWrapper.h" |
| 30 #include "core/dom/ContextFeatures.h" | 31 #include "core/dom/ContextFeatures.h" |
| 31 #include "core/dom/Document.h" | 32 #include "core/dom/Document.h" |
| 32 #include "core/platform/chromium/TraceEvent.h" | 33 #include "core/platform/chromium/TraceEvent.h" |
| 33 #include "wtf/GetPtr.h" | 34 #include "wtf/GetPtr.h" |
| 34 #include "wtf/RefPtr.h" | 35 #include "wtf/RefPtr.h" |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 static void bAttributeSetterCallback(v8::Local<v8::String> name, v8::Local<v8::V
alue> value, const v8::PropertyCallbackInfo<void>& info) | 117 static void bAttributeSetterCallback(v8::Local<v8::String> name, v8::Local<v8::V
alue> value, const v8::PropertyCallbackInfo<void>& info) |
| 117 { | 118 { |
| 118 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 119 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 119 RealClassV8Internal::bAttributeSetter(name, value, info); | 120 RealClassV8Internal::bAttributeSetter(name, value, info); |
| 120 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 121 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 121 } | 122 } |
| 122 | 123 |
| 123 static void func1Method(const v8::FunctionCallbackInfo<v8::Value>& args) | 124 static void func1Method(const v8::FunctionCallbackInfo<v8::Value>& args) |
| 124 { | 125 { |
| 125 if (UNLIKELY(args.Length() < 1)) { | 126 if (UNLIKELY(args.Length() < 1)) { |
| 126 throwNotEnoughArgumentsError(args.GetIsolate()); | 127 throwTypeError(ExceptionMessages::failedToExecute("func1", "RealClass",
ExceptionMessages::notEnoughArguments(1, args.Length())), args.GetIsolate()); |
| 127 return; | 128 return; |
| 128 } | 129 } |
| 129 RealClass* imp = V8TestInterfaceImplementedAs::toNative(args.Holder()); | 130 RealClass* imp = V8TestInterfaceImplementedAs::toNative(args.Holder()); |
| 130 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, a, args[0]); | 131 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, a, args[0]); |
| 131 v8SetReturnValueString(args, imp->func1(a), args.GetIsolate()); | 132 v8SetReturnValueString(args, imp->func1(a), args.GetIsolate()); |
| 132 return; | 133 return; |
| 133 } | 134 } |
| 134 | 135 |
| 135 static void func1MethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args) | 136 static void func1MethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args) |
| 136 { | 137 { |
| 137 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 138 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 138 RealClassV8Internal::func1Method(args); | 139 RealClassV8Internal::func1Method(args); |
| 139 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 140 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 140 } | 141 } |
| 141 | 142 |
| 142 static void funcTestInterfaceImplementedAsParamMethod(const v8::FunctionCallback
Info<v8::Value>& args) | 143 static void funcTestInterfaceImplementedAsParamMethod(const v8::FunctionCallback
Info<v8::Value>& args) |
| 143 { | 144 { |
| 144 if (UNLIKELY(args.Length() < 1)) { | 145 if (UNLIKELY(args.Length() < 1)) { |
| 145 throwNotEnoughArgumentsError(args.GetIsolate()); | 146 throwTypeError(ExceptionMessages::failedToExecute("funcTestInterfaceImpl
ementedAsParam", "RealClass", ExceptionMessages::notEnoughArguments(1, args.Leng
th())), args.GetIsolate()); |
| 146 return; | 147 return; |
| 147 } | 148 } |
| 148 RealClass* imp = V8TestInterfaceImplementedAs::toNative(args.Holder()); | 149 RealClass* imp = V8TestInterfaceImplementedAs::toNative(args.Holder()); |
| 149 V8TRYCATCH_VOID(RealClass*, orange, V8TestInterfaceImplementedAs::HasInstanc
e(args[0], args.GetIsolate(), worldType(args.GetIsolate())) ? V8TestInterfaceImp
lementedAs::toNative(v8::Handle<v8::Object>::Cast(args[0])) : 0); | 150 V8TRYCATCH_VOID(RealClass*, orange, V8TestInterfaceImplementedAs::HasInstanc
e(args[0], args.GetIsolate(), worldType(args.GetIsolate())) ? V8TestInterfaceImp
lementedAs::toNative(v8::Handle<v8::Object>::Cast(args[0])) : 0); |
| 150 v8SetReturnValueString(args, imp->funcTestInterfaceImplementedAsParam(orange
), args.GetIsolate()); | 151 v8SetReturnValueString(args, imp->funcTestInterfaceImplementedAsParam(orange
), args.GetIsolate()); |
| 151 return; | 152 return; |
| 152 } | 153 } |
| 153 | 154 |
| 154 static void funcTestInterfaceImplementedAsParamMethodCallback(const v8::Function
CallbackInfo<v8::Value>& args) | 155 static void funcTestInterfaceImplementedAsParamMethodCallback(const v8::Function
CallbackInfo<v8::Value>& args) |
| 155 { | 156 { |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 240 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceImplementedAs>(impl,
&info, wrapper, isolate, WrapperConfiguration::Independent); | 241 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceImplementedAs>(impl,
&info, wrapper, isolate, WrapperConfiguration::Independent); |
| 241 return wrapper; | 242 return wrapper; |
| 242 } | 243 } |
| 243 | 244 |
| 244 void V8TestInterfaceImplementedAs::derefObject(void* object) | 245 void V8TestInterfaceImplementedAs::derefObject(void* object) |
| 245 { | 246 { |
| 246 fromInternalPointer(object)->deref(); | 247 fromInternalPointer(object)->deref(); |
| 247 } | 248 } |
| 248 | 249 |
| 249 } // namespace WebCore | 250 } // namespace WebCore |
| OLD | NEW |