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

Side by Side Diff: Source/bindings/tests/results/V8TestObject.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 "V8TestObject.h" 8 #include "V8TestObject.h"
9 9
10 #include "bindings/core/v8/BindingSecurity.h" 10 #include "bindings/core/v8/BindingSecurity.h"
(...skipping 10596 matching lines...) Expand 10 before | Expand all | Expand 10 after
10607 return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, v8Valu e); 10607 return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, v8Valu e);
10608 } 10608 }
10609 10609
10610 v8::Handle<v8::Object> V8TestObject::findInstanceInPrototypeChain(v8::Handle<v8: :Value> v8Value, v8::Isolate* isolate) 10610 v8::Handle<v8::Object> V8TestObject::findInstanceInPrototypeChain(v8::Handle<v8: :Value> v8Value, v8::Isolate* isolate)
10611 { 10611 {
10612 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe rTypeInfo, v8Value); 10612 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe rTypeInfo, v8Value);
10613 } 10613 }
10614 10614
10615 TestObject* V8TestObject::toNativeWithTypeCheck(v8::Isolate* isolate, v8::Handle <v8::Value> value) 10615 TestObject* V8TestObject::toNativeWithTypeCheck(v8::Isolate* isolate, v8::Handle <v8::Value> value)
10616 { 10616 {
10617 return hasInstance(value, isolate) ? fromInternalPointer(v8::Handle<v8::Obje ct>::Cast(value)->GetAlignedPointerFromInternalField(v8DOMWrapperObjectIndex)) : 0; 10617 return hasInstance(value, isolate) ? fromInternalPointer(blink::toInternalPo inter(v8::Handle<v8::Object>::Cast(value))) : 0;
10618 } 10618 }
10619 10619
10620 void V8TestObject::installPerContextEnabledProperties(v8::Handle<v8::Object> ins tanceObject, TestObject* impl, v8::Isolate* isolate) 10620 void V8TestObject::installPerContextEnabledProperties(v8::Handle<v8::Object> ins tanceObject, TestObject* impl, v8::Isolate* isolate)
10621 { 10621 {
10622 v8::Local<v8::Object> prototypeObject = v8::Local<v8::Object>::Cast(instance Object->GetPrototype()); 10622 v8::Local<v8::Object> prototypeObject = v8::Local<v8::Object>::Cast(instance Object->GetPrototype());
10623 if (ContextFeatures::featureNameEnabled(impl->document())) { 10623 if (ContextFeatures::featureNameEnabled(impl->document())) {
10624 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu ration =\ 10624 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu ration =\
10625 {"perContextEnabledLongAttribute", TestObjectV8Internal::perContextEnabl edLongAttributeAttributeGetterCallback, TestObjectV8Internal::perContextEnabledL ongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8: :DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::Exp osedToAllScripts, V8DOMConfiguration::OnInstance}; 10625 {"perContextEnabledLongAttribute", TestObjectV8Internal::perContextEnabl edLongAttributeAttributeGetterCallback, TestObjectV8Internal::perContextEnabledL ongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8: :DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::Exp osedToAllScripts, V8DOMConfiguration::OnInstance};
10626 V8DOMConfiguration::installAttribute(instanceObject, prototypeObject, at tributeConfiguration, isolate); 10626 V8DOMConfiguration::installAttribute(instanceObject, prototypeObject, at tributeConfiguration, isolate);
10627 } 10627 }
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
10664 10664
10665 v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationContext , &wrapperTypeInfo, toInternalPointer(impl.get()), isolate); 10665 v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationContext , &wrapperTypeInfo, toInternalPointer(impl.get()), isolate);
10666 if (UNLIKELY(wrapper.IsEmpty())) 10666 if (UNLIKELY(wrapper.IsEmpty()))
10667 return wrapper; 10667 return wrapper;
10668 10668
10669 installPerContextEnabledProperties(wrapper, impl.get(), isolate); 10669 installPerContextEnabledProperties(wrapper, impl.get(), isolate);
10670 V8DOMWrapper::associateObjectWithWrapper<V8TestObject>(impl, &wrapperTypeInf o, wrapper, isolate, WrapperConfiguration::Independent); 10670 V8DOMWrapper::associateObjectWithWrapper<V8TestObject>(impl, &wrapperTypeInf o, wrapper, isolate, WrapperConfiguration::Independent);
10671 return wrapper; 10671 return wrapper;
10672 } 10672 }
10673 10673
10674 void V8TestObject::derefObject(void* object) 10674 void V8TestObject::derefObject(ScriptWrappableBase* internalPointer)
10675 { 10675 {
10676 fromInternalPointer(object)->deref(); 10676 fromInternalPointer(internalPointer)->deref();
10677 } 10677 }
10678 10678
10679 template<> 10679 template<>
10680 v8::Handle<v8::Value> toV8NoInline(TestObject* impl, v8::Handle<v8::Object> crea tionContext, v8::Isolate* isolate) 10680 v8::Handle<v8::Value> toV8NoInline(TestObject* impl, v8::Handle<v8::Object> crea tionContext, v8::Isolate* isolate)
10681 { 10681 {
10682 return toV8(impl, creationContext, isolate); 10682 return toV8(impl, creationContext, isolate);
10683 } 10683 }
10684 10684
10685 bool V8TestObject::PrivateScript::voidMethodImplementedInPrivateScriptMethod(Loc alFrame* frame, TestObject* holderImpl) 10685 bool V8TestObject::PrivateScript::voidMethodImplementedInPrivateScriptMethod(Loc alFrame* frame, TestObject* holderImpl)
10686 { 10686 {
(...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after
11203 if (!PrivateScriptRunner::throwDOMExceptionInPrivateScriptIfNeeded(scrip tState->isolate(), exceptionState, block.Exception())) { 11203 if (!PrivateScriptRunner::throwDOMExceptionInPrivateScriptIfNeeded(scrip tState->isolate(), exceptionState, block.Exception())) {
11204 // FIXME: We should support exceptions other than DOM exceptions. 11204 // FIXME: We should support exceptions other than DOM exceptions.
11205 RELEASE_ASSERT_NOT_REACHED(); 11205 RELEASE_ASSERT_NOT_REACHED();
11206 } 11206 }
11207 return false; 11207 return false;
11208 } 11208 }
11209 return true; 11209 return true;
11210 } 11210 }
11211 11211
11212 } // namespace blink 11212 } // namespace blink
OLDNEW
« no previous file with comments | « Source/bindings/tests/results/V8TestObject.h ('k') | Source/bindings/tests/results/V8TestSpecialOperations.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698