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

Side by Side Diff: Source/bindings/templates/interface.h

Issue 99123003: IDL compiler: [SpecialWrapFor] interfaces (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased Created 7 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 | Annotate | Revision Log
OLDNEW
1 {# http://www.chromium.org/blink/coding-style#TOC-License #} 1 {# http://www.chromium.org/blink/coding-style#TOC-License #}
2 /* 2 /*
3 * Copyright (C) 2013 Google Inc. All rights reserved. 3 * Copyright (C) 2013 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 { 124 {
125 v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackIn fo.GetIsolate())); 125 v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackIn fo.GetIsolate()));
126 } 126 }
127 127
128 template<class CallbackInfo, class Wrappable> 128 template<class CallbackInfo, class Wrappable>
129 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, {{cpp_class}} * impl, Wrappable*) 129 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, {{cpp_class}} * impl, Wrappable*)
130 { 130 {
131 v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackIn fo.GetIsolate())); 131 v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackIn fo.GetIsolate()));
132 } 132 }
133 {% else %}{# has_custom_to_v8 #} 133 {% else %}{# has_custom_to_v8 #}
134 {% if has_custom_wrap %} 134 {% if has_custom_wrap or special_wrap_for %}
135 v8::Handle<v8::Object> wrap({{cpp_class}}* impl, v8::Handle<v8::Object> creation Context, v8::Isolate*); 135 v8::Handle<v8::Object> wrap({{cpp_class}}* impl, v8::Handle<v8::Object> creation Context, v8::Isolate*);
136 {% else %} 136 {% else %}
137 inline v8::Handle<v8::Object> wrap({{cpp_class}}* impl, v8::Handle<v8::Object> c reationContext, v8::Isolate* isolate) 137 inline v8::Handle<v8::Object> wrap({{cpp_class}}* impl, v8::Handle<v8::Object> c reationContext, v8::Isolate* isolate)
138 { 138 {
139 ASSERT(impl); 139 ASSERT(impl);
140 ASSERT(!DOMDataStore::containsWrapper<{{v8_class}}>(impl, isolate)); 140 ASSERT(!DOMDataStore::containsWrapper<{{v8_class}}>(impl, isolate));
141 return {{v8_class}}::createWrapper(impl, creationContext, isolate); 141 return {{v8_class}}::createWrapper(impl, creationContext, isolate);
142 } 142 }
143 {% endif %} 143 {% endif %}
144 144
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 212
213 template<class CallbackInfo, class Wrappable> 213 template<class CallbackInfo, class Wrappable>
214 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, PassRefPtr<{{ cpp_class}} > impl, Wrappable* wrappable) 214 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, PassRefPtr<{{ cpp_class}} > impl, Wrappable* wrappable)
215 { 215 {
216 v8SetReturnValueFast(callbackInfo, impl.get(), wrappable); 216 v8SetReturnValueFast(callbackInfo, impl.get(), wrappable);
217 } 217 }
218 218
219 } 219 }
220 {% endfilter %} 220 {% endfilter %}
221 #endif // {{v8_class}}_h 221 #endif // {{v8_class}}_h
OLDNEW
« no previous file with comments | « Source/bindings/scripts/unstable/v8_interface.py ('k') | Source/bindings/templates/interface.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698