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

Side by Side Diff: Source/bindings/tests/results/V8TestSVG.h

Issue 172033002: Remove WrapperTypeTraits (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 10 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 return static_cast<TestSVG*>(object); 62 return static_cast<TestSVG*>(object);
63 } 63 }
64 static void installPerContextEnabledProperties(v8::Handle<v8::Object>, TestS VG*, v8::Isolate*) { } 64 static void installPerContextEnabledProperties(v8::Handle<v8::Object>, TestS VG*, v8::Isolate*) { }
65 static void installPerContextEnabledMethods(v8::Handle<v8::Object>, v8::Isol ate*) { } 65 static void installPerContextEnabledMethods(v8::Handle<v8::Object>, v8::Isol ate*) { }
66 66
67 private: 67 private:
68 friend v8::Handle<v8::Object> wrap(TestSVG*, v8::Handle<v8::Object> creation Context, v8::Isolate*); 68 friend v8::Handle<v8::Object> wrap(TestSVG*, v8::Handle<v8::Object> creation Context, v8::Isolate*);
69 static v8::Handle<v8::Object> createWrapper(PassRefPtr<TestSVG>, v8::Handle< v8::Object> creationContext, v8::Isolate*); 69 static v8::Handle<v8::Object> createWrapper(PassRefPtr<TestSVG>, v8::Handle< v8::Object> creationContext, v8::Isolate*);
70 }; 70 };
71 71
72 template<>
73 class WrapperTypeTraits<TestSVG > {
74 public:
75 static const WrapperTypeInfo* wrapperTypeInfo() { return &V8TestSVG::wrapper TypeInfo; }
76 };
77
78 inline v8::Handle<v8::Object> wrap(TestSVG* impl, v8::Handle<v8::Object> creatio nContext, v8::Isolate* isolate) 72 inline v8::Handle<v8::Object> wrap(TestSVG* impl, v8::Handle<v8::Object> creatio nContext, v8::Isolate* isolate)
79 { 73 {
80 ASSERT(impl); 74 ASSERT(impl);
81 ASSERT(!DOMDataStore::containsWrapper<V8TestSVG>(impl, isolate)); 75 ASSERT(!DOMDataStore::containsWrapper<V8TestSVG>(impl, isolate));
82 return V8TestSVG::createWrapper(impl, creationContext, isolate); 76 return V8TestSVG::createWrapper(impl, creationContext, isolate);
83 } 77 }
84 78
85 inline v8::Handle<v8::Value> toV8(TestSVG* impl, v8::Handle<v8::Object> creation Context, v8::Isolate* isolate) 79 inline v8::Handle<v8::Value> toV8(TestSVG* impl, v8::Handle<v8::Object> creation Context, v8::Isolate* isolate)
86 { 80 {
87 if (UNLIKELY(!impl)) 81 if (UNLIKELY(!impl))
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 } 144 }
151 145
152 template<class CallbackInfo, class Wrappable> 146 template<class CallbackInfo, class Wrappable>
153 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, PassRefPtr<Te stSVG> impl, Wrappable* wrappable) 147 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, PassRefPtr<Te stSVG> impl, Wrappable* wrappable)
154 { 148 {
155 v8SetReturnValueFast(callbackInfo, impl.get(), wrappable); 149 v8SetReturnValueFast(callbackInfo, impl.get(), wrappable);
156 } 150 }
157 151
158 } 152 }
159 #endif // V8TestSVG_h 153 #endif // V8TestSVG_h
OLDNEW
« no previous file with comments | « Source/bindings/tests/results/V8TestObjectPython.h ('k') | Source/bindings/tests/results/V8TestSpecialOperationsAnonymous.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698