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

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

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
« no previous file with comments | « Source/bindings/tests/idls/TestInterfacePython2.idl ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "V8TestInterfacePython2.h" 34 #include "V8TestInterfacePython2.h"
35 35
36 #include "RuntimeEnabledFeatures.h" 36 #include "RuntimeEnabledFeatures.h"
37 #include "V8Interface1.h"
38 #include "V8Interface2.h"
37 #include "bindings/v8/V8Binding.h" 39 #include "bindings/v8/V8Binding.h"
38 #include "bindings/v8/V8DOMConfiguration.h" 40 #include "bindings/v8/V8DOMConfiguration.h"
39 #include "bindings/v8/V8DOMWrapper.h" 41 #include "bindings/v8/V8DOMWrapper.h"
40 #include "core/dom/ContextFeatures.h" 42 #include "core/dom/ContextFeatures.h"
41 #include "core/dom/Document.h" 43 #include "core/dom/Document.h"
42 #include "platform/TraceEvent.h" 44 #include "platform/TraceEvent.h"
43 #include "wtf/UnusedParam.h" 45 #include "wtf/UnusedParam.h"
44 46
45 namespace WebCore { 47 namespace WebCore {
46 48
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, jsValu e, currentWorldType); 115 return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, jsValu e, currentWorldType);
114 } 116 }
115 117
116 bool V8TestInterfacePython2::hasInstanceInAnyWorld(v8::Handle<v8::Value> jsValue , v8::Isolate* isolate) 118 bool V8TestInterfacePython2::hasInstanceInAnyWorld(v8::Handle<v8::Value> jsValue , v8::Isolate* isolate)
117 { 119 {
118 return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, jsValu e, MainWorld) 120 return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, jsValu e, MainWorld)
119 || V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, jsValu e, IsolatedWorld) 121 || V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, jsValu e, IsolatedWorld)
120 || V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, jsValu e, WorkerWorld); 122 || V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, jsValu e, WorkerWorld);
121 } 123 }
122 124
125 v8::Handle<v8::Object> wrap(TestInterfacePython2* impl, v8::Handle<v8::Object> c reationContext, v8::Isolate* isolate)
126 {
127 ASSERT(impl);
128 if (impl->isInterface1())
129 return wrap(toInterface1(impl), creationContext, isolate);
130 if (impl->isInterface2())
131 return wrap(toInterface2(impl), creationContext, isolate);
132 v8::Handle<v8::Object> wrapper = V8TestInterfacePython2::createWrapper(impl, creationContext, isolate);
133 return wrapper;
134 }
135
123 v8::Handle<v8::Object> V8TestInterfacePython2::createWrapper(PassRefPtr<TestInte rfacePython2> impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate ) 136 v8::Handle<v8::Object> V8TestInterfacePython2::createWrapper(PassRefPtr<TestInte rfacePython2> impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate )
124 { 137 {
125 ASSERT(impl); 138 ASSERT(impl);
126 ASSERT(!DOMDataStore::containsWrapper<V8TestInterfacePython2>(impl.get(), is olate)); 139 ASSERT(!DOMDataStore::containsWrapper<V8TestInterfacePython2>(impl.get(), is olate));
127 if (ScriptWrappable::wrapperCanBeStoredInObject(impl.get())) { 140 if (ScriptWrappable::wrapperCanBeStoredInObject(impl.get())) {
128 const WrapperTypeInfo* actualInfo = ScriptWrappable::getTypeInfoFromObje ct(impl.get()); 141 const WrapperTypeInfo* actualInfo = ScriptWrappable::getTypeInfoFromObje ct(impl.get());
129 // Might be a XXXConstructor::wrapperTypeInfo instead of an XXX::wrapper TypeInfo. These will both have 142 // Might be a XXXConstructor::wrapperTypeInfo instead of an XXX::wrapper TypeInfo. These will both have
130 // the same object de-ref functions, though, so use that as the basis of the check. 143 // the same object de-ref functions, though, so use that as the basis of the check.
131 RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(actualInfo->derefObjectFunction == wrapperTypeInfo.derefObjectFunction); 144 RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(actualInfo->derefObjectFunction == wrapperTypeInfo.derefObjectFunction);
132 } 145 }
(...skipping 12 matching lines...) Expand all
145 fromInternalPointer(object)->deref(); 158 fromInternalPointer(object)->deref();
146 } 159 }
147 160
148 template<> 161 template<>
149 v8::Handle<v8::Value> toV8NoInline(TestInterfacePython2* impl, v8::Handle<v8::Ob ject> creationContext, v8::Isolate* isolate) 162 v8::Handle<v8::Value> toV8NoInline(TestInterfacePython2* impl, v8::Handle<v8::Ob ject> creationContext, v8::Isolate* isolate)
150 { 163 {
151 return toV8(impl, creationContext, isolate); 164 return toV8(impl, creationContext, isolate);
152 } 165 }
153 166
154 } // namespace WebCore 167 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/tests/idls/TestInterfacePython2.idl ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698