| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |