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

Side by Side Diff: Source/bindings/tests/results/V8SupportTestInterface.cpp

Issue 127723002: Add use counters for using Attrs as Nodes. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Bring patch to head. Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 16 matching lines...) Expand all
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 // This file has been auto-generated by code_generator_v8.pm. DO NOT MODIFY! 31 // This file has been auto-generated by code_generator_v8.pm. DO NOT MODIFY!
32 32
33 #include "config.h" 33 #include "config.h"
34 #include "V8SupportTestInterface.h" 34 #include "V8SupportTestInterface.h"
35 35
36 #include "RuntimeEnabledFeatures.h" 36 #include "RuntimeEnabledFeatures.h"
37 #include "V8Attr.h"
37 #include "V8Node.h" 38 #include "V8Node.h"
38 #include "V8TestObject.h" 39 #include "V8TestObject.h"
39 #include "bindings/tests/idls/testing/SupportTestPartialInterface.h" 40 #include "bindings/tests/idls/testing/SupportTestPartialInterface.h"
40 #include "bindings/v8/ExceptionState.h" 41 #include "bindings/v8/ExceptionState.h"
41 #include "bindings/v8/V8DOMConfiguration.h" 42 #include "bindings/v8/V8DOMConfiguration.h"
42 #include "bindings/v8/V8ObjectConstructor.h" 43 #include "bindings/v8/V8ObjectConstructor.h"
43 #include "core/dom/ContextFeatures.h" 44 #include "core/dom/ContextFeatures.h"
44 #include "core/dom/Document.h" 45 #include "core/dom/Document.h"
46 #include "core/frame/UseCounter.h"
45 #include "platform/TraceEvent.h" 47 #include "platform/TraceEvent.h"
46 #include "wtf/GetPtr.h" 48 #include "wtf/GetPtr.h"
47 #include "wtf/RefPtr.h" 49 #include "wtf/RefPtr.h"
48 50
49 namespace WebCore { 51 namespace WebCore {
50 52
51 static void initializeScriptWrappableForInterface(SupportTestInterface* object) 53 static void initializeScriptWrappableForInterface(SupportTestInterface* object)
52 { 54 {
53 if (ScriptWrappable::wrapperCanBeStoredInObject(object)) 55 if (ScriptWrappable::wrapperCanBeStoredInObject(object))
54 ScriptWrappable::setTypeInfoInObject(object, &V8SupportTestInterface::wr apperTypeInfo); 56 ScriptWrappable::setTypeInfoInObject(object, &V8SupportTestInterface::wr apperTypeInfo);
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 SupportTestInterface* imp = V8SupportTestInterface::toNative(info.Holder()); 218 SupportTestInterface* imp = V8SupportTestInterface::toNative(info.Holder());
217 V8TRYCATCH_VOID(Node*, cppValue, V8Node::hasInstance(jsValue, info.GetIsolat e(), worldType(info.GetIsolate())) ? V8Node::toNative(v8::Handle<v8::Object>::Ca st(jsValue)) : 0); 219 V8TRYCATCH_VOID(Node*, cppValue, V8Node::hasInstance(jsValue, info.GetIsolat e(), worldType(info.GetIsolate())) ? V8Node::toNative(v8::Handle<v8::Object>::Ca st(jsValue)) : 0);
218 SupportTestPartialInterface::setSupplementalNode(imp, WTF::getPtr(cppValue)) ; 220 SupportTestPartialInterface::setSupplementalNode(imp, WTF::getPtr(cppValue)) ;
219 } 221 }
220 #endif // ENABLE(Condition11) || ENABLE(Condition12) 222 #endif // ENABLE(Condition11) || ENABLE(Condition12)
221 223
222 #if ENABLE(Condition11) || ENABLE(Condition12) 224 #if ENABLE(Condition11) || ENABLE(Condition12)
223 static void supplementalNodeAttributeSetterCallback(v8::Local<v8::String>, v8::L ocal<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 225 static void supplementalNodeAttributeSetterCallback(v8::Local<v8::String>, v8::L ocal<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
224 { 226 {
225 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 227 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
228 if (V8DOMWrapper::isWrapperOfType(jsValue, &V8Attr::wrapperTypeInfo))
229 UseCounter::count(activeExecutionContext(), UseCounter::AttrUsedAsNodePa rameter);
226 SupportTestInterfaceV8Internal::supplementalNodeAttributeSetter(jsValue, inf o); 230 SupportTestInterfaceV8Internal::supplementalNodeAttributeSetter(jsValue, inf o);
227 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 231 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
228 } 232 }
229 #endif // ENABLE(Condition11) || ENABLE(Condition12) 233 #endif // ENABLE(Condition11) || ENABLE(Condition12)
230 234
231 #if ENABLE(Condition11) || ENABLE(Condition12) 235 #if ENABLE(Condition11) || ENABLE(Condition12)
232 static void Node13AttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& inf o) 236 static void Node13AttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& inf o)
233 { 237 {
234 SupportTestInterface* imp = V8SupportTestInterface::toNative(info.Holder()); 238 SupportTestInterface* imp = V8SupportTestInterface::toNative(info.Holder());
235 v8SetReturnValueFast(info, SupportTestPartialInterface::node13(imp), imp); 239 v8SetReturnValueFast(info, SupportTestPartialInterface::node13(imp), imp);
(...skipping 15 matching lines...) Expand all
251 SupportTestInterface* imp = V8SupportTestInterface::toNative(info.Holder()); 255 SupportTestInterface* imp = V8SupportTestInterface::toNative(info.Holder());
252 V8TRYCATCH_VOID(Node*, cppValue, V8Node::hasInstance(jsValue, info.GetIsolat e(), worldType(info.GetIsolate())) ? V8Node::toNative(v8::Handle<v8::Object>::Ca st(jsValue)) : 0); 256 V8TRYCATCH_VOID(Node*, cppValue, V8Node::hasInstance(jsValue, info.GetIsolat e(), worldType(info.GetIsolate())) ? V8Node::toNative(v8::Handle<v8::Object>::Ca st(jsValue)) : 0);
253 SupportTestPartialInterface::setNode13(imp, WTF::getPtr(cppValue)); 257 SupportTestPartialInterface::setNode13(imp, WTF::getPtr(cppValue));
254 } 258 }
255 #endif // ENABLE(Condition11) || ENABLE(Condition12) 259 #endif // ENABLE(Condition11) || ENABLE(Condition12)
256 260
257 #if ENABLE(Condition11) || ENABLE(Condition12) 261 #if ENABLE(Condition11) || ENABLE(Condition12)
258 static void Node13AttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::V alue> jsValue, const v8::PropertyCallbackInfo<void>& info) 262 static void Node13AttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::V alue> jsValue, const v8::PropertyCallbackInfo<void>& info)
259 { 263 {
260 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 264 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
265 if (V8DOMWrapper::isWrapperOfType(jsValue, &V8Attr::wrapperTypeInfo))
266 UseCounter::count(activeExecutionContext(), UseCounter::AttrUsedAsNodePa rameter);
261 SupportTestInterfaceV8Internal::Node13AttributeSetter(jsValue, info); 267 SupportTestInterfaceV8Internal::Node13AttributeSetter(jsValue, info);
262 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 268 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
263 } 269 }
264 #endif // ENABLE(Condition11) || ENABLE(Condition12) 270 #endif // ENABLE(Condition11) || ENABLE(Condition12)
265 271
266 #if ENABLE(Condition11) || ENABLE(Condition12) 272 #if ENABLE(Condition11) || ENABLE(Condition12)
267 static void Node14AttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& inf o) 273 static void Node14AttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& inf o)
268 { 274 {
269 SupportTestInterface* imp = V8SupportTestInterface::toNative(info.Holder()); 275 SupportTestInterface* imp = V8SupportTestInterface::toNative(info.Holder());
270 v8SetReturnValueFast(info, SupportTestPartialInterface::node14(imp), imp); 276 v8SetReturnValueFast(info, SupportTestPartialInterface::node14(imp), imp);
(...skipping 15 matching lines...) Expand all
286 SupportTestInterface* imp = V8SupportTestInterface::toNative(info.Holder()); 292 SupportTestInterface* imp = V8SupportTestInterface::toNative(info.Holder());
287 V8TRYCATCH_VOID(Node*, cppValue, V8Node::hasInstance(jsValue, info.GetIsolat e(), worldType(info.GetIsolate())) ? V8Node::toNative(v8::Handle<v8::Object>::Ca st(jsValue)) : 0); 293 V8TRYCATCH_VOID(Node*, cppValue, V8Node::hasInstance(jsValue, info.GetIsolat e(), worldType(info.GetIsolate())) ? V8Node::toNative(v8::Handle<v8::Object>::Ca st(jsValue)) : 0);
288 SupportTestPartialInterface::setNode14(imp, WTF::getPtr(cppValue)); 294 SupportTestPartialInterface::setNode14(imp, WTF::getPtr(cppValue));
289 } 295 }
290 #endif // ENABLE(Condition11) || ENABLE(Condition12) 296 #endif // ENABLE(Condition11) || ENABLE(Condition12)
291 297
292 #if ENABLE(Condition11) || ENABLE(Condition12) 298 #if ENABLE(Condition11) || ENABLE(Condition12)
293 static void Node14AttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::V alue> jsValue, const v8::PropertyCallbackInfo<void>& info) 299 static void Node14AttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::V alue> jsValue, const v8::PropertyCallbackInfo<void>& info)
294 { 300 {
295 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 301 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
302 if (V8DOMWrapper::isWrapperOfType(jsValue, &V8Attr::wrapperTypeInfo))
303 UseCounter::count(activeExecutionContext(), UseCounter::AttrUsedAsNodePa rameter);
296 SupportTestInterfaceV8Internal::Node14AttributeSetter(jsValue, info); 304 SupportTestInterfaceV8Internal::Node14AttributeSetter(jsValue, info);
297 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 305 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
298 } 306 }
299 #endif // ENABLE(Condition11) || ENABLE(Condition12) 307 #endif // ENABLE(Condition11) || ENABLE(Condition12)
300 308
301 #if ENABLE(Condition11) || ENABLE(Condition12) 309 #if ENABLE(Condition11) || ENABLE(Condition12)
302 static void supplementalMethod1Method(const v8::FunctionCallbackInfo<v8::Value>& info) 310 static void supplementalMethod1Method(const v8::FunctionCallbackInfo<v8::Value>& info)
303 { 311 {
304 SupportTestInterface* imp = V8SupportTestInterface::toNative(info.Holder()); 312 SupportTestInterface* imp = V8SupportTestInterface::toNative(info.Holder());
305 SupportTestPartialInterface::supplementalMethod1(imp); 313 SupportTestPartialInterface::supplementalMethod1(imp);
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
505 fromInternalPointer(object)->deref(); 513 fromInternalPointer(object)->deref();
506 } 514 }
507 515
508 template<> 516 template<>
509 v8::Handle<v8::Value> toV8NoInline(SupportTestInterface* impl, v8::Handle<v8::Ob ject> creationContext, v8::Isolate* isolate) 517 v8::Handle<v8::Value> toV8NoInline(SupportTestInterface* impl, v8::Handle<v8::Ob ject> creationContext, v8::Isolate* isolate)
510 { 518 {
511 return toV8(impl, creationContext, isolate); 519 return toV8(impl, creationContext, isolate);
512 } 520 }
513 521
514 } // namespace WebCore 522 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/scripts/code_generator_v8.pm ('k') | Source/bindings/tests/results/V8TestEventTarget.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698