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

Side by Side Diff: Source/bindings/tests/results/V8TestSpecialOperations.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 "V8TestSpecialOperations.h" 8 #include "V8TestSpecialOperations.h"
9 9
10 #include "RuntimeEnabledFeatures.h" 10 #include "RuntimeEnabledFeatures.h"
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 v8::Handle<v8::Object> V8TestSpecialOperations::findInstanceInPrototypeChain(v8: :Handle<v8::Value> v8Value, v8::Isolate* isolate) 214 v8::Handle<v8::Object> V8TestSpecialOperations::findInstanceInPrototypeChain(v8: :Handle<v8::Value> v8Value, v8::Isolate* isolate)
215 { 215 {
216 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe rTypeInfo, v8Value); 216 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe rTypeInfo, v8Value);
217 } 217 }
218 218
219 TestSpecialOperations* V8TestSpecialOperations::toNativeWithTypeCheck(v8::Isolat e* isolate, v8::Handle<v8::Value> value) 219 TestSpecialOperations* V8TestSpecialOperations::toNativeWithTypeCheck(v8::Isolat e* isolate, v8::Handle<v8::Value> value)
220 { 220 {
221 return hasInstance(value, isolate) ? fromInternalPointer(v8::Handle<v8::Obje ct>::Cast(value)->GetAlignedPointerFromInternalField(v8DOMWrapperObjectIndex)) : 0; 221 return hasInstance(value, isolate) ? fromInternalPointer(v8::Handle<v8::Obje ct>::Cast(value)->GetAlignedPointerFromInternalField(v8DOMWrapperObjectIndex)) : 0;
222 } 222 }
223 223
224 v8::Handle<v8::Object> wrap(TestSpecialOperations* impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
225 {
226 ASSERT(impl);
227 ASSERT(!DOMDataStore::containsWrapper<V8TestSpecialOperations>(impl, isolate ));
228 return V8TestSpecialOperations::createWrapper(impl, creationContext, isolate );
229 }
230
224 v8::Handle<v8::Object> V8TestSpecialOperations::createWrapper(PassRefPtr<TestSpe cialOperations> impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isola te) 231 v8::Handle<v8::Object> V8TestSpecialOperations::createWrapper(PassRefPtr<TestSpe cialOperations> impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isola te)
225 { 232 {
226 ASSERT(impl); 233 ASSERT(impl);
227 ASSERT(!DOMDataStore::containsWrapper<V8TestSpecialOperations>(impl.get(), i solate)); 234 ASSERT(!DOMDataStore::containsWrapper<V8TestSpecialOperations>(impl.get(), i solate));
228 if (ScriptWrappable::wrapperCanBeStoredInObject(impl.get())) { 235 if (ScriptWrappable::wrapperCanBeStoredInObject(impl.get())) {
229 const WrapperTypeInfo* actualInfo = ScriptWrappable::fromObject(impl.get ())->typeInfo(); 236 const WrapperTypeInfo* actualInfo = ScriptWrappable::fromObject(impl.get ())->typeInfo();
230 // Might be a XXXConstructor::wrapperTypeInfo instead of an XXX::wrapper TypeInfo. These will both have 237 // Might be a XXXConstructor::wrapperTypeInfo instead of an XXX::wrapper TypeInfo. These will both have
231 // the same object de-ref functions, though, so use that as the basis of the check. 238 // the same object de-ref functions, though, so use that as the basis of the check.
232 RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(actualInfo->derefObjectFunction == wrapperTypeInfo.derefObjectFunction); 239 RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(actualInfo->derefObjectFunction == wrapperTypeInfo.derefObjectFunction);
233 } 240 }
(...skipping 12 matching lines...) Expand all
246 fromInternalPointer(object)->deref(); 253 fromInternalPointer(object)->deref();
247 } 254 }
248 255
249 template<> 256 template<>
250 v8::Handle<v8::Value> toV8NoInline(TestSpecialOperations* impl, v8::Handle<v8::O bject> creationContext, v8::Isolate* isolate) 257 v8::Handle<v8::Value> toV8NoInline(TestSpecialOperations* impl, v8::Handle<v8::O bject> creationContext, v8::Isolate* isolate)
251 { 258 {
252 return toV8(impl, creationContext, isolate); 259 return toV8(impl, creationContext, isolate);
253 } 260 }
254 261
255 } // namespace WebCore 262 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698