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

Side by Side Diff: Source/bindings/tests/results/core/V8TestInterface.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 6 years 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 #if ENABLE(CONDITION) 8 #if ENABLE(CONDITION)
9 #include "V8TestInterface.h" 9 #include "V8TestInterface.h"
10 10
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 namespace TestInterfaceImplementationV8Internal { 49 namespace TestInterfaceImplementationV8Internal {
50 static void (*voidMethodPartialOverloadMethodForPartialInterface)(const v8::Func tionCallbackInfo<v8::Value>&) = 0; 50 static void (*voidMethodPartialOverloadMethodForPartialInterface)(const v8::Func tionCallbackInfo<v8::Value>&) = 0;
51 static void (*staticVoidMethodPartialOverloadMethodForPartialInterface)(const v8 ::FunctionCallbackInfo<v8::Value>&) = 0; 51 static void (*staticVoidMethodPartialOverloadMethodForPartialInterface)(const v8 ::FunctionCallbackInfo<v8::Value>&) = 0;
52 static void (*promiseMethodPartialOverloadMethodForPartialInterface)(const v8::F unctionCallbackInfo<v8::Value>&) = 0; 52 static void (*promiseMethodPartialOverloadMethodForPartialInterface)(const v8::F unctionCallbackInfo<v8::Value>&) = 0;
53 static void (*staticPromiseMethodPartialOverloadMethodForPartialInterface)(const v8::FunctionCallbackInfo<v8::Value>&) = 0; 53 static void (*staticPromiseMethodPartialOverloadMethodForPartialInterface)(const v8::FunctionCallbackInfo<v8::Value>&) = 0;
54 static void (*partial2VoidMethodMethodForPartialInterface)(const v8::FunctionCal lbackInfo<v8::Value>&) = 0; 54 static void (*partial2VoidMethodMethodForPartialInterface)(const v8::FunctionCal lbackInfo<v8::Value>&) = 0;
55 static void (*partial2StaticVoidMethodMethodForPartialInterface)(const v8::Funct ionCallbackInfo<v8::Value>&) = 0; 55 static void (*partial2StaticVoidMethodMethodForPartialInterface)(const v8::Funct ionCallbackInfo<v8::Value>&) = 0;
56 56
57 static void testInterfaceAttributeAttributeGetter(const v8::PropertyCallbackInfo <v8::Value>& info) 57 static void testInterfaceAttributeAttributeGetter(const v8::PropertyCallbackInfo <v8::Value>& info)
58 { 58 {
59 v8::Handle<v8::Object> holder = info.Holder(); 59 v8::Local<v8::Object> holder = info.Holder();
60 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 60 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
61 v8SetReturnValueFast(info, WTF::getPtr(impl->testInterfaceAttribute()), impl ); 61 v8SetReturnValueFast(info, WTF::getPtr(impl->testInterfaceAttribute()), impl );
62 } 62 }
63 63
64 static void testInterfaceAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) 64 static void testInterfaceAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
65 { 65 {
66 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); 66 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
67 TestInterfaceImplementationV8Internal::testInterfaceAttributeAttributeGetter (info); 67 TestInterfaceImplementationV8Internal::testInterfaceAttributeAttributeGetter (info);
68 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 68 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
69 } 69 }
70 70
71 static void testInterfaceAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) 71 static void testInterfaceAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
72 { 72 {
73 v8::Handle<v8::Object> holder = info.Holder(); 73 v8::Local<v8::Object> holder = info.Holder();
74 ExceptionState exceptionState(ExceptionState::SetterContext, "testInterfaceA ttribute", "TestInterface", holder, info.GetIsolate()); 74 ExceptionState exceptionState(ExceptionState::SetterContext, "testInterfaceA ttribute", "TestInterface", holder, info.GetIsolate());
75 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 75 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
76 TestInterfaceImplementation* cppValue = V8TestInterface::toImplWithTypeCheck (info.GetIsolate(), v8Value); 76 TestInterfaceImplementation* cppValue = V8TestInterface::toImplWithTypeCheck (info.GetIsolate(), v8Value);
77 if (!cppValue) { 77 if (!cppValue) {
78 exceptionState.throwTypeError("The provided value is not of type 'TestIn terface'."); 78 exceptionState.throwTypeError("The provided value is not of type 'TestIn terface'.");
79 exceptionState.throwIfNeeded(); 79 exceptionState.throwIfNeeded();
80 return; 80 return;
81 } 81 }
82 impl->setTestInterfaceAttribute(WTF::getPtr(cppValue)); 82 impl->setTestInterfaceAttribute(WTF::getPtr(cppValue));
83 } 83 }
84 84
85 static void testInterfaceAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) 85 static void testInterfaceAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
86 { 86 {
87 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); 87 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
88 TestInterfaceImplementationV8Internal::testInterfaceAttributeAttributeSetter (v8Value, info); 88 TestInterfaceImplementationV8Internal::testInterfaceAttributeAttributeSetter (v8Value, info);
89 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 89 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
90 } 90 }
91 91
92 static void doubleAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Va lue>& info) 92 static void doubleAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Va lue>& info)
93 { 93 {
94 v8::Handle<v8::Object> holder = info.Holder(); 94 v8::Local<v8::Object> holder = info.Holder();
95 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 95 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
96 v8SetReturnValue(info, impl->doubleAttribute()); 96 v8SetReturnValue(info, impl->doubleAttribute());
97 } 97 }
98 98
99 static void doubleAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) 99 static void doubleAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
100 { 100 {
101 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); 101 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
102 TestInterfaceImplementationV8Internal::doubleAttributeAttributeGetter(info); 102 TestInterfaceImplementationV8Internal::doubleAttributeAttributeGetter(info);
103 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 103 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
104 } 104 }
105 105
106 static void doubleAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v 8::PropertyCallbackInfo<void>& info) 106 static void doubleAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v 8::PropertyCallbackInfo<void>& info)
107 { 107 {
108 v8::Handle<v8::Object> holder = info.Holder(); 108 v8::Local<v8::Object> holder = info.Holder();
109 ExceptionState exceptionState(ExceptionState::SetterContext, "doubleAttribut e", "TestInterface", holder, info.GetIsolate()); 109 ExceptionState exceptionState(ExceptionState::SetterContext, "doubleAttribut e", "TestInterface", holder, info.GetIsolate());
110 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 110 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
111 TONATIVE_VOID_EXCEPTIONSTATE(double, cppValue, toDouble(v8Value, exceptionSt ate), exceptionState); 111 TONATIVE_VOID_EXCEPTIONSTATE(double, cppValue, toDouble(v8Value, exceptionSt ate), exceptionState);
112 if (!std::isfinite(cppValue)) { 112 if (!std::isfinite(cppValue)) {
113 exceptionState.throwTypeError("The provided double value is non-finite." ); 113 exceptionState.throwTypeError("The provided double value is non-finite." );
114 exceptionState.throwIfNeeded(); 114 exceptionState.throwIfNeeded();
115 return; 115 return;
116 } 116 }
117 impl->setDoubleAttribute(cppValue); 117 impl->setDoubleAttribute(cppValue);
118 } 118 }
119 119
120 static void doubleAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Lo cal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) 120 static void doubleAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Lo cal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
121 { 121 {
122 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); 122 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
123 TestInterfaceImplementationV8Internal::doubleAttributeAttributeSetter(v8Valu e, info); 123 TestInterfaceImplementationV8Internal::doubleAttributeAttributeSetter(v8Valu e, info);
124 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 124 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
125 } 125 }
126 126
127 static void floatAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Val ue>& info) 127 static void floatAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Val ue>& info)
128 { 128 {
129 v8::Handle<v8::Object> holder = info.Holder(); 129 v8::Local<v8::Object> holder = info.Holder();
130 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 130 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
131 v8SetReturnValue(info, impl->floatAttribute()); 131 v8SetReturnValue(info, impl->floatAttribute());
132 } 132 }
133 133
134 static void floatAttributeAttributeGetterCallback(v8::Local<v8::String>, const v 8::PropertyCallbackInfo<v8::Value>& info) 134 static void floatAttributeAttributeGetterCallback(v8::Local<v8::String>, const v 8::PropertyCallbackInfo<v8::Value>& info)
135 { 135 {
136 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); 136 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
137 TestInterfaceImplementationV8Internal::floatAttributeAttributeGetter(info); 137 TestInterfaceImplementationV8Internal::floatAttributeAttributeGetter(info);
138 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 138 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
139 } 139 }
140 140
141 static void floatAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8 ::PropertyCallbackInfo<void>& info) 141 static void floatAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8 ::PropertyCallbackInfo<void>& info)
142 { 142 {
143 v8::Handle<v8::Object> holder = info.Holder(); 143 v8::Local<v8::Object> holder = info.Holder();
144 ExceptionState exceptionState(ExceptionState::SetterContext, "floatAttribute ", "TestInterface", holder, info.GetIsolate()); 144 ExceptionState exceptionState(ExceptionState::SetterContext, "floatAttribute ", "TestInterface", holder, info.GetIsolate());
145 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 145 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
146 TONATIVE_VOID_EXCEPTIONSTATE(float, cppValue, toFloat(v8Value, exceptionStat e), exceptionState); 146 TONATIVE_VOID_EXCEPTIONSTATE(float, cppValue, toFloat(v8Value, exceptionStat e), exceptionState);
147 if (!std::isfinite(cppValue)) { 147 if (!std::isfinite(cppValue)) {
148 exceptionState.throwTypeError("The provided float value is non-finite.") ; 148 exceptionState.throwTypeError("The provided float value is non-finite.") ;
149 exceptionState.throwIfNeeded(); 149 exceptionState.throwIfNeeded();
150 return; 150 return;
151 } 151 }
152 impl->setFloatAttribute(cppValue); 152 impl->setFloatAttribute(cppValue);
153 } 153 }
154 154
155 static void floatAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Loc al<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) 155 static void floatAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Loc al<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
156 { 156 {
157 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); 157 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
158 TestInterfaceImplementationV8Internal::floatAttributeAttributeSetter(v8Value , info); 158 TestInterfaceImplementationV8Internal::floatAttributeAttributeSetter(v8Value , info);
159 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 159 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
160 } 160 }
161 161
162 static void unrestrictedDoubleAttributeAttributeGetter(const v8::PropertyCallbac kInfo<v8::Value>& info) 162 static void unrestrictedDoubleAttributeAttributeGetter(const v8::PropertyCallbac kInfo<v8::Value>& info)
163 { 163 {
164 v8::Handle<v8::Object> holder = info.Holder(); 164 v8::Local<v8::Object> holder = info.Holder();
165 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 165 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
166 v8SetReturnValue(info, impl->unrestrictedDoubleAttribute()); 166 v8SetReturnValue(info, impl->unrestrictedDoubleAttribute());
167 } 167 }
168 168
169 static void unrestrictedDoubleAttributeAttributeGetterCallback(v8::Local<v8::Str ing>, const v8::PropertyCallbackInfo<v8::Value>& info) 169 static void unrestrictedDoubleAttributeAttributeGetterCallback(v8::Local<v8::Str ing>, const v8::PropertyCallbackInfo<v8::Value>& info)
170 { 170 {
171 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); 171 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
172 TestInterfaceImplementationV8Internal::unrestrictedDoubleAttributeAttributeG etter(info); 172 TestInterfaceImplementationV8Internal::unrestrictedDoubleAttributeAttributeG etter(info);
173 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 173 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
174 } 174 }
175 175
176 static void unrestrictedDoubleAttributeAttributeSetter(v8::Local<v8::Value> v8Va lue, const v8::PropertyCallbackInfo<void>& info) 176 static void unrestrictedDoubleAttributeAttributeSetter(v8::Local<v8::Value> v8Va lue, const v8::PropertyCallbackInfo<void>& info)
177 { 177 {
178 v8::Handle<v8::Object> holder = info.Holder(); 178 v8::Local<v8::Object> holder = info.Holder();
179 ExceptionState exceptionState(ExceptionState::SetterContext, "unrestrictedDo ubleAttribute", "TestInterface", holder, info.GetIsolate()); 179 ExceptionState exceptionState(ExceptionState::SetterContext, "unrestrictedDo ubleAttribute", "TestInterface", holder, info.GetIsolate());
180 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 180 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
181 TONATIVE_VOID_EXCEPTIONSTATE(double, cppValue, toDouble(v8Value, exceptionSt ate), exceptionState); 181 TONATIVE_VOID_EXCEPTIONSTATE(double, cppValue, toDouble(v8Value, exceptionSt ate), exceptionState);
182 impl->setUnrestrictedDoubleAttribute(cppValue); 182 impl->setUnrestrictedDoubleAttribute(cppValue);
183 } 183 }
184 184
185 static void unrestrictedDoubleAttributeAttributeSetterCallback(v8::Local<v8::Str ing>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) 185 static void unrestrictedDoubleAttributeAttributeSetterCallback(v8::Local<v8::Str ing>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
186 { 186 {
187 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); 187 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
188 TestInterfaceImplementationV8Internal::unrestrictedDoubleAttributeAttributeS etter(v8Value, info); 188 TestInterfaceImplementationV8Internal::unrestrictedDoubleAttributeAttributeS etter(v8Value, info);
189 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 189 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
190 } 190 }
191 191
192 static void unrestrictedFloatAttributeAttributeGetter(const v8::PropertyCallback Info<v8::Value>& info) 192 static void unrestrictedFloatAttributeAttributeGetter(const v8::PropertyCallback Info<v8::Value>& info)
193 { 193 {
194 v8::Handle<v8::Object> holder = info.Holder(); 194 v8::Local<v8::Object> holder = info.Holder();
195 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 195 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
196 v8SetReturnValue(info, impl->unrestrictedFloatAttribute()); 196 v8SetReturnValue(info, impl->unrestrictedFloatAttribute());
197 } 197 }
198 198
199 static void unrestrictedFloatAttributeAttributeGetterCallback(v8::Local<v8::Stri ng>, const v8::PropertyCallbackInfo<v8::Value>& info) 199 static void unrestrictedFloatAttributeAttributeGetterCallback(v8::Local<v8::Stri ng>, const v8::PropertyCallbackInfo<v8::Value>& info)
200 { 200 {
201 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); 201 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
202 TestInterfaceImplementationV8Internal::unrestrictedFloatAttributeAttributeGe tter(info); 202 TestInterfaceImplementationV8Internal::unrestrictedFloatAttributeAttributeGe tter(info);
203 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 203 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
204 } 204 }
205 205
206 static void unrestrictedFloatAttributeAttributeSetter(v8::Local<v8::Value> v8Val ue, const v8::PropertyCallbackInfo<void>& info) 206 static void unrestrictedFloatAttributeAttributeSetter(v8::Local<v8::Value> v8Val ue, const v8::PropertyCallbackInfo<void>& info)
207 { 207 {
208 v8::Handle<v8::Object> holder = info.Holder(); 208 v8::Local<v8::Object> holder = info.Holder();
209 ExceptionState exceptionState(ExceptionState::SetterContext, "unrestrictedFl oatAttribute", "TestInterface", holder, info.GetIsolate()); 209 ExceptionState exceptionState(ExceptionState::SetterContext, "unrestrictedFl oatAttribute", "TestInterface", holder, info.GetIsolate());
210 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 210 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
211 TONATIVE_VOID_EXCEPTIONSTATE(float, cppValue, toFloat(v8Value, exceptionStat e), exceptionState); 211 TONATIVE_VOID_EXCEPTIONSTATE(float, cppValue, toFloat(v8Value, exceptionStat e), exceptionState);
212 impl->setUnrestrictedFloatAttribute(cppValue); 212 impl->setUnrestrictedFloatAttribute(cppValue);
213 } 213 }
214 214
215 static void unrestrictedFloatAttributeAttributeSetterCallback(v8::Local<v8::Stri ng>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) 215 static void unrestrictedFloatAttributeAttributeSetterCallback(v8::Local<v8::Stri ng>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
216 { 216 {
217 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); 217 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
218 TestInterfaceImplementationV8Internal::unrestrictedFloatAttributeAttributeSe tter(v8Value, info); 218 TestInterfaceImplementationV8Internal::unrestrictedFloatAttributeAttributeSe tter(v8Value, info);
(...skipping 20 matching lines...) Expand all
239 239
240 static void staticStringAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) 240 static void staticStringAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
241 { 241 {
242 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); 242 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
243 TestInterfaceImplementationV8Internal::staticStringAttributeAttributeSetter( v8Value, info); 243 TestInterfaceImplementationV8Internal::staticStringAttributeAttributeSetter( v8Value, info);
244 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 244 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
245 } 245 }
246 246
247 static void alwaysExposedAttributeAttributeGetter(const v8::PropertyCallbackInfo <v8::Value>& info) 247 static void alwaysExposedAttributeAttributeGetter(const v8::PropertyCallbackInfo <v8::Value>& info)
248 { 248 {
249 v8::Handle<v8::Object> holder = info.Holder(); 249 v8::Local<v8::Object> holder = info.Holder();
250 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 250 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
251 v8SetReturnValueInt(info, impl->alwaysExposedAttribute()); 251 v8SetReturnValueInt(info, impl->alwaysExposedAttribute());
252 } 252 }
253 253
254 static void alwaysExposedAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) 254 static void alwaysExposedAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
255 { 255 {
256 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); 256 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
257 TestInterfaceImplementationV8Internal::alwaysExposedAttributeAttributeGetter (info); 257 TestInterfaceImplementationV8Internal::alwaysExposedAttributeAttributeGetter (info);
258 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 258 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
259 } 259 }
260 260
261 static void alwaysExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) 261 static void alwaysExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
262 { 262 {
263 v8::Handle<v8::Object> holder = info.Holder(); 263 v8::Local<v8::Object> holder = info.Holder();
264 ExceptionState exceptionState(ExceptionState::SetterContext, "alwaysExposedA ttribute", "TestInterface", holder, info.GetIsolate()); 264 ExceptionState exceptionState(ExceptionState::SetterContext, "alwaysExposedA ttribute", "TestInterface", holder, info.GetIsolate());
265 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 265 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
266 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState) , exceptionState); 266 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState) , exceptionState);
267 impl->setAlwaysExposedAttribute(cppValue); 267 impl->setAlwaysExposedAttribute(cppValue);
268 } 268 }
269 269
270 static void alwaysExposedAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) 270 static void alwaysExposedAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
271 { 271 {
272 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); 272 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
273 TestInterfaceImplementationV8Internal::alwaysExposedAttributeAttributeSetter (v8Value, info); 273 TestInterfaceImplementationV8Internal::alwaysExposedAttributeAttributeSetter (v8Value, info);
274 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 274 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
275 } 275 }
276 276
277 static void workerExposedAttributeAttributeGetter(const v8::PropertyCallbackInfo <v8::Value>& info) 277 static void workerExposedAttributeAttributeGetter(const v8::PropertyCallbackInfo <v8::Value>& info)
278 { 278 {
279 v8::Handle<v8::Object> holder = info.Holder(); 279 v8::Local<v8::Object> holder = info.Holder();
280 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 280 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
281 v8SetReturnValueInt(info, impl->workerExposedAttribute()); 281 v8SetReturnValueInt(info, impl->workerExposedAttribute());
282 } 282 }
283 283
284 static void workerExposedAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) 284 static void workerExposedAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
285 { 285 {
286 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); 286 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
287 TestInterfaceImplementationV8Internal::workerExposedAttributeAttributeGetter (info); 287 TestInterfaceImplementationV8Internal::workerExposedAttributeAttributeGetter (info);
288 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 288 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
289 } 289 }
290 290
291 static void workerExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) 291 static void workerExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
292 { 292 {
293 v8::Handle<v8::Object> holder = info.Holder(); 293 v8::Local<v8::Object> holder = info.Holder();
294 ExceptionState exceptionState(ExceptionState::SetterContext, "workerExposedA ttribute", "TestInterface", holder, info.GetIsolate()); 294 ExceptionState exceptionState(ExceptionState::SetterContext, "workerExposedA ttribute", "TestInterface", holder, info.GetIsolate());
295 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 295 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
296 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState) , exceptionState); 296 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState) , exceptionState);
297 impl->setWorkerExposedAttribute(cppValue); 297 impl->setWorkerExposedAttribute(cppValue);
298 } 298 }
299 299
300 static void workerExposedAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) 300 static void workerExposedAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
301 { 301 {
302 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); 302 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
303 TestInterfaceImplementationV8Internal::workerExposedAttributeAttributeSetter (v8Value, info); 303 TestInterfaceImplementationV8Internal::workerExposedAttributeAttributeSetter (v8Value, info);
304 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 304 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
305 } 305 }
306 306
307 static void windowExposedAttributeAttributeGetter(const v8::PropertyCallbackInfo <v8::Value>& info) 307 static void windowExposedAttributeAttributeGetter(const v8::PropertyCallbackInfo <v8::Value>& info)
308 { 308 {
309 v8::Handle<v8::Object> holder = info.Holder(); 309 v8::Local<v8::Object> holder = info.Holder();
310 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 310 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
311 v8SetReturnValueInt(info, impl->windowExposedAttribute()); 311 v8SetReturnValueInt(info, impl->windowExposedAttribute());
312 } 312 }
313 313
314 static void windowExposedAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) 314 static void windowExposedAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
315 { 315 {
316 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); 316 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
317 TestInterfaceImplementationV8Internal::windowExposedAttributeAttributeGetter (info); 317 TestInterfaceImplementationV8Internal::windowExposedAttributeAttributeGetter (info);
318 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 318 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
319 } 319 }
320 320
321 static void windowExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) 321 static void windowExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
322 { 322 {
323 v8::Handle<v8::Object> holder = info.Holder(); 323 v8::Local<v8::Object> holder = info.Holder();
324 ExceptionState exceptionState(ExceptionState::SetterContext, "windowExposedA ttribute", "TestInterface", holder, info.GetIsolate()); 324 ExceptionState exceptionState(ExceptionState::SetterContext, "windowExposedA ttribute", "TestInterface", holder, info.GetIsolate());
325 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 325 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
326 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState) , exceptionState); 326 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState) , exceptionState);
327 impl->setWindowExposedAttribute(cppValue); 327 impl->setWindowExposedAttribute(cppValue);
328 } 328 }
329 329
330 static void windowExposedAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) 330 static void windowExposedAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
331 { 331 {
332 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); 332 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
333 TestInterfaceImplementationV8Internal::windowExposedAttributeAttributeSetter (v8Value, info); 333 TestInterfaceImplementationV8Internal::windowExposedAttributeAttributeSetter (v8Value, info);
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 366
367 static void implementsStaticStringAttributeAttributeSetterCallback(v8::Local<v8: :String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& in fo) 367 static void implementsStaticStringAttributeAttributeSetterCallback(v8::Local<v8: :String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& in fo)
368 { 368 {
369 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); 369 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
370 TestInterfaceImplementationV8Internal::implementsStaticStringAttributeAttrib uteSetter(v8Value, info); 370 TestInterfaceImplementationV8Internal::implementsStaticStringAttributeAttrib uteSetter(v8Value, info);
371 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 371 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
372 } 372 }
373 373
374 static void implementsReadonlyStringAttributeAttributeGetter(const v8::PropertyC allbackInfo<v8::Value>& info) 374 static void implementsReadonlyStringAttributeAttributeGetter(const v8::PropertyC allbackInfo<v8::Value>& info)
375 { 375 {
376 v8::Handle<v8::Object> holder = info.Holder(); 376 v8::Local<v8::Object> holder = info.Holder();
377 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 377 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
378 v8SetReturnValueString(info, impl->implementsReadonlyStringAttribute(), info .GetIsolate()); 378 v8SetReturnValueString(info, impl->implementsReadonlyStringAttribute(), info .GetIsolate());
379 } 379 }
380 380
381 static void implementsReadonlyStringAttributeAttributeGetterCallback(v8::Local<v 8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) 381 static void implementsReadonlyStringAttributeAttributeGetterCallback(v8::Local<v 8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
382 { 382 {
383 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); 383 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
384 TestInterfaceImplementationV8Internal::implementsReadonlyStringAttributeAttr ibuteGetter(info); 384 TestInterfaceImplementationV8Internal::implementsReadonlyStringAttributeAttr ibuteGetter(info);
385 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 385 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
386 } 386 }
387 387
388 static void implementsStringAttributeAttributeGetter(const v8::PropertyCallbackI nfo<v8::Value>& info) 388 static void implementsStringAttributeAttributeGetter(const v8::PropertyCallbackI nfo<v8::Value>& info)
389 { 389 {
390 v8::Handle<v8::Object> holder = info.Holder(); 390 v8::Local<v8::Object> holder = info.Holder();
391 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 391 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
392 v8SetReturnValueString(info, impl->implementsStringAttribute(), info.GetIsol ate()); 392 v8SetReturnValueString(info, impl->implementsStringAttribute(), info.GetIsol ate());
393 } 393 }
394 394
395 static void implementsStringAttributeAttributeGetterCallback(v8::Local<v8::Strin g>, const v8::PropertyCallbackInfo<v8::Value>& info) 395 static void implementsStringAttributeAttributeGetterCallback(v8::Local<v8::Strin g>, const v8::PropertyCallbackInfo<v8::Value>& info)
396 { 396 {
397 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); 397 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
398 TestInterfaceImplementationV8Internal::implementsStringAttributeAttributeGet ter(info); 398 TestInterfaceImplementationV8Internal::implementsStringAttributeAttributeGet ter(info);
399 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 399 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
400 } 400 }
401 401
402 static void implementsStringAttributeAttributeSetter(v8::Local<v8::Value> v8Valu e, const v8::PropertyCallbackInfo<void>& info) 402 static void implementsStringAttributeAttributeSetter(v8::Local<v8::Value> v8Valu e, const v8::PropertyCallbackInfo<void>& info)
403 { 403 {
404 v8::Handle<v8::Object> holder = info.Holder(); 404 v8::Local<v8::Object> holder = info.Holder();
405 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 405 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
406 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); 406 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value);
407 impl->setImplementsStringAttribute(cppValue); 407 impl->setImplementsStringAttribute(cppValue);
408 } 408 }
409 409
410 static void implementsStringAttributeAttributeSetterCallback(v8::Local<v8::Strin g>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) 410 static void implementsStringAttributeAttributeSetterCallback(v8::Local<v8::Strin g>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
411 { 411 {
412 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); 412 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
413 TestInterfaceImplementationV8Internal::implementsStringAttributeAttributeSet ter(v8Value, info); 413 TestInterfaceImplementationV8Internal::implementsStringAttributeAttributeSet ter(v8Value, info);
414 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 414 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
415 } 415 }
416 416
417 static void implementsNodeAttributeAttributeGetter(const v8::PropertyCallbackInf o<v8::Value>& info) 417 static void implementsNodeAttributeAttributeGetter(const v8::PropertyCallbackInf o<v8::Value>& info)
418 { 418 {
419 v8::Handle<v8::Object> holder = info.Holder(); 419 v8::Local<v8::Object> holder = info.Holder();
420 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 420 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
421 v8SetReturnValueFast(info, WTF::getPtr(impl->implementsNodeAttribute()), imp l); 421 v8SetReturnValueFast(info, WTF::getPtr(impl->implementsNodeAttribute()), imp l);
422 } 422 }
423 423
424 static void implementsNodeAttributeAttributeGetterCallback(v8::Local<v8::String> , const v8::PropertyCallbackInfo<v8::Value>& info) 424 static void implementsNodeAttributeAttributeGetterCallback(v8::Local<v8::String> , const v8::PropertyCallbackInfo<v8::Value>& info)
425 { 425 {
426 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); 426 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
427 TestInterfaceImplementationV8Internal::implementsNodeAttributeAttributeGette r(info); 427 TestInterfaceImplementationV8Internal::implementsNodeAttributeAttributeGette r(info);
428 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 428 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
429 } 429 }
430 430
431 static void implementsNodeAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) 431 static void implementsNodeAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
432 { 432 {
433 v8::Handle<v8::Object> holder = info.Holder(); 433 v8::Local<v8::Object> holder = info.Holder();
434 ExceptionState exceptionState(ExceptionState::SetterContext, "implementsNode Attribute", "TestInterface", holder, info.GetIsolate()); 434 ExceptionState exceptionState(ExceptionState::SetterContext, "implementsNode Attribute", "TestInterface", holder, info.GetIsolate());
435 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 435 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
436 Node* cppValue = V8Node::toImplWithTypeCheck(info.GetIsolate(), v8Value); 436 Node* cppValue = V8Node::toImplWithTypeCheck(info.GetIsolate(), v8Value);
437 if (!cppValue) { 437 if (!cppValue) {
438 exceptionState.throwTypeError("The provided value is not of type 'Node'. "); 438 exceptionState.throwTypeError("The provided value is not of type 'Node'. ");
439 exceptionState.throwIfNeeded(); 439 exceptionState.throwIfNeeded();
440 return; 440 return;
441 } 441 }
442 impl->setImplementsNodeAttribute(WTF::getPtr(cppValue)); 442 impl->setImplementsNodeAttribute(WTF::getPtr(cppValue));
443 } 443 }
444 444
445 static void implementsNodeAttributeAttributeSetterCallback(v8::Local<v8::String> , v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) 445 static void implementsNodeAttributeAttributeSetterCallback(v8::Local<v8::String> , v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
446 { 446 {
447 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); 447 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
448 TestInterfaceImplementationV8Internal::implementsNodeAttributeAttributeSette r(v8Value, info); 448 TestInterfaceImplementationV8Internal::implementsNodeAttributeAttributeSette r(v8Value, info);
449 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 449 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
450 } 450 }
451 451
452 static void implementsEventHandlerAttributeAttributeGetter(const v8::PropertyCal lbackInfo<v8::Value>& info) 452 static void implementsEventHandlerAttributeAttributeGetter(const v8::PropertyCal lbackInfo<v8::Value>& info)
453 { 453 {
454 v8::Handle<v8::Object> holder = info.Holder(); 454 v8::Local<v8::Object> holder = info.Holder();
455 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 455 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
456 EventListener* cppValue(impl->implementsEventHandlerAttribute()); 456 EventListener* cppValue(impl->implementsEventHandlerAttribute());
457 v8SetReturnValue(info, cppValue ? v8::Handle<v8::Value>(V8AbstractEventListe ner::cast(cppValue)->getListenerObject(impl->executionContext())) : v8::Handle<v 8::Value>(v8::Null(info.GetIsolate()))); 457 v8SetReturnValue(info, cppValue ? v8::Handle<v8::Value>(V8AbstractEventListe ner::cast(cppValue)->getListenerObject(impl->executionContext())) : v8::Handle<v 8::Value>(v8::Null(info.GetIsolate())));
458 } 458 }
459 459
460 static void implementsEventHandlerAttributeAttributeGetterCallback(v8::Local<v8: :String>, const v8::PropertyCallbackInfo<v8::Value>& info) 460 static void implementsEventHandlerAttributeAttributeGetterCallback(v8::Local<v8: :String>, const v8::PropertyCallbackInfo<v8::Value>& info)
461 { 461 {
462 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); 462 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
463 TestInterfaceImplementationV8Internal::implementsEventHandlerAttributeAttrib uteGetter(info); 463 TestInterfaceImplementationV8Internal::implementsEventHandlerAttributeAttrib uteGetter(info);
464 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 464 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
465 } 465 }
466 466
467 static void implementsEventHandlerAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) 467 static void implementsEventHandlerAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
468 { 468 {
469 v8::Handle<v8::Object> holder = info.Holder(); 469 v8::Local<v8::Object> holder = info.Holder();
470 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 470 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
471 moveEventListenerToNewWrapper(info.GetIsolate(), holder, impl->implementsEve ntHandlerAttribute(), v8Value, V8TestInterface::eventListenerCacheIndex); 471 moveEventListenerToNewWrapper(info.GetIsolate(), holder, impl->implementsEve ntHandlerAttribute(), v8Value, V8TestInterface::eventListenerCacheIndex);
472 impl->setImplementsEventHandlerAttribute(V8EventListenerList::getEventListen er(ScriptState::current(info.GetIsolate()), v8Value, true, ListenerFindOrCreate) ); 472 impl->setImplementsEventHandlerAttribute(V8EventListenerList::getEventListen er(ScriptState::current(info.GetIsolate()), v8Value, true, ListenerFindOrCreate) );
473 } 473 }
474 474
475 static void implementsEventHandlerAttributeAttributeSetterCallback(v8::Local<v8: :String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& in fo) 475 static void implementsEventHandlerAttributeAttributeSetterCallback(v8::Local<v8: :String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& in fo)
476 { 476 {
477 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); 477 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
478 TestInterfaceImplementationV8Internal::implementsEventHandlerAttributeAttrib uteSetter(v8Value, info); 478 TestInterfaceImplementationV8Internal::implementsEventHandlerAttributeAttrib uteSetter(v8Value, info);
479 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 479 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
480 } 480 }
481 481
482 static void implementsRuntimeEnabledNodeAttributeAttributeGetter(const v8::Prope rtyCallbackInfo<v8::Value>& info) 482 static void implementsRuntimeEnabledNodeAttributeAttributeGetter(const v8::Prope rtyCallbackInfo<v8::Value>& info)
483 { 483 {
484 v8::Handle<v8::Object> holder = info.Holder(); 484 v8::Local<v8::Object> holder = info.Holder();
485 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 485 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
486 v8SetReturnValueFast(info, WTF::getPtr(impl->implementsRuntimeEnabledNodeAtt ribute()), impl); 486 v8SetReturnValueFast(info, WTF::getPtr(impl->implementsRuntimeEnabledNodeAtt ribute()), impl);
487 } 487 }
488 488
489 static void implementsRuntimeEnabledNodeAttributeAttributeGetterCallback(v8::Loc al<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) 489 static void implementsRuntimeEnabledNodeAttributeAttributeGetterCallback(v8::Loc al<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
490 { 490 {
491 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); 491 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
492 TestInterfaceImplementationV8Internal::implementsRuntimeEnabledNodeAttribute AttributeGetter(info); 492 TestInterfaceImplementationV8Internal::implementsRuntimeEnabledNodeAttribute AttributeGetter(info);
493 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 493 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
494 } 494 }
495 495
496 static void implementsRuntimeEnabledNodeAttributeAttributeSetter(v8::Local<v8::V alue> v8Value, const v8::PropertyCallbackInfo<void>& info) 496 static void implementsRuntimeEnabledNodeAttributeAttributeSetter(v8::Local<v8::V alue> v8Value, const v8::PropertyCallbackInfo<void>& info)
497 { 497 {
498 v8::Handle<v8::Object> holder = info.Holder(); 498 v8::Local<v8::Object> holder = info.Holder();
499 ExceptionState exceptionState(ExceptionState::SetterContext, "implementsRunt imeEnabledNodeAttribute", "TestInterface", holder, info.GetIsolate()); 499 ExceptionState exceptionState(ExceptionState::SetterContext, "implementsRunt imeEnabledNodeAttribute", "TestInterface", holder, info.GetIsolate());
500 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 500 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
501 Node* cppValue = V8Node::toImplWithTypeCheck(info.GetIsolate(), v8Value); 501 Node* cppValue = V8Node::toImplWithTypeCheck(info.GetIsolate(), v8Value);
502 if (!cppValue) { 502 if (!cppValue) {
503 exceptionState.throwTypeError("The provided value is not of type 'Node'. "); 503 exceptionState.throwTypeError("The provided value is not of type 'Node'. ");
504 exceptionState.throwIfNeeded(); 504 exceptionState.throwIfNeeded();
505 return; 505 return;
506 } 506 }
507 impl->setImplementsRuntimeEnabledNodeAttribute(WTF::getPtr(cppValue)); 507 impl->setImplementsRuntimeEnabledNodeAttribute(WTF::getPtr(cppValue));
508 } 508 }
509 509
510 static void implementsRuntimeEnabledNodeAttributeAttributeSetterCallback(v8::Loc al<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<voi d>& info) 510 static void implementsRuntimeEnabledNodeAttributeAttributeSetterCallback(v8::Loc al<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<voi d>& info)
511 { 511 {
512 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); 512 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
513 TestInterfaceImplementationV8Internal::implementsRuntimeEnabledNodeAttribute AttributeSetter(v8Value, info); 513 TestInterfaceImplementationV8Internal::implementsRuntimeEnabledNodeAttribute AttributeSetter(v8Value, info);
514 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 514 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
515 } 515 }
516 516
517 static void implementsPerContextEnabledNodeAttributeAttributeGetter(const v8::Pr opertyCallbackInfo<v8::Value>& info) 517 static void implementsPerContextEnabledNodeAttributeAttributeGetter(const v8::Pr opertyCallbackInfo<v8::Value>& info)
518 { 518 {
519 v8::Handle<v8::Object> holder = info.Holder(); 519 v8::Local<v8::Object> holder = info.Holder();
520 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 520 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
521 v8SetReturnValueFast(info, WTF::getPtr(impl->implementsPerContextEnabledNode Attribute()), impl); 521 v8SetReturnValueFast(info, WTF::getPtr(impl->implementsPerContextEnabledNode Attribute()), impl);
522 } 522 }
523 523
524 static void implementsPerContextEnabledNodeAttributeAttributeGetterCallback(v8:: Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) 524 static void implementsPerContextEnabledNodeAttributeAttributeGetterCallback(v8:: Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
525 { 525 {
526 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); 526 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
527 TestInterfaceImplementationV8Internal::implementsPerContextEnabledNodeAttrib uteAttributeGetter(info); 527 TestInterfaceImplementationV8Internal::implementsPerContextEnabledNodeAttrib uteAttributeGetter(info);
528 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 528 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
529 } 529 }
530 530
531 static void implementsPerContextEnabledNodeAttributeAttributeSetter(v8::Local<v8 ::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) 531 static void implementsPerContextEnabledNodeAttributeAttributeSetter(v8::Local<v8 ::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
532 { 532 {
533 v8::Handle<v8::Object> holder = info.Holder(); 533 v8::Local<v8::Object> holder = info.Holder();
534 ExceptionState exceptionState(ExceptionState::SetterContext, "implementsPerC ontextEnabledNodeAttribute", "TestInterface", holder, info.GetIsolate()); 534 ExceptionState exceptionState(ExceptionState::SetterContext, "implementsPerC ontextEnabledNodeAttribute", "TestInterface", holder, info.GetIsolate());
535 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 535 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
536 Node* cppValue = V8Node::toImplWithTypeCheck(info.GetIsolate(), v8Value); 536 Node* cppValue = V8Node::toImplWithTypeCheck(info.GetIsolate(), v8Value);
537 if (!cppValue) { 537 if (!cppValue) {
538 exceptionState.throwTypeError("The provided value is not of type 'Node'. "); 538 exceptionState.throwTypeError("The provided value is not of type 'Node'. ");
539 exceptionState.throwIfNeeded(); 539 exceptionState.throwIfNeeded();
540 return; 540 return;
541 } 541 }
542 impl->setImplementsPerContextEnabledNodeAttribute(WTF::getPtr(cppValue)); 542 impl->setImplementsPerContextEnabledNodeAttribute(WTF::getPtr(cppValue));
543 } 543 }
(...skipping 25 matching lines...) Expand all
569 569
570 static void implements2StaticStringAttributeAttributeSetterCallback(v8::Local<v8 ::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& i nfo) 570 static void implements2StaticStringAttributeAttributeSetterCallback(v8::Local<v8 ::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& i nfo)
571 { 571 {
572 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); 572 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
573 TestInterfaceImplementationV8Internal::implements2StaticStringAttributeAttri buteSetter(v8Value, info); 573 TestInterfaceImplementationV8Internal::implements2StaticStringAttributeAttri buteSetter(v8Value, info);
574 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 574 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
575 } 575 }
576 576
577 static void implements2StringAttributeAttributeGetter(const v8::PropertyCallback Info<v8::Value>& info) 577 static void implements2StringAttributeAttributeGetter(const v8::PropertyCallback Info<v8::Value>& info)
578 { 578 {
579 v8::Handle<v8::Object> holder = info.Holder(); 579 v8::Local<v8::Object> holder = info.Holder();
580 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 580 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
581 v8SetReturnValueString(info, TestImplements2::implements2StringAttribute(*im pl), info.GetIsolate()); 581 v8SetReturnValueString(info, TestImplements2::implements2StringAttribute(*im pl), info.GetIsolate());
582 } 582 }
583 583
584 static void implements2StringAttributeAttributeGetterCallback(v8::Local<v8::Stri ng>, const v8::PropertyCallbackInfo<v8::Value>& info) 584 static void implements2StringAttributeAttributeGetterCallback(v8::Local<v8::Stri ng>, const v8::PropertyCallbackInfo<v8::Value>& info)
585 { 585 {
586 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); 586 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
587 TestInterfaceImplementationV8Internal::implements2StringAttributeAttributeGe tter(info); 587 TestInterfaceImplementationV8Internal::implements2StringAttributeAttributeGe tter(info);
588 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 588 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
589 } 589 }
590 590
591 static void implements2StringAttributeAttributeSetter(v8::Local<v8::Value> v8Val ue, const v8::PropertyCallbackInfo<void>& info) 591 static void implements2StringAttributeAttributeSetter(v8::Local<v8::Value> v8Val ue, const v8::PropertyCallbackInfo<void>& info)
592 { 592 {
593 v8::Handle<v8::Object> holder = info.Holder(); 593 v8::Local<v8::Object> holder = info.Holder();
594 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 594 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
595 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); 595 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value);
596 TestImplements2::setImplements2StringAttribute(*impl, cppValue); 596 TestImplements2::setImplements2StringAttribute(*impl, cppValue);
597 } 597 }
598 598
599 static void implements2StringAttributeAttributeSetterCallback(v8::Local<v8::Stri ng>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) 599 static void implements2StringAttributeAttributeSetterCallback(v8::Local<v8::Stri ng>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
600 { 600 {
601 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); 601 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
602 TestInterfaceImplementationV8Internal::implements2StringAttributeAttributeSe tter(v8Value, info); 602 TestInterfaceImplementationV8Internal::implements2StringAttributeAttributeSe tter(v8Value, info);
603 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 603 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
604 } 604 }
605 605
606 static void implements3StringAttributeAttributeGetter(const v8::PropertyCallback Info<v8::Value>& info) 606 static void implements3StringAttributeAttributeGetter(const v8::PropertyCallback Info<v8::Value>& info)
607 { 607 {
608 v8::Handle<v8::Object> holder = info.Holder(); 608 v8::Local<v8::Object> holder = info.Holder();
609 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 609 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
610 v8SetReturnValueString(info, TestImplements3Implementation::implements3Strin gAttribute(*impl), info.GetIsolate()); 610 v8SetReturnValueString(info, TestImplements3Implementation::implements3Strin gAttribute(*impl), info.GetIsolate());
611 } 611 }
612 612
613 static void implements3StringAttributeAttributeGetterCallback(v8::Local<v8::Stri ng>, const v8::PropertyCallbackInfo<v8::Value>& info) 613 static void implements3StringAttributeAttributeGetterCallback(v8::Local<v8::Stri ng>, const v8::PropertyCallbackInfo<v8::Value>& info)
614 { 614 {
615 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); 615 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
616 TestInterfaceImplementationV8Internal::implements3StringAttributeAttributeGe tter(info); 616 TestInterfaceImplementationV8Internal::implements3StringAttributeAttributeGe tter(info);
617 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 617 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
618 } 618 }
619 619
620 static void implements3StringAttributeAttributeSetter(v8::Local<v8::Value> v8Val ue, const v8::PropertyCallbackInfo<void>& info) 620 static void implements3StringAttributeAttributeSetter(v8::Local<v8::Value> v8Val ue, const v8::PropertyCallbackInfo<void>& info)
621 { 621 {
622 v8::Handle<v8::Object> holder = info.Holder(); 622 v8::Local<v8::Object> holder = info.Holder();
623 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 623 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
624 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); 624 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value);
625 TestImplements3Implementation::setImplements3StringAttribute(*impl, cppValue ); 625 TestImplements3Implementation::setImplements3StringAttribute(*impl, cppValue );
626 } 626 }
627 627
628 static void implements3StringAttributeAttributeSetterCallback(v8::Local<v8::Stri ng>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) 628 static void implements3StringAttributeAttributeSetterCallback(v8::Local<v8::Stri ng>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
629 { 629 {
630 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); 630 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
631 TestInterfaceImplementationV8Internal::implements3StringAttributeAttributeSe tter(v8Value, info); 631 TestInterfaceImplementationV8Internal::implements3StringAttributeAttributeSe tter(v8Value, info);
632 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 632 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
(...skipping 20 matching lines...) Expand all
653 static void implements3StaticStringAttributeAttributeSetterCallback(v8::Local<v8 ::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& i nfo) 653 static void implements3StaticStringAttributeAttributeSetterCallback(v8::Local<v8 ::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& i nfo)
654 { 654 {
655 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); 655 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
656 TestInterfaceImplementationV8Internal::implements3StaticStringAttributeAttri buteSetter(v8Value, info); 656 TestInterfaceImplementationV8Internal::implements3StaticStringAttributeAttri buteSetter(v8Value, info);
657 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 657 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
658 } 658 }
659 659
660 #if ENABLE(PARTIAL_CONDITION) 660 #if ENABLE(PARTIAL_CONDITION)
661 static void partialLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v 8::Value>& info) 661 static void partialLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v 8::Value>& info)
662 { 662 {
663 v8::Handle<v8::Object> holder = info.Holder(); 663 v8::Local<v8::Object> holder = info.Holder();
664 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 664 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
665 v8SetReturnValueInt(info, TestPartialInterface::partialLongAttribute(*impl)) ; 665 v8SetReturnValueInt(info, TestPartialInterface::partialLongAttribute(*impl)) ;
666 } 666 }
667 #endif // ENABLE(PARTIAL_CONDITION) 667 #endif // ENABLE(PARTIAL_CONDITION)
668 668
669 #if ENABLE(PARTIAL_CONDITION) 669 #if ENABLE(PARTIAL_CONDITION)
670 static void partialLongAttributeAttributeGetterCallback(v8::Local<v8::String>, c onst v8::PropertyCallbackInfo<v8::Value>& info) 670 static void partialLongAttributeAttributeGetterCallback(v8::Local<v8::String>, c onst v8::PropertyCallbackInfo<v8::Value>& info)
671 { 671 {
672 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); 672 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
673 TestInterfaceImplementationV8Internal::partialLongAttributeAttributeGetter(i nfo); 673 TestInterfaceImplementationV8Internal::partialLongAttributeAttributeGetter(i nfo);
674 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 674 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
675 } 675 }
676 #endif // ENABLE(PARTIAL_CONDITION) 676 #endif // ENABLE(PARTIAL_CONDITION)
677 677
678 #if ENABLE(PARTIAL_CONDITION) 678 #if ENABLE(PARTIAL_CONDITION)
679 static void partialLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, co nst v8::PropertyCallbackInfo<void>& info) 679 static void partialLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, co nst v8::PropertyCallbackInfo<void>& info)
680 { 680 {
681 v8::Handle<v8::Object> holder = info.Holder(); 681 v8::Local<v8::Object> holder = info.Holder();
682 ExceptionState exceptionState(ExceptionState::SetterContext, "partialLongAtt ribute", "TestInterface", holder, info.GetIsolate()); 682 ExceptionState exceptionState(ExceptionState::SetterContext, "partialLongAtt ribute", "TestInterface", holder, info.GetIsolate());
683 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 683 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
684 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState) , exceptionState); 684 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState) , exceptionState);
685 TestPartialInterface::setPartialLongAttribute(*impl, cppValue); 685 TestPartialInterface::setPartialLongAttribute(*impl, cppValue);
686 } 686 }
687 #endif // ENABLE(PARTIAL_CONDITION) 687 #endif // ENABLE(PARTIAL_CONDITION)
688 688
689 #if ENABLE(PARTIAL_CONDITION) 689 #if ENABLE(PARTIAL_CONDITION)
690 static void partialLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v 8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) 690 static void partialLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v 8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
691 { 691 {
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
725 { 725 {
726 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); 726 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
727 TestInterfaceImplementationV8Internal::partialStaticLongAttributeAttributeSe tter(v8Value, info); 727 TestInterfaceImplementationV8Internal::partialStaticLongAttributeAttributeSe tter(v8Value, info);
728 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 728 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
729 } 729 }
730 #endif // ENABLE(PARTIAL_CONDITION) 730 #endif // ENABLE(PARTIAL_CONDITION)
731 731
732 #if ENABLE(PARTIAL_CONDITION) 732 #if ENABLE(PARTIAL_CONDITION)
733 static void partialCallWithExecutionContextLongAttributeAttributeGetter(const v8 ::PropertyCallbackInfo<v8::Value>& info) 733 static void partialCallWithExecutionContextLongAttributeAttributeGetter(const v8 ::PropertyCallbackInfo<v8::Value>& info)
734 { 734 {
735 v8::Handle<v8::Object> holder = info.Holder(); 735 v8::Local<v8::Object> holder = info.Holder();
736 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 736 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
737 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ()); 737 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
738 v8SetReturnValueInt(info, TestPartialInterface::partialCallWithExecutionCont extLongAttribute(executionContext, *impl)); 738 v8SetReturnValueInt(info, TestPartialInterface::partialCallWithExecutionCont extLongAttribute(executionContext, *impl));
739 } 739 }
740 #endif // ENABLE(PARTIAL_CONDITION) 740 #endif // ENABLE(PARTIAL_CONDITION)
741 741
742 #if ENABLE(PARTIAL_CONDITION) 742 #if ENABLE(PARTIAL_CONDITION)
743 static void partialCallWithExecutionContextLongAttributeAttributeGetterCallback( v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) 743 static void partialCallWithExecutionContextLongAttributeAttributeGetterCallback( v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
744 { 744 {
745 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); 745 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
746 TestInterfaceImplementationV8Internal::partialCallWithExecutionContextLongAt tributeAttributeGetter(info); 746 TestInterfaceImplementationV8Internal::partialCallWithExecutionContextLongAt tributeAttributeGetter(info);
747 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 747 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
748 } 748 }
749 #endif // ENABLE(PARTIAL_CONDITION) 749 #endif // ENABLE(PARTIAL_CONDITION)
750 750
751 #if ENABLE(PARTIAL_CONDITION) 751 #if ENABLE(PARTIAL_CONDITION)
752 static void partialCallWithExecutionContextLongAttributeAttributeSetter(v8::Loca l<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) 752 static void partialCallWithExecutionContextLongAttributeAttributeSetter(v8::Loca l<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
753 { 753 {
754 v8::Handle<v8::Object> holder = info.Holder(); 754 v8::Local<v8::Object> holder = info.Holder();
755 ExceptionState exceptionState(ExceptionState::SetterContext, "partialCallWit hExecutionContextLongAttribute", "TestInterface", holder, info.GetIsolate()); 755 ExceptionState exceptionState(ExceptionState::SetterContext, "partialCallWit hExecutionContextLongAttribute", "TestInterface", holder, info.GetIsolate());
756 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 756 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
757 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState) , exceptionState); 757 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState) , exceptionState);
758 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ()); 758 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate ());
759 TestPartialInterface::setPartialCallWithExecutionContextLongAttribute(execut ionContext, *impl, cppValue); 759 TestPartialInterface::setPartialCallWithExecutionContextLongAttribute(execut ionContext, *impl, cppValue);
760 } 760 }
761 #endif // ENABLE(PARTIAL_CONDITION) 761 #endif // ENABLE(PARTIAL_CONDITION)
762 762
763 #if ENABLE(PARTIAL_CONDITION) 763 #if ENABLE(PARTIAL_CONDITION)
764 static void partialCallWithExecutionContextLongAttributeAttributeSetterCallback( v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackI nfo<void>& info) 764 static void partialCallWithExecutionContextLongAttributeAttributeSetterCallback( v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackI nfo<void>& info)
765 { 765 {
766 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); 766 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
767 TestInterfaceImplementationV8Internal::partialCallWithExecutionContextLongAt tributeAttributeSetter(v8Value, info); 767 TestInterfaceImplementationV8Internal::partialCallWithExecutionContextLongAt tributeAttributeSetter(v8Value, info);
768 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 768 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
769 } 769 }
770 #endif // ENABLE(PARTIAL_CONDITION) 770 #endif // ENABLE(PARTIAL_CONDITION)
771 771
772 #if ENABLE(PARTIAL_CONDITION) 772 #if ENABLE(PARTIAL_CONDITION)
773 static void partialPartialEnumTypeAttributeAttributeGetter(const v8::PropertyCal lbackInfo<v8::Value>& info) 773 static void partialPartialEnumTypeAttributeAttributeGetter(const v8::PropertyCal lbackInfo<v8::Value>& info)
774 { 774 {
775 v8::Handle<v8::Object> holder = info.Holder(); 775 v8::Local<v8::Object> holder = info.Holder();
776 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 776 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
777 v8SetReturnValueString(info, TestPartialInterface::partialPartialEnumTypeAtt ribute(*impl), info.GetIsolate()); 777 v8SetReturnValueString(info, TestPartialInterface::partialPartialEnumTypeAtt ribute(*impl), info.GetIsolate());
778 } 778 }
779 #endif // ENABLE(PARTIAL_CONDITION) 779 #endif // ENABLE(PARTIAL_CONDITION)
780 780
781 #if ENABLE(PARTIAL_CONDITION) 781 #if ENABLE(PARTIAL_CONDITION)
782 static void partialPartialEnumTypeAttributeAttributeGetterCallback(v8::Local<v8: :String>, const v8::PropertyCallbackInfo<v8::Value>& info) 782 static void partialPartialEnumTypeAttributeAttributeGetterCallback(v8::Local<v8: :String>, const v8::PropertyCallbackInfo<v8::Value>& info)
783 { 783 {
784 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); 784 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
785 TestInterfaceImplementationV8Internal::partialPartialEnumTypeAttributeAttrib uteGetter(info); 785 TestInterfaceImplementationV8Internal::partialPartialEnumTypeAttributeAttrib uteGetter(info);
786 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 786 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
787 } 787 }
788 #endif // ENABLE(PARTIAL_CONDITION) 788 #endif // ENABLE(PARTIAL_CONDITION)
789 789
790 #if ENABLE(PARTIAL_CONDITION) 790 #if ENABLE(PARTIAL_CONDITION)
791 static void partialPartialEnumTypeAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) 791 static void partialPartialEnumTypeAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
792 { 792 {
793 v8::Handle<v8::Object> holder = info.Holder(); 793 v8::Local<v8::Object> holder = info.Holder();
794 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 794 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
795 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); 795 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value);
796 String string = cppValue; 796 String string = cppValue;
797 if (!(string == "foo" || string == "bar")) 797 if (!(string == "foo" || string == "bar"))
798 return; 798 return;
799 TestPartialInterface::setPartialPartialEnumTypeAttribute(*impl, cppValue); 799 TestPartialInterface::setPartialPartialEnumTypeAttribute(*impl, cppValue);
800 } 800 }
801 #endif // ENABLE(PARTIAL_CONDITION) 801 #endif // ENABLE(PARTIAL_CONDITION)
802 802
803 #if ENABLE(PARTIAL_CONDITION) 803 #if ENABLE(PARTIAL_CONDITION)
804 static void partialPartialEnumTypeAttributeAttributeSetterCallback(v8::Local<v8: :String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& in fo) 804 static void partialPartialEnumTypeAttributeAttributeSetterCallback(v8::Local<v8: :String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& in fo)
805 { 805 {
806 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); 806 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
807 TestInterfaceImplementationV8Internal::partialPartialEnumTypeAttributeAttrib uteSetter(v8Value, info); 807 TestInterfaceImplementationV8Internal::partialPartialEnumTypeAttributeAttrib uteSetter(v8Value, info);
808 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 808 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
809 } 809 }
810 #endif // ENABLE(PARTIAL_CONDITION) 810 #endif // ENABLE(PARTIAL_CONDITION)
811 811
812 #if ENABLE(PARTIAL_CONDITION) 812 #if ENABLE(PARTIAL_CONDITION)
813 static void stringAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Va lue>& info) 813 static void stringAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Va lue>& info)
814 { 814 {
815 v8::Handle<v8::Object> holder = info.Holder(); 815 v8::Local<v8::Object> holder = info.Holder();
816 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 816 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
817 String result; 817 String result;
818 if (!V8TestInterface::PrivateScript::stringAttributeAttributeGetter(toFrameI fNotDetached(info.GetIsolate()->GetCurrentContext()), impl, &result)) 818 if (!V8TestInterface::PrivateScript::stringAttributeAttributeGetter(toFrameI fNotDetached(info.GetIsolate()->GetCurrentContext()), impl, &result))
819 return; 819 return;
820 v8SetReturnValueString(info, result, info.GetIsolate()); 820 v8SetReturnValueString(info, result, info.GetIsolate());
821 } 821 }
822 #endif // ENABLE(PARTIAL_CONDITION) 822 #endif // ENABLE(PARTIAL_CONDITION)
823 823
824 #if ENABLE(PARTIAL_CONDITION) 824 #if ENABLE(PARTIAL_CONDITION)
825 static void stringAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) 825 static void stringAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
826 { 826 {
827 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); 827 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
828 TestInterfaceImplementationV8Internal::stringAttributeAttributeGetter(info); 828 TestInterfaceImplementationV8Internal::stringAttributeAttributeGetter(info);
829 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 829 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
830 } 830 }
831 #endif // ENABLE(PARTIAL_CONDITION) 831 #endif // ENABLE(PARTIAL_CONDITION)
832 832
833 #if ENABLE(PARTIAL_CONDITION) 833 #if ENABLE(PARTIAL_CONDITION)
834 static void stringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v 8::PropertyCallbackInfo<void>& info) 834 static void stringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v 8::PropertyCallbackInfo<void>& info)
835 { 835 {
836 v8::Handle<v8::Object> holder = info.Holder(); 836 v8::Local<v8::Object> holder = info.Holder();
837 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 837 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
838 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value); 838 TOSTRING_VOID(V8StringResource<>, cppValue, v8Value);
839 V8TestInterface::PrivateScript::stringAttributeAttributeSetter(toFrameIfNotD etached(info.GetIsolate()->GetCurrentContext()), impl, cppValue); 839 V8TestInterface::PrivateScript::stringAttributeAttributeSetter(toFrameIfNotD etached(info.GetIsolate()->GetCurrentContext()), impl, cppValue);
840 } 840 }
841 #endif // ENABLE(PARTIAL_CONDITION) 841 #endif // ENABLE(PARTIAL_CONDITION)
842 842
843 #if ENABLE(PARTIAL_CONDITION) 843 #if ENABLE(PARTIAL_CONDITION)
844 static void stringAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Lo cal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) 844 static void stringAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Lo cal<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
845 { 845 {
846 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); 846 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
847 TestInterfaceImplementationV8Internal::stringAttributeAttributeSetter(v8Valu e, info); 847 TestInterfaceImplementationV8Internal::stringAttributeAttributeSetter(v8Valu e, info);
848 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 848 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
849 } 849 }
850 #endif // ENABLE(PARTIAL_CONDITION) 850 #endif // ENABLE(PARTIAL_CONDITION)
851 851
852 static void partial2LongAttributeAttributeGetter(const v8::PropertyCallbackInfo< v8::Value>& info) 852 static void partial2LongAttributeAttributeGetter(const v8::PropertyCallbackInfo< v8::Value>& info)
853 { 853 {
854 v8::Handle<v8::Object> holder = info.Holder(); 854 v8::Local<v8::Object> holder = info.Holder();
855 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 855 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
856 v8SetReturnValueInt(info, TestPartialInterfaceImplementation::partial2LongAt tribute(*impl)); 856 v8SetReturnValueInt(info, TestPartialInterfaceImplementation::partial2LongAt tribute(*impl));
857 } 857 }
858 858
859 static void partial2LongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) 859 static void partial2LongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
860 { 860 {
861 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); 861 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
862 TestInterfaceImplementationV8Internal::partial2LongAttributeAttributeGetter( info); 862 TestInterfaceImplementationV8Internal::partial2LongAttributeAttributeGetter( info);
863 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 863 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
864 } 864 }
865 865
866 static void partial2LongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c onst v8::PropertyCallbackInfo<void>& info) 866 static void partial2LongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c onst v8::PropertyCallbackInfo<void>& info)
867 { 867 {
868 v8::Handle<v8::Object> holder = info.Holder(); 868 v8::Local<v8::Object> holder = info.Holder();
869 ExceptionState exceptionState(ExceptionState::SetterContext, "partial2LongAt tribute", "TestInterface", holder, info.GetIsolate()); 869 ExceptionState exceptionState(ExceptionState::SetterContext, "partial2LongAt tribute", "TestInterface", holder, info.GetIsolate());
870 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); 870 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder);
871 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState) , exceptionState); 871 TONATIVE_VOID_EXCEPTIONSTATE(int, cppValue, toInt32(v8Value, exceptionState) , exceptionState);
872 TestPartialInterfaceImplementation::setPartial2LongAttribute(*impl, cppValue ); 872 TestPartialInterfaceImplementation::setPartial2LongAttribute(*impl, cppValue );
873 } 873 }
874 874
875 static void partial2LongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) 875 static void partial2LongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
876 { 876 {
877 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); 877 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
878 TestInterfaceImplementationV8Internal::partial2LongAttributeAttributeSetter( v8Value, info); 878 TestInterfaceImplementationV8Internal::partial2LongAttributeAttributeSetter( v8Value, info);
(...skipping 21 matching lines...) Expand all
900 900
901 static void partial2StaticLongAttributeAttributeSetterCallback(v8::Local<v8::Str ing>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) 901 static void partial2StaticLongAttributeAttributeSetterCallback(v8::Local<v8::Str ing>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
902 { 902 {
903 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); 903 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
904 TestInterfaceImplementationV8Internal::partial2StaticLongAttributeAttributeS etter(v8Value, info); 904 TestInterfaceImplementationV8Internal::partial2StaticLongAttributeAttributeS etter(v8Value, info);
905 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 905 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
906 } 906 }
907 907
908 static void TestInterfaceImplementationConstructorGetter(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) 908 static void TestInterfaceImplementationConstructorGetter(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
909 { 909 {
910 v8::Handle<v8::Value> data = info.Data(); 910 v8::Local<v8::Value> data = info.Data();
911 ASSERT(data->IsExternal()); 911 ASSERT(data->IsExternal());
912 V8PerContextData* perContextData = V8PerContextData::from(info.Holder()->Cre ationContext()); 912 V8PerContextData* perContextData = V8PerContextData::from(info.Holder()->Cre ationContext());
913 if (!perContextData) 913 if (!perContextData)
914 return; 914 return;
915 v8SetReturnValue(info, perContextData->constructorForType(WrapperTypeInfo::u nwrap(data))); 915 v8SetReturnValue(info, perContextData->constructorForType(WrapperTypeInfo::u nwrap(data)));
916 } 916 }
917 917
918 static void TestInterfaceImplementationForceSetAttributeOnThis(v8::Local<v8::Str ing> name, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& i nfo) 918 static void TestInterfaceImplementationForceSetAttributeOnThis(v8::Local<v8::Str ing> name, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& i nfo)
919 { 919 {
920 if (info.This()->IsObject()) 920 if (info.This()->IsObject())
(...skipping 947 matching lines...) Expand 10 before | Expand all | Expand 10 after
1868 } 1868 }
1869 1869
1870 static void namedPropertyEnumerator(const v8::PropertyCallbackInfo<v8::Array>& i nfo) 1870 static void namedPropertyEnumerator(const v8::PropertyCallbackInfo<v8::Array>& i nfo)
1871 { 1871 {
1872 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); 1872 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
1873 Vector<String> names; 1873 Vector<String> names;
1874 ExceptionState exceptionState(ExceptionState::EnumerationContext, "TestInter face", info.Holder(), info.GetIsolate()); 1874 ExceptionState exceptionState(ExceptionState::EnumerationContext, "TestInter face", info.Holder(), info.GetIsolate());
1875 impl->namedPropertyEnumerator(names, exceptionState); 1875 impl->namedPropertyEnumerator(names, exceptionState);
1876 if (exceptionState.throwIfNeeded()) 1876 if (exceptionState.throwIfNeeded())
1877 return; 1877 return;
1878 v8::Handle<v8::Array> v8names = v8::Array::New(info.GetIsolate(), names.size ()); 1878 v8::Local<v8::Array> v8names = v8::Array::New(info.GetIsolate(), names.size( ));
1879 for (size_t i = 0; i < names.size(); ++i) 1879 for (size_t i = 0; i < names.size(); ++i)
1880 v8names->Set(v8::Integer::New(info.GetIsolate(), i), v8String(info.GetIs olate(), names[i])); 1880 v8names->Set(v8::Integer::New(info.GetIsolate(), i), v8String(info.GetIs olate(), names[i]));
1881 v8SetReturnValue(info, v8names); 1881 v8SetReturnValue(info, v8names);
1882 } 1882 }
1883 1883
1884 static void namedPropertyEnumeratorCallback(const v8::PropertyCallbackInfo<v8::A rray>& info) 1884 static void namedPropertyEnumeratorCallback(const v8::PropertyCallbackInfo<v8::A rray>& info)
1885 { 1885 {
1886 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMNamedProperty"); 1886 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMNamedProperty");
1887 TestInterfaceImplementationV8Internal::namedPropertyEnumerator(info); 1887 TestInterfaceImplementationV8Internal::namedPropertyEnumerator(info);
1888 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 1888 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
2208 { 2208 {
2209 scriptWrappable->toImpl<TestInterfaceImplementation>()->deref(); 2209 scriptWrappable->toImpl<TestInterfaceImplementation>()->deref();
2210 } 2210 }
2211 2211
2212 bool V8TestInterface::PrivateScript::shortMethodWithShortArgumentImplementedInPr ivateScriptMethod(LocalFrame* frame, TestInterface* holderImpl, int value, int* result) 2212 bool V8TestInterface::PrivateScript::shortMethodWithShortArgumentImplementedInPr ivateScriptMethod(LocalFrame* frame, TestInterface* holderImpl, int value, int* result)
2213 { 2213 {
2214 if (!frame) 2214 if (!frame)
2215 return false; 2215 return false;
2216 v8::HandleScope handleScope(toIsolate(frame)); 2216 v8::HandleScope handleScope(toIsolate(frame));
2217 ScriptForbiddenScope::AllowUserAgentScript script; 2217 ScriptForbiddenScope::AllowUserAgentScript script;
2218 v8::Handle<v8::Context> contextInPrivateScript = toV8Context(frame, DOMWrapp erWorld::privateScriptIsolatedWorld()); 2218 v8::Local<v8::Context> contextInPrivateScript = toV8Context(frame, DOMWrappe rWorld::privateScriptIsolatedWorld());
2219 if (contextInPrivateScript.IsEmpty()) 2219 if (contextInPrivateScript.IsEmpty())
2220 return false; 2220 return false;
2221 ScriptState* scriptState = ScriptState::from(contextInPrivateScript); 2221 ScriptState* scriptState = ScriptState::from(contextInPrivateScript);
2222 ScriptState* scriptStateInUserScript = ScriptState::forMainWorld(frame); 2222 ScriptState* scriptStateInUserScript = ScriptState::forMainWorld(frame);
2223 if (!scriptState->executionContext()) 2223 if (!scriptState->executionContext())
2224 return false; 2224 return false;
2225 2225
2226 ScriptState::Scope scope(scriptState); 2226 ScriptState::Scope scope(scriptState);
2227 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob al(), scriptState->isolate()); 2227 v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Globa l(), scriptState->isolate());
2228 2228
2229 v8::Handle<v8::Value> valueHandle = v8::Integer::New(scriptState->isolate(), value); 2229 v8::Local<v8::Value> valueHandle = v8::Integer::New(scriptState->isolate(), value);
2230 v8::Handle<v8::Value> argv[] = { valueHandle }; 2230 v8::Local<v8::Value> argv[] = { valueHandle };
2231 ExceptionState exceptionState(ExceptionState::ExecutionContext, "shortMethod WithShortArgumentImplementedInPrivateScript", "TestInterfaceImplementation", scr iptState->context()->Global(), scriptState->isolate()); 2231 ExceptionState exceptionState(ExceptionState::ExecutionContext, "shortMethod WithShortArgumentImplementedInPrivateScript", "TestInterfaceImplementation", scr iptState->context()->Global(), scriptState->isolate());
2232 v8::Handle<v8::Value> v8Value = PrivateScriptRunner::runDOMMethod(scriptStat e, scriptStateInUserScript, "TestInterfaceImplementation", "shortMethodWithShort ArgumentImplementedInPrivateScript", holder, 1, argv); 2232 v8::Local<v8::Value> v8Value = PrivateScriptRunner::runDOMMethod(scriptState , scriptStateInUserScript, "TestInterfaceImplementation", "shortMethodWithShortA rgumentImplementedInPrivateScript", holder, 1, argv);
2233 if (v8Value.IsEmpty()) 2233 if (v8Value.IsEmpty())
2234 return false; 2234 return false;
2235 TONATIVE_DEFAULT_EXCEPTIONSTATE(int, cppValue, toInt16(v8Value, exceptionSta te), exceptionState, false); 2235 TONATIVE_DEFAULT_EXCEPTIONSTATE(int, cppValue, toInt16(v8Value, exceptionSta te), exceptionState, false);
2236 *result = cppValue; 2236 *result = cppValue;
2237 RELEASE_ASSERT(!exceptionState.hadException()); 2237 RELEASE_ASSERT(!exceptionState.hadException());
2238 return true; 2238 return true;
2239 } 2239 }
2240 2240
2241 bool V8TestInterface::PrivateScript::stringAttributeAttributeGetter(LocalFrame* frame, TestInterfaceImplementation* holderImpl, String* result) 2241 bool V8TestInterface::PrivateScript::stringAttributeAttributeGetter(LocalFrame* frame, TestInterfaceImplementation* holderImpl, String* result)
2242 { 2242 {
2243 if (!frame) 2243 if (!frame)
2244 return false; 2244 return false;
2245 v8::HandleScope handleScope(toIsolate(frame)); 2245 v8::HandleScope handleScope(toIsolate(frame));
2246 ScriptForbiddenScope::AllowUserAgentScript script; 2246 ScriptForbiddenScope::AllowUserAgentScript script;
2247 v8::Handle<v8::Context> contextInPrivateScript = toV8Context(frame, DOMWrapp erWorld::privateScriptIsolatedWorld()); 2247 v8::Local<v8::Context> contextInPrivateScript = toV8Context(frame, DOMWrappe rWorld::privateScriptIsolatedWorld());
2248 if (contextInPrivateScript.IsEmpty()) 2248 if (contextInPrivateScript.IsEmpty())
2249 return false; 2249 return false;
2250 ScriptState* scriptState = ScriptState::from(contextInPrivateScript); 2250 ScriptState* scriptState = ScriptState::from(contextInPrivateScript);
2251 ScriptState* scriptStateInUserScript = ScriptState::forMainWorld(frame); 2251 ScriptState* scriptStateInUserScript = ScriptState::forMainWorld(frame);
2252 if (!scriptState->executionContext()) 2252 if (!scriptState->executionContext())
2253 return false; 2253 return false;
2254 2254
2255 ScriptState::Scope scope(scriptState); 2255 ScriptState::Scope scope(scriptState);
2256 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob al(), scriptState->isolate()); 2256 v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Globa l(), scriptState->isolate());
2257 2257
2258 ExceptionState exceptionState(ExceptionState::GetterContext, "stringAttribut e", "TestInterfaceImplementation", scriptState->context()->Global(), scriptState ->isolate()); 2258 ExceptionState exceptionState(ExceptionState::GetterContext, "stringAttribut e", "TestInterfaceImplementation", scriptState->context()->Global(), scriptState ->isolate());
2259 v8::Handle<v8::Value> v8Value = PrivateScriptRunner::runDOMAttributeGetter(s criptState, scriptStateInUserScript, "TestInterfaceImplementation", "stringAttri bute", holder); 2259 v8::Local<v8::Value> v8Value = PrivateScriptRunner::runDOMAttributeGetter(sc riptState, scriptStateInUserScript, "TestInterfaceImplementation", "stringAttrib ute", holder);
2260 if (v8Value.IsEmpty()) 2260 if (v8Value.IsEmpty())
2261 return false; 2261 return false;
2262 TOSTRING_DEFAULT(V8StringResource<>, cppValue, v8Value, false); 2262 TOSTRING_DEFAULT(V8StringResource<>, cppValue, v8Value, false);
2263 RELEASE_ASSERT(!exceptionState.hadException()); 2263 RELEASE_ASSERT(!exceptionState.hadException());
2264 *result = cppValue; 2264 *result = cppValue;
2265 return true; 2265 return true;
2266 } 2266 }
2267 2267
2268 bool V8TestInterface::PrivateScript::stringAttributeAttributeSetter(LocalFrame* frame, TestInterfaceImplementation* holderImpl, String cppValue) 2268 bool V8TestInterface::PrivateScript::stringAttributeAttributeSetter(LocalFrame* frame, TestInterfaceImplementation* holderImpl, String cppValue)
2269 { 2269 {
2270 if (!frame) 2270 if (!frame)
2271 return false; 2271 return false;
2272 v8::HandleScope handleScope(toIsolate(frame)); 2272 v8::HandleScope handleScope(toIsolate(frame));
2273 ScriptForbiddenScope::AllowUserAgentScript script; 2273 ScriptForbiddenScope::AllowUserAgentScript script;
2274 v8::Handle<v8::Context> contextInPrivateScript = toV8Context(frame, DOMWrapp erWorld::privateScriptIsolatedWorld()); 2274 v8::Local<v8::Context> contextInPrivateScript = toV8Context(frame, DOMWrappe rWorld::privateScriptIsolatedWorld());
2275 if (contextInPrivateScript.IsEmpty()) 2275 if (contextInPrivateScript.IsEmpty())
2276 return false; 2276 return false;
2277 ScriptState* scriptState = ScriptState::from(contextInPrivateScript); 2277 ScriptState* scriptState = ScriptState::from(contextInPrivateScript);
2278 ScriptState* scriptStateInUserScript = ScriptState::forMainWorld(frame); 2278 ScriptState* scriptStateInUserScript = ScriptState::forMainWorld(frame);
2279 if (!scriptState->executionContext()) 2279 if (!scriptState->executionContext())
2280 return false; 2280 return false;
2281 2281
2282 ScriptState::Scope scope(scriptState); 2282 ScriptState::Scope scope(scriptState);
2283 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob al(), scriptState->isolate()); 2283 v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Globa l(), scriptState->isolate());
2284 2284
2285 ExceptionState exceptionState(ExceptionState::SetterContext, "stringAttribut e", "TestInterfaceImplementation", scriptState->context()->Global(), scriptState ->isolate()); 2285 ExceptionState exceptionState(ExceptionState::SetterContext, "stringAttribut e", "TestInterfaceImplementation", scriptState->context()->Global(), scriptState ->isolate());
2286 return PrivateScriptRunner::runDOMAttributeSetter(scriptState, scriptStateIn UserScript, "TestInterfaceImplementation", "stringAttribute", holder, v8String(s criptState->isolate(), cppValue)); 2286 return PrivateScriptRunner::runDOMAttributeSetter(scriptState, scriptStateIn UserScript, "TestInterfaceImplementation", "stringAttribute", holder, v8String(s criptState->isolate(), cppValue));
2287 } 2287 }
2288 2288
2289 InstallTemplateFunction V8TestInterface::installV8TestInterfaceTemplateFunction = (InstallTemplateFunction)&V8TestInterface::installV8TestInterfaceTemplate; 2289 InstallTemplateFunction V8TestInterface::installV8TestInterfaceTemplateFunction = (InstallTemplateFunction)&V8TestInterface::installV8TestInterfaceTemplate;
2290 2290
2291 void V8TestInterface::updateWrapperTypeInfo(InstallTemplateFunction installTempl ateFunction, InstallConditionallyEnabledMethodsFunction installConditionallyEnab ledMethodsFunction) 2291 void V8TestInterface::updateWrapperTypeInfo(InstallTemplateFunction installTempl ateFunction, InstallConditionallyEnabledMethodsFunction installConditionallyEnab ledMethodsFunction)
2292 { 2292 {
2293 V8TestInterface::installV8TestInterfaceTemplateFunction = installTemplateFun ction; 2293 V8TestInterface::installV8TestInterfaceTemplateFunction = installTemplateFun ction;
(...skipping 20 matching lines...) Expand all
2314 void V8TestInterface::registerPartial2VoidMethodMethodForPartialInterface(void ( *method)(const v8::FunctionCallbackInfo<v8::Value>&)) 2314 void V8TestInterface::registerPartial2VoidMethodMethodForPartialInterface(void ( *method)(const v8::FunctionCallbackInfo<v8::Value>&))
2315 { 2315 {
2316 TestInterfaceImplementationV8Internal::partial2VoidMethodMethodForPartialInt erface = method; 2316 TestInterfaceImplementationV8Internal::partial2VoidMethodMethodForPartialInt erface = method;
2317 } 2317 }
2318 void V8TestInterface::registerPartial2StaticVoidMethodMethodForPartialInterface( void (*method)(const v8::FunctionCallbackInfo<v8::Value>&)) 2318 void V8TestInterface::registerPartial2StaticVoidMethodMethodForPartialInterface( void (*method)(const v8::FunctionCallbackInfo<v8::Value>&))
2319 { 2319 {
2320 TestInterfaceImplementationV8Internal::partial2StaticVoidMethodMethodForPart ialInterface = method; 2320 TestInterfaceImplementationV8Internal::partial2StaticVoidMethodMethodForPart ialInterface = method;
2321 } 2321 }
2322 } // namespace blink 2322 } // namespace blink
2323 #endif // ENABLE(CONDITION) 2323 #endif // ENABLE(CONDITION)
OLDNEW
« no previous file with comments | « Source/bindings/tests/results/core/V8TestException.cpp ('k') | Source/bindings/tests/results/core/V8TestInterface2.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698