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

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

Issue 456683002: bindings: Introduces type-check for the internal pointers. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Synced. Created 6 years, 4 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 // 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 #include "V8TestInterfaceDocument.h" 8 #include "V8TestInterfaceDocument.h"
9 9
10 #include "bindings/core/v8/ExceptionState.h" 10 #include "bindings/core/v8/ExceptionState.h"
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, v8Valu e); 74 return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, v8Valu e);
75 } 75 }
76 76
77 v8::Handle<v8::Object> V8TestInterfaceDocument::findInstanceInPrototypeChain(v8: :Handle<v8::Value> v8Value, v8::Isolate* isolate) 77 v8::Handle<v8::Object> V8TestInterfaceDocument::findInstanceInPrototypeChain(v8: :Handle<v8::Value> v8Value, v8::Isolate* isolate)
78 { 78 {
79 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe rTypeInfo, v8Value); 79 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe rTypeInfo, v8Value);
80 } 80 }
81 81
82 TestInterfaceDocument* V8TestInterfaceDocument::toNativeWithTypeCheck(v8::Isolat e* isolate, v8::Handle<v8::Value> value) 82 TestInterfaceDocument* V8TestInterfaceDocument::toNativeWithTypeCheck(v8::Isolat e* isolate, v8::Handle<v8::Value> value)
83 { 83 {
84 return hasInstance(value, isolate) ? fromInternalPointer(v8::Handle<v8::Obje ct>::Cast(value)->GetAlignedPointerFromInternalField(v8DOMWrapperObjectIndex)) : 0; 84 return hasInstance(value, isolate) ? fromInternalPointer(blink::toInternalPo inter(v8::Handle<v8::Object>::Cast(value))) : 0;
85 } 85 }
86 86
87 EventTarget* V8TestInterfaceDocument::toEventTarget(v8::Handle<v8::Object> objec t) 87 EventTarget* V8TestInterfaceDocument::toEventTarget(v8::Handle<v8::Object> objec t)
88 { 88 {
89 return toNative(object); 89 return toNative(object);
90 } 90 }
91 91
92 v8::Handle<v8::Object> wrap(TestInterfaceDocument* impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate) 92 v8::Handle<v8::Object> wrap(TestInterfaceDocument* impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
93 { 93 {
94 ASSERT(impl); 94 ASSERT(impl);
(...skipping 29 matching lines...) Expand all
124 } 124 }
125 v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationContext , &wrapperTypeInfo, toInternalPointer(impl.get()), isolate); 125 v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationContext , &wrapperTypeInfo, toInternalPointer(impl.get()), isolate);
126 if (UNLIKELY(wrapper.IsEmpty())) 126 if (UNLIKELY(wrapper.IsEmpty()))
127 return wrapper; 127 return wrapper;
128 128
129 installPerContextEnabledProperties(wrapper, impl.get(), isolate); 129 installPerContextEnabledProperties(wrapper, impl.get(), isolate);
130 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceDocument>(impl, &wra pperTypeInfo, wrapper, isolate, WrapperConfiguration::Dependent); 130 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceDocument>(impl, &wra pperTypeInfo, wrapper, isolate, WrapperConfiguration::Dependent);
131 return wrapper; 131 return wrapper;
132 } 132 }
133 133
134 void V8TestInterfaceDocument::derefObject(void* object) 134 void V8TestInterfaceDocument::derefObject(ScriptWrappableBase* internalPointer)
135 { 135 {
136 #if !ENABLE(OILPAN) 136 #if !ENABLE(OILPAN)
137 fromInternalPointer(object)->deref(); 137 fromInternalPointer(internalPointer)->deref();
138 #endif // !ENABLE(OILPAN) 138 #endif // !ENABLE(OILPAN)
139 } 139 }
140 140
141 template<> 141 template<>
142 v8::Handle<v8::Value> toV8NoInline(TestInterfaceDocument* impl, v8::Handle<v8::O bject> creationContext, v8::Isolate* isolate) 142 v8::Handle<v8::Value> toV8NoInline(TestInterfaceDocument* impl, v8::Handle<v8::O bject> creationContext, v8::Isolate* isolate)
143 { 143 {
144 return toV8(impl, creationContext, isolate); 144 return toV8(impl, creationContext, isolate);
145 } 145 }
146 146
147 } // namespace blink 147 } // namespace blink
OLDNEW
« no previous file with comments | « Source/bindings/tests/results/V8TestInterfaceDocument.h ('k') | Source/bindings/tests/results/V8TestInterfaceEmpty.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698