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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 namespace { | 53 namespace { |
54 | 54 |
55 void trace(Visitor*, ScriptWrappable*) | 55 void trace(Visitor*, ScriptWrappable*) |
56 { | 56 { |
57 } | 57 } |
58 | 58 |
59 } // namespace | 59 } // namespace |
60 | 60 |
61 const WrapperTypeInfo* npObjectTypeInfo() | 61 const WrapperTypeInfo* npObjectTypeInfo() |
62 { | 62 { |
63 static const WrapperTypeInfo typeInfo = { gin::kEmbedderBlink, 0, 0, 0, trac
e, 0, 0, 0, "NPObject", 0, WrapperTypeInfo::WrapperTypeObjectPrototype, WrapperT
ypeInfo::ObjectClassId, WrapperTypeInfo::NotInheritFromEventTarget, WrapperTypeI
nfo::Dependent, WrapperTypeInfo::RefCountedObject }; | 63 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 }; |
64 return &typeInfo; | 64 return &typeInfo; |
65 } | 65 } |
66 | 66 |
67 // FIXME: Comments on why use malloc and free. | 67 // FIXME: Comments on why use malloc and free. |
68 static NPObject* allocV8NPObject(NPP, NPClass*) | 68 static NPObject* allocV8NPObject(NPP, NPClass*) |
69 { | 69 { |
70 return static_cast<NPObject*>(malloc(sizeof(V8NPObject))); | 70 return static_cast<NPObject*>(malloc(sizeof(V8NPObject))); |
71 } | 71 } |
72 | 72 |
73 static void freeV8NPObject(NPObject* npObject) | 73 static void freeV8NPObject(NPObject* npObject) |
(...skipping 535 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
609 | 609 |
610 convertV8ObjectToNPVariant(scriptState->isolate(), resultObject, npObjec
t, result); | 610 convertV8ObjectToNPVariant(scriptState->isolate(), resultObject, npObjec
t, result); |
611 return true; | 611 return true; |
612 } | 612 } |
613 | 613 |
614 if (NP_CLASS_STRUCT_VERSION_HAS_CTOR(npObject->_class) && npObject->_class->
construct) | 614 if (NP_CLASS_STRUCT_VERSION_HAS_CTOR(npObject->_class) && npObject->_class->
construct) |
615 return npObject->_class->construct(npObject, arguments, argumentCount, r
esult); | 615 return npObject->_class->construct(npObject, arguments, argumentCount, r
esult); |
616 | 616 |
617 return false; | 617 return false; |
618 } | 618 } |
OLD | NEW |