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

Side by Side Diff: Source/bindings/core/v8/NPV8Object.cpp

Issue 1008353002: bindings: Reduces the binary size by reducing # of callback functions. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Synced. Created 5 years, 9 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
« no previous file with comments | « no previous file | Source/bindings/core/v8/V8Binding.h » ('j') | 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) 2004, 2006 Apple Computer, Inc. All rights reserved. 2 * Copyright (C) 2004, 2006 Apple Computer, Inc. All rights reserved.
3 * Copyright (C) 2007, 2008, 2009 Google, Inc. All rights reserved. 3 * Copyright (C) 2007, 2008, 2009 Google, Inc. All rights reserved.
4 * Copyright (C) 2014 Opera Software ASA. All rights reserved. 4 * Copyright (C) 2014 Opera Software ASA. All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 namespace { 54 namespace {
55 55
56 void trace(Visitor*, ScriptWrappable*) 56 void trace(Visitor*, ScriptWrappable*)
57 { 57 {
58 } 58 }
59 59
60 } // namespace 60 } // namespace
61 61
62 const WrapperTypeInfo* npObjectTypeInfo() 62 const WrapperTypeInfo* npObjectTypeInfo()
63 { 63 {
64 static const WrapperTypeInfo typeInfo = { gin::kEmbedderBlink, 0, 0, 0, trac e, 0, 0, 0, 0, 0, WrapperTypeInfo::WrapperTypeObjectPrototype, WrapperTypeInfo:: ObjectClassId, WrapperTypeInfo::NotInheritFromEventTarget, WrapperTypeInfo::Depe ndent, WrapperTypeInfo::RefCountedObject }; 64 static const WrapperTypeInfo typeInfo = { gin::kEmbedderBlink, 0, 0, 0, trac e, 0, 0, 0, 0, "NPObject", 0, WrapperTypeInfo::WrapperTypeObjectPrototype, Wrapp erTypeInfo::ObjectClassId, WrapperTypeInfo::NotInheritFromEventTarget, WrapperTy peInfo::Dependent, WrapperTypeInfo::RefCountedObject };
65 return &typeInfo; 65 return &typeInfo;
66 } 66 }
67 67
68 // FIXME: Comments on why use malloc and free. 68 // FIXME: Comments on why use malloc and free.
69 static NPObject* allocV8NPObject(NPP, NPClass*) 69 static NPObject* allocV8NPObject(NPP, NPClass*)
70 { 70 {
71 return static_cast<NPObject*>(malloc(sizeof(V8NPObject))); 71 return static_cast<NPObject*>(malloc(sizeof(V8NPObject)));
72 } 72 }
73 73
74 static void freeV8NPObject(NPObject* npObject) 74 static void freeV8NPObject(NPObject* npObject)
(...skipping 540 matching lines...) Expand 10 before | Expand all | Expand 10 after
615 615
616 convertV8ObjectToNPVariant(isolate, resultObject, npObject, result); 616 convertV8ObjectToNPVariant(isolate, resultObject, npObject, result);
617 return true; 617 return true;
618 } 618 }
619 619
620 if (NP_CLASS_STRUCT_VERSION_HAS_CTOR(npObject->_class) && npObject->_class-> construct) 620 if (NP_CLASS_STRUCT_VERSION_HAS_CTOR(npObject->_class) && npObject->_class-> construct)
621 return npObject->_class->construct(npObject, arguments, argumentCount, r esult); 621 return npObject->_class->construct(npObject, arguments, argumentCount, r esult);
622 622
623 return false; 623 return false;
624 } 624 }
OLDNEW
« no previous file with comments | « no previous file | Source/bindings/core/v8/V8Binding.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698