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

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

Issue 331593006: Decrease the binary size by 50 KB by outlining V8XXX::wrap() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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 "V8TestInterfaceEmpty.h" 8 #include "V8TestInterfaceEmpty.h"
9 9
10 #include "RuntimeEnabledFeatures.h" 10 #include "RuntimeEnabledFeatures.h"
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 v8::Handle<v8::Object> V8TestInterfaceEmpty::findInstanceInPrototypeChain(v8::Ha ndle<v8::Value> v8Value, v8::Isolate* isolate) 83 v8::Handle<v8::Object> V8TestInterfaceEmpty::findInstanceInPrototypeChain(v8::Ha ndle<v8::Value> v8Value, v8::Isolate* isolate)
84 { 84 {
85 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe rTypeInfo, v8Value); 85 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe rTypeInfo, v8Value);
86 } 86 }
87 87
88 TestInterfaceEmpty* V8TestInterfaceEmpty::toNativeWithTypeCheck(v8::Isolate* iso late, v8::Handle<v8::Value> value) 88 TestInterfaceEmpty* V8TestInterfaceEmpty::toNativeWithTypeCheck(v8::Isolate* iso late, v8::Handle<v8::Value> value)
89 { 89 {
90 return hasInstance(value, isolate) ? fromInternalPointer(v8::Handle<v8::Obje ct>::Cast(value)->GetAlignedPointerFromInternalField(v8DOMWrapperObjectIndex)) : 0; 90 return hasInstance(value, isolate) ? fromInternalPointer(v8::Handle<v8::Obje ct>::Cast(value)->GetAlignedPointerFromInternalField(v8DOMWrapperObjectIndex)) : 0;
91 } 91 }
92 92
93 v8::Handle<v8::Object> wrap(TestInterfaceEmpty* impl, v8::Handle<v8::Object> cre ationContext, v8::Isolate* isolate)
94 {
95 ASSERT(impl);
96 ASSERT(!DOMDataStore::containsWrapper<V8TestInterfaceEmpty>(impl, isolate));
97 return V8TestInterfaceEmpty::createWrapper(impl, creationContext, isolate);
98 }
99
93 v8::Handle<v8::Object> V8TestInterfaceEmpty::createWrapper(PassRefPtr<TestInterf aceEmpty> impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate) 100 v8::Handle<v8::Object> V8TestInterfaceEmpty::createWrapper(PassRefPtr<TestInterf aceEmpty> impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
94 { 101 {
95 ASSERT(impl); 102 ASSERT(impl);
96 ASSERT(!DOMDataStore::containsWrapper<V8TestInterfaceEmpty>(impl.get(), isol ate)); 103 ASSERT(!DOMDataStore::containsWrapper<V8TestInterfaceEmpty>(impl.get(), isol ate));
97 if (ScriptWrappable::wrapperCanBeStoredInObject(impl.get())) { 104 if (ScriptWrappable::wrapperCanBeStoredInObject(impl.get())) {
98 const WrapperTypeInfo* actualInfo = ScriptWrappable::fromObject(impl.get ())->typeInfo(); 105 const WrapperTypeInfo* actualInfo = ScriptWrappable::fromObject(impl.get ())->typeInfo();
99 // Might be a XXXConstructor::wrapperTypeInfo instead of an XXX::wrapper TypeInfo. These will both have 106 // Might be a XXXConstructor::wrapperTypeInfo instead of an XXX::wrapper TypeInfo. These will both have
100 // the same object de-ref functions, though, so use that as the basis of the check. 107 // the same object de-ref functions, though, so use that as the basis of the check.
101 RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(actualInfo->derefObjectFunction == wrapperTypeInfo.derefObjectFunction); 108 RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(actualInfo->derefObjectFunction == wrapperTypeInfo.derefObjectFunction);
102 } 109 }
(...skipping 12 matching lines...) Expand all
115 fromInternalPointer(object)->deref(); 122 fromInternalPointer(object)->deref();
116 } 123 }
117 124
118 template<> 125 template<>
119 v8::Handle<v8::Value> toV8NoInline(TestInterfaceEmpty* impl, v8::Handle<v8::Obje ct> creationContext, v8::Isolate* isolate) 126 v8::Handle<v8::Value> toV8NoInline(TestInterfaceEmpty* impl, v8::Handle<v8::Obje ct> creationContext, v8::Isolate* isolate)
120 { 127 {
121 return toV8(impl, creationContext, isolate); 128 return toV8(impl, creationContext, isolate);
122 } 129 }
123 130
124 } // namespace WebCore 131 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/tests/results/V8TestInterfaceEmpty.h ('k') | Source/bindings/tests/results/V8TestInterfaceEventConstructor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698