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 "V8TestCallback.h" | 22 #include "V8TestCallback.h" |
23 | 23 |
24 #include "V8Class1.h" | |
25 #include "V8Class2.h" | |
26 #include "V8DOMStringList.h" | 24 #include "V8DOMStringList.h" |
| 25 #include "V8TestObj.h" |
27 #include "bindings/v8/V8Binding.h" | 26 #include "bindings/v8/V8Binding.h" |
28 #include "bindings/v8/V8Callback.h" | 27 #include "bindings/v8/V8Callback.h" |
29 #include "core/dom/ScriptExecutionContext.h" | 28 #include "core/dom/ScriptExecutionContext.h" |
30 #include "wtf/Assertions.h" | 29 #include "wtf/Assertions.h" |
31 #include "wtf/GetPtr.h" | 30 #include "wtf/GetPtr.h" |
32 #include "wtf/RefCounted.h" | 31 #include "wtf/RefCounted.h" |
33 #include "wtf/RefPtr.h" | 32 #include "wtf/RefPtr.h" |
34 namespace WebCore { | 33 namespace WebCore { |
35 | 34 |
36 V8TestCallback::V8TestCallback(v8::Handle<v8::Object> callback, ScriptExecutionC
ontext* context) | 35 V8TestCallback::V8TestCallback(v8::Handle<v8::Object> callback, ScriptExecutionC
ontext* context) |
(...skipping 22 matching lines...) Expand all Loading... |
59 | 58 |
60 v8::Context::Scope scope(v8Context); | 59 v8::Context::Scope scope(v8Context); |
61 | 60 |
62 | 61 |
63 v8::Handle<v8::Value> *argv = 0; | 62 v8::Handle<v8::Value> *argv = 0; |
64 | 63 |
65 bool callbackReturnValue = false; | 64 bool callbackReturnValue = false; |
66 return !invokeCallback(m_callback.get(), 0, argv, callbackReturnValue, scrip
tExecutionContext()); | 65 return !invokeCallback(m_callback.get(), 0, argv, callbackReturnValue, scrip
tExecutionContext()); |
67 } | 66 } |
68 | 67 |
69 bool V8TestCallback::callbackWithClass1Param(Class1* class1Param) | 68 bool V8TestCallback::callbackWithTestObjParam(TestObj* class1Param) |
70 { | 69 { |
71 if (!canInvokeCallback()) | 70 if (!canInvokeCallback()) |
72 return true; | 71 return true; |
73 | 72 |
74 v8::HandleScope handleScope; | 73 v8::HandleScope handleScope; |
75 | 74 |
76 v8::Handle<v8::Context> v8Context = toV8Context(scriptExecutionContext(), m_
world.get()); | 75 v8::Handle<v8::Context> v8Context = toV8Context(scriptExecutionContext(), m_
world.get()); |
77 if (v8Context.IsEmpty()) | 76 if (v8Context.IsEmpty()) |
78 return true; | 77 return true; |
79 | 78 |
80 v8::Context::Scope scope(v8Context); | 79 v8::Context::Scope scope(v8Context); |
81 | 80 |
82 v8::Handle<v8::Value> class1ParamHandle = toV8(class1Param, v8::Handle<v8::O
bject>(), v8Context->GetIsolate()); | 81 v8::Handle<v8::Value> class1ParamHandle = toV8(class1Param, v8::Handle<v8::O
bject>(), v8Context->GetIsolate()); |
83 if (class1ParamHandle.IsEmpty()) { | 82 if (class1ParamHandle.IsEmpty()) { |
84 if (!isScriptControllerTerminating()) | 83 if (!isScriptControllerTerminating()) |
85 CRASH(); | 84 CRASH(); |
86 return true; | 85 return true; |
87 } | 86 } |
88 | 87 |
89 v8::Handle<v8::Value> argv[] = { | 88 v8::Handle<v8::Value> argv[] = { |
90 class1ParamHandle | 89 class1ParamHandle |
91 }; | 90 }; |
92 | 91 |
93 bool callbackReturnValue = false; | 92 bool callbackReturnValue = false; |
94 return !invokeCallback(m_callback.get(), 1, argv, callbackReturnValue, scrip
tExecutionContext()); | 93 return !invokeCallback(m_callback.get(), 1, argv, callbackReturnValue, scrip
tExecutionContext()); |
95 } | 94 } |
96 | 95 |
97 bool V8TestCallback::callbackWithClass2Param(Class2* class2Param, const String&
strArg) | 96 bool V8TestCallback::callbackWithTestObjParam(TestObj* class2Param, const String
& strArg) |
98 { | 97 { |
99 if (!canInvokeCallback()) | 98 if (!canInvokeCallback()) |
100 return true; | 99 return true; |
101 | 100 |
102 v8::HandleScope handleScope; | 101 v8::HandleScope handleScope; |
103 | 102 |
104 v8::Handle<v8::Context> v8Context = toV8Context(scriptExecutionContext(), m_
world.get()); | 103 v8::Handle<v8::Context> v8Context = toV8Context(scriptExecutionContext(), m_
world.get()); |
105 if (v8Context.IsEmpty()) | 104 if (v8Context.IsEmpty()) |
106 return true; | 105 return true; |
107 | 106 |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 v8::Handle<v8::Value> argv[] = { | 179 v8::Handle<v8::Value> argv[] = { |
181 boolParamHandle | 180 boolParamHandle |
182 }; | 181 }; |
183 | 182 |
184 bool callbackReturnValue = false; | 183 bool callbackReturnValue = false; |
185 return !invokeCallback(m_callback.get(), 1, argv, callbackReturnValue, scrip
tExecutionContext()); | 184 return !invokeCallback(m_callback.get(), 1, argv, callbackReturnValue, scrip
tExecutionContext()); |
186 } | 185 } |
187 | 186 |
188 } // namespace WebCore | 187 } // namespace WebCore |
189 | 188 |
OLD | NEW |