Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(234)

Side by Side Diff: Source/bindings/tests/results/core/V8TestCallbackInterface.cpp

Issue 819853002: [bindings] Translate all assignments in bindings/templates to use Local<> in place of Handle<>. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY! 5 // This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY!
6 6
7 #include "config.h" 7 #include "config.h"
8 #include "V8TestCallbackInterface.h" 8 #include "V8TestCallbackInterface.h"
9 9
10 #include "bindings/core/v8/ScriptController.h" 10 #include "bindings/core/v8/ScriptController.h"
(...skipping 20 matching lines...) Expand all
31 31
32 void V8TestCallbackInterface::voidMethod() 32 void V8TestCallbackInterface::voidMethod()
33 { 33 {
34 if (!canInvokeCallback()) 34 if (!canInvokeCallback())
35 return; 35 return;
36 36
37 if (!m_scriptState->contextIsValid()) 37 if (!m_scriptState->contextIsValid())
38 return; 38 return;
39 39
40 ScriptState::Scope scope(m_scriptState.get()); 40 ScriptState::Scope scope(m_scriptState.get());
41 v8::Handle<v8::Value> *argv = 0; 41 v8::Local<v8::Value> *argv = 0;
42 42
43 ScriptController::callFunction(m_scriptState->executionContext(), m_callback .newLocal(m_scriptState->isolate()), m_scriptState->context()->Global(), 0, argv , m_scriptState->isolate()); 43 ScriptController::callFunction(m_scriptState->executionContext(), m_callback .newLocal(m_scriptState->isolate()), m_scriptState->context()->Global(), 0, argv , m_scriptState->isolate());
44 } 44 }
45 45
46 bool V8TestCallbackInterface::booleanMethod() 46 bool V8TestCallbackInterface::booleanMethod()
47 { 47 {
48 if (!canInvokeCallback()) 48 if (!canInvokeCallback())
49 return true; 49 return true;
50 50
51 if (!m_scriptState->contextIsValid()) 51 if (!m_scriptState->contextIsValid())
52 return true; 52 return true;
53 53
54 ScriptState::Scope scope(m_scriptState.get()); 54 ScriptState::Scope scope(m_scriptState.get());
55 v8::Handle<v8::Value> *argv = 0; 55 v8::Local<v8::Value> *argv = 0;
56 56
57 v8::TryCatch exceptionCatcher; 57 v8::TryCatch exceptionCatcher;
58 exceptionCatcher.SetVerbose(true); 58 exceptionCatcher.SetVerbose(true);
59 ScriptController::callFunction(m_scriptState->executionContext(), m_callback .newLocal(m_scriptState->isolate()), m_scriptState->context()->Global(), 0, argv , m_scriptState->isolate()); 59 ScriptController::callFunction(m_scriptState->executionContext(), m_callback .newLocal(m_scriptState->isolate()), m_scriptState->context()->Global(), 0, argv , m_scriptState->isolate());
60 return !exceptionCatcher.HasCaught(); 60 return !exceptionCatcher.HasCaught();
61 } 61 }
62 62
63 void V8TestCallbackInterface::voidMethodBooleanArg(bool boolArg) 63 void V8TestCallbackInterface::voidMethodBooleanArg(bool boolArg)
64 { 64 {
65 if (!canInvokeCallback()) 65 if (!canInvokeCallback())
66 return; 66 return;
67 67
68 if (!m_scriptState->contextIsValid()) 68 if (!m_scriptState->contextIsValid())
69 return; 69 return;
70 70
71 ScriptState::Scope scope(m_scriptState.get()); 71 ScriptState::Scope scope(m_scriptState.get());
72 v8::Handle<v8::Value> boolArgHandle = v8Boolean(boolArg, m_scriptState->isol ate()); 72 v8::Local<v8::Value> boolArgHandle = v8Boolean(boolArg, m_scriptState->isola te());
73 if (boolArgHandle.IsEmpty()) { 73 if (boolArgHandle.IsEmpty()) {
74 if (!isScriptControllerTerminating()) 74 if (!isScriptControllerTerminating())
75 CRASH(); 75 CRASH();
76 return; 76 return;
77 } 77 }
78 v8::Handle<v8::Value> argv[] = { boolArgHandle }; 78 v8::Local<v8::Value> argv[] = { boolArgHandle };
79 79
80 ScriptController::callFunction(m_scriptState->executionContext(), m_callback .newLocal(m_scriptState->isolate()), m_scriptState->context()->Global(), 1, argv , m_scriptState->isolate()); 80 ScriptController::callFunction(m_scriptState->executionContext(), m_callback .newLocal(m_scriptState->isolate()), m_scriptState->context()->Global(), 1, argv , m_scriptState->isolate());
81 } 81 }
82 82
83 void V8TestCallbackInterface::voidMethodSequenceArg(const Vector<RefPtr<TestInte rfaceEmpty> >& sequenceArg) 83 void V8TestCallbackInterface::voidMethodSequenceArg(const Vector<RefPtr<TestInte rfaceEmpty> >& sequenceArg)
84 { 84 {
85 if (!canInvokeCallback()) 85 if (!canInvokeCallback())
86 return; 86 return;
87 87
88 if (!m_scriptState->contextIsValid()) 88 if (!m_scriptState->contextIsValid())
89 return; 89 return;
90 90
91 ScriptState::Scope scope(m_scriptState.get()); 91 ScriptState::Scope scope(m_scriptState.get());
92 v8::Handle<v8::Value> sequenceArgHandle = toV8(sequenceArg, m_scriptState->c ontext()->Global(), m_scriptState->isolate()); 92 v8::Local<v8::Value> sequenceArgHandle = toV8(sequenceArg, m_scriptState->co ntext()->Global(), m_scriptState->isolate());
93 if (sequenceArgHandle.IsEmpty()) { 93 if (sequenceArgHandle.IsEmpty()) {
94 if (!isScriptControllerTerminating()) 94 if (!isScriptControllerTerminating())
95 CRASH(); 95 CRASH();
96 return; 96 return;
97 } 97 }
98 v8::Handle<v8::Value> argv[] = { sequenceArgHandle }; 98 v8::Local<v8::Value> argv[] = { sequenceArgHandle };
99 99
100 ScriptController::callFunction(m_scriptState->executionContext(), m_callback .newLocal(m_scriptState->isolate()), m_scriptState->context()->Global(), 1, argv , m_scriptState->isolate()); 100 ScriptController::callFunction(m_scriptState->executionContext(), m_callback .newLocal(m_scriptState->isolate()), m_scriptState->context()->Global(), 1, argv , m_scriptState->isolate());
101 } 101 }
102 102
103 void V8TestCallbackInterface::voidMethodFloatArg(float floatArg) 103 void V8TestCallbackInterface::voidMethodFloatArg(float floatArg)
104 { 104 {
105 if (!canInvokeCallback()) 105 if (!canInvokeCallback())
106 return; 106 return;
107 107
108 if (!m_scriptState->contextIsValid()) 108 if (!m_scriptState->contextIsValid())
109 return; 109 return;
110 110
111 ScriptState::Scope scope(m_scriptState.get()); 111 ScriptState::Scope scope(m_scriptState.get());
112 v8::Handle<v8::Value> floatArgHandle = v8::Number::New(m_scriptState->isolat e(), floatArg); 112 v8::Local<v8::Value> floatArgHandle = v8::Number::New(m_scriptState->isolate (), floatArg);
113 if (floatArgHandle.IsEmpty()) { 113 if (floatArgHandle.IsEmpty()) {
114 if (!isScriptControllerTerminating()) 114 if (!isScriptControllerTerminating())
115 CRASH(); 115 CRASH();
116 return; 116 return;
117 } 117 }
118 v8::Handle<v8::Value> argv[] = { floatArgHandle }; 118 v8::Local<v8::Value> argv[] = { floatArgHandle };
119 119
120 ScriptController::callFunction(m_scriptState->executionContext(), m_callback .newLocal(m_scriptState->isolate()), m_scriptState->context()->Global(), 1, argv , m_scriptState->isolate()); 120 ScriptController::callFunction(m_scriptState->executionContext(), m_callback .newLocal(m_scriptState->isolate()), m_scriptState->context()->Global(), 1, argv , m_scriptState->isolate());
121 } 121 }
122 122
123 void V8TestCallbackInterface::voidMethodTestInterfaceEmptyArg(TestInterfaceEmpty * testInterfaceEmptyArg) 123 void V8TestCallbackInterface::voidMethodTestInterfaceEmptyArg(TestInterfaceEmpty * testInterfaceEmptyArg)
124 { 124 {
125 if (!canInvokeCallback()) 125 if (!canInvokeCallback())
126 return; 126 return;
127 127
128 if (!m_scriptState->contextIsValid()) 128 if (!m_scriptState->contextIsValid())
129 return; 129 return;
130 130
131 ScriptState::Scope scope(m_scriptState.get()); 131 ScriptState::Scope scope(m_scriptState.get());
132 v8::Handle<v8::Value> testInterfaceEmptyArgHandle = toV8(testInterfaceEmptyA rg, m_scriptState->context()->Global(), m_scriptState->isolate()); 132 v8::Local<v8::Value> testInterfaceEmptyArgHandle = toV8(testInterfaceEmptyAr g, m_scriptState->context()->Global(), m_scriptState->isolate());
133 if (testInterfaceEmptyArgHandle.IsEmpty()) { 133 if (testInterfaceEmptyArgHandle.IsEmpty()) {
134 if (!isScriptControllerTerminating()) 134 if (!isScriptControllerTerminating())
135 CRASH(); 135 CRASH();
136 return; 136 return;
137 } 137 }
138 v8::Handle<v8::Value> argv[] = { testInterfaceEmptyArgHandle }; 138 v8::Local<v8::Value> argv[] = { testInterfaceEmptyArgHandle };
139 139
140 ScriptController::callFunction(m_scriptState->executionContext(), m_callback .newLocal(m_scriptState->isolate()), m_scriptState->context()->Global(), 1, argv , m_scriptState->isolate()); 140 ScriptController::callFunction(m_scriptState->executionContext(), m_callback .newLocal(m_scriptState->isolate()), m_scriptState->context()->Global(), 1, argv , m_scriptState->isolate());
141 } 141 }
142 142
143 void V8TestCallbackInterface::voidMethodTestInterfaceEmptyStringArg(TestInterfac eEmpty* testInterfaceEmptyArg, const String& stringArg) 143 void V8TestCallbackInterface::voidMethodTestInterfaceEmptyStringArg(TestInterfac eEmpty* testInterfaceEmptyArg, const String& stringArg)
144 { 144 {
145 if (!canInvokeCallback()) 145 if (!canInvokeCallback())
146 return; 146 return;
147 147
148 if (!m_scriptState->contextIsValid()) 148 if (!m_scriptState->contextIsValid())
149 return; 149 return;
150 150
151 ScriptState::Scope scope(m_scriptState.get()); 151 ScriptState::Scope scope(m_scriptState.get());
152 v8::Handle<v8::Value> testInterfaceEmptyArgHandle = toV8(testInterfaceEmptyA rg, m_scriptState->context()->Global(), m_scriptState->isolate()); 152 v8::Local<v8::Value> testInterfaceEmptyArgHandle = toV8(testInterfaceEmptyAr g, m_scriptState->context()->Global(), m_scriptState->isolate());
153 if (testInterfaceEmptyArgHandle.IsEmpty()) { 153 if (testInterfaceEmptyArgHandle.IsEmpty()) {
154 if (!isScriptControllerTerminating()) 154 if (!isScriptControllerTerminating())
155 CRASH(); 155 CRASH();
156 return; 156 return;
157 } 157 }
158 v8::Handle<v8::Value> stringArgHandle = v8String(m_scriptState->isolate(), s tringArg); 158 v8::Local<v8::Value> stringArgHandle = v8String(m_scriptState->isolate(), st ringArg);
159 if (stringArgHandle.IsEmpty()) { 159 if (stringArgHandle.IsEmpty()) {
160 if (!isScriptControllerTerminating()) 160 if (!isScriptControllerTerminating())
161 CRASH(); 161 CRASH();
162 return; 162 return;
163 } 163 }
164 v8::Handle<v8::Value> argv[] = { testInterfaceEmptyArgHandle, stringArgHandl e }; 164 v8::Local<v8::Value> argv[] = { testInterfaceEmptyArgHandle, stringArgHandle };
165 165
166 ScriptController::callFunction(m_scriptState->executionContext(), m_callback .newLocal(m_scriptState->isolate()), m_scriptState->context()->Global(), 2, argv , m_scriptState->isolate()); 166 ScriptController::callFunction(m_scriptState->executionContext(), m_callback .newLocal(m_scriptState->isolate()), m_scriptState->context()->Global(), 2, argv , m_scriptState->isolate());
167 } 167 }
168 168
169 void V8TestCallbackInterface::callbackWithThisValueVoidMethodStringArg(ScriptVal ue thisValue, const String& stringArg) 169 void V8TestCallbackInterface::callbackWithThisValueVoidMethodStringArg(ScriptVal ue thisValue, const String& stringArg)
170 { 170 {
171 if (!canInvokeCallback()) 171 if (!canInvokeCallback())
172 return; 172 return;
173 173
174 if (!m_scriptState->contextIsValid()) 174 if (!m_scriptState->contextIsValid())
175 return; 175 return;
176 176
177 ScriptState::Scope scope(m_scriptState.get()); 177 ScriptState::Scope scope(m_scriptState.get());
178 v8::Handle<v8::Value> thisHandle = thisValue.v8Value(); 178 v8::Local<v8::Value> thisHandle = thisValue.v8Value();
179 if (thisHandle.IsEmpty()) { 179 if (thisHandle.IsEmpty()) {
180 if (!isScriptControllerTerminating()) 180 if (!isScriptControllerTerminating())
181 CRASH(); 181 CRASH();
182 return; 182 return;
183 } 183 }
184 v8::Handle<v8::Value> stringArgHandle = v8String(m_scriptState->isolate(), s tringArg); 184 v8::Local<v8::Value> stringArgHandle = v8String(m_scriptState->isolate(), st ringArg);
185 if (stringArgHandle.IsEmpty()) { 185 if (stringArgHandle.IsEmpty()) {
186 if (!isScriptControllerTerminating()) 186 if (!isScriptControllerTerminating())
187 CRASH(); 187 CRASH();
188 return; 188 return;
189 } 189 }
190 v8::Handle<v8::Value> argv[] = { stringArgHandle }; 190 v8::Local<v8::Value> argv[] = { stringArgHandle };
191 191
192 ScriptController::callFunction(m_scriptState->executionContext(), m_callback .newLocal(m_scriptState->isolate()), thisHandle, 1, argv, m_scriptState->isolate ()); 192 ScriptController::callFunction(m_scriptState->executionContext(), m_callback .newLocal(m_scriptState->isolate()), thisHandle, 1, argv, m_scriptState->isolate ());
193 } 193 }
194 194
195 void V8TestCallbackInterface::voidMethodWillBeGarbageCollectedSequenceArg(const WillBeHeapVector<RefPtrWillBeMember<TestInterfaceWillBeGarbageCollected> >& sequ enceArg) 195 void V8TestCallbackInterface::voidMethodWillBeGarbageCollectedSequenceArg(const WillBeHeapVector<RefPtrWillBeMember<TestInterfaceWillBeGarbageCollected> >& sequ enceArg)
196 { 196 {
197 if (!canInvokeCallback()) 197 if (!canInvokeCallback())
198 return; 198 return;
199 199
200 if (!m_scriptState->contextIsValid()) 200 if (!m_scriptState->contextIsValid())
201 return; 201 return;
202 202
203 ScriptState::Scope scope(m_scriptState.get()); 203 ScriptState::Scope scope(m_scriptState.get());
204 v8::Handle<v8::Value> sequenceArgHandle = toV8(sequenceArg, m_scriptState->c ontext()->Global(), m_scriptState->isolate()); 204 v8::Local<v8::Value> sequenceArgHandle = toV8(sequenceArg, m_scriptState->co ntext()->Global(), m_scriptState->isolate());
205 if (sequenceArgHandle.IsEmpty()) { 205 if (sequenceArgHandle.IsEmpty()) {
206 if (!isScriptControllerTerminating()) 206 if (!isScriptControllerTerminating())
207 CRASH(); 207 CRASH();
208 return; 208 return;
209 } 209 }
210 v8::Handle<v8::Value> argv[] = { sequenceArgHandle }; 210 v8::Local<v8::Value> argv[] = { sequenceArgHandle };
211 211
212 ScriptController::callFunction(m_scriptState->executionContext(), m_callback .newLocal(m_scriptState->isolate()), m_scriptState->context()->Global(), 1, argv , m_scriptState->isolate()); 212 ScriptController::callFunction(m_scriptState->executionContext(), m_callback .newLocal(m_scriptState->isolate()), m_scriptState->context()->Global(), 1, argv , m_scriptState->isolate());
213 } 213 }
214 214
215 void V8TestCallbackInterface::voidMethodWillBeGarbageCollectedArrayArg(const Wil lBeHeapVector<RefPtrWillBeMember<TestInterfaceWillBeGarbageCollected> >& arrayAr g) 215 void V8TestCallbackInterface::voidMethodWillBeGarbageCollectedArrayArg(const Wil lBeHeapVector<RefPtrWillBeMember<TestInterfaceWillBeGarbageCollected> >& arrayAr g)
216 { 216 {
217 if (!canInvokeCallback()) 217 if (!canInvokeCallback())
218 return; 218 return;
219 219
220 if (!m_scriptState->contextIsValid()) 220 if (!m_scriptState->contextIsValid())
221 return; 221 return;
222 222
223 ScriptState::Scope scope(m_scriptState.get()); 223 ScriptState::Scope scope(m_scriptState.get());
224 v8::Handle<v8::Value> arrayArgHandle = toV8(arrayArg, m_scriptState->context ()->Global(), m_scriptState->isolate()); 224 v8::Local<v8::Value> arrayArgHandle = toV8(arrayArg, m_scriptState->context( )->Global(), m_scriptState->isolate());
225 if (arrayArgHandle.IsEmpty()) { 225 if (arrayArgHandle.IsEmpty()) {
226 if (!isScriptControllerTerminating()) 226 if (!isScriptControllerTerminating())
227 CRASH(); 227 CRASH();
228 return; 228 return;
229 } 229 }
230 v8::Handle<v8::Value> argv[] = { arrayArgHandle }; 230 v8::Local<v8::Value> argv[] = { arrayArgHandle };
231 231
232 ScriptController::callFunction(m_scriptState->executionContext(), m_callback .newLocal(m_scriptState->isolate()), m_scriptState->context()->Global(), 1, argv , m_scriptState->isolate()); 232 ScriptController::callFunction(m_scriptState->executionContext(), m_callback .newLocal(m_scriptState->isolate()), m_scriptState->context()->Global(), 1, argv , m_scriptState->isolate());
233 } 233 }
234 234
235 } // namespace blink 235 } // namespace blink
OLDNEW
« no previous file with comments | « Source/bindings/tests/results/core/V8SVGTestInterface.cpp ('k') | Source/bindings/tests/results/core/V8TestException.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698