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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 #include "platform/UserGestureIndicator.h" | 43 #include "platform/UserGestureIndicator.h" |
44 #include "wtf/OwnPtr.h" | 44 #include "wtf/OwnPtr.h" |
45 #include "wtf/StringExtras.h" | 45 #include "wtf/StringExtras.h" |
46 #include "wtf/text/WTFString.h" | 46 #include "wtf/text/WTFString.h" |
47 #include <stdio.h> | 47 #include <stdio.h> |
48 | 48 |
49 using namespace blink; | 49 using namespace blink; |
50 | 50 |
51 namespace { | 51 namespace { |
52 | 52 |
53 WrapperPersistentNode* createPersistentHandle(ScriptWrappableBase* internalPoint
er) | 53 void trace(Visitor*, ScriptWrappableBase*) |
54 { | 54 { |
55 ASSERT_NOT_REACHED(); | |
56 return 0; | |
57 } | 55 } |
58 | 56 |
59 } // namespace | 57 } // namespace |
60 | 58 |
61 namespace blink { | 59 namespace blink { |
62 | 60 |
63 const WrapperTypeInfo* npObjectTypeInfo() | 61 const WrapperTypeInfo* npObjectTypeInfo() |
64 { | 62 { |
65 static const WrapperTypeInfo typeInfo = { gin::kEmbedderBlink, 0, 0, 0, crea
tePersistentHandle, 0, 0, 0, 0, 0, 0, WrapperTypeInfo::WrapperTypeObjectPrototyp
e, WrapperTypeInfo::ObjectClassId, WrapperTypeInfo::Dependent, WrapperTypeInfo::
RefCountedObject }; | 63 static const WrapperTypeInfo typeInfo = { gin::kEmbedderBlink, 0, 0, 0, trac
e, 0, 0, 0, 0, 0, 0, WrapperTypeInfo::WrapperTypeObjectPrototype, WrapperTypeInf
o::ObjectClassId, WrapperTypeInfo::Dependent, WrapperTypeInfo::RefCountedObject
}; |
66 return &typeInfo; | 64 return &typeInfo; |
67 } | 65 } |
68 | 66 |
69 // FIXME: Comments on why use malloc and free. | 67 // FIXME: Comments on why use malloc and free. |
70 static NPObject* allocV8NPObject(NPP, NPClass*) | 68 static NPObject* allocV8NPObject(NPP, NPClass*) |
71 { | 69 { |
72 return static_cast<NPObject*>(malloc(sizeof(V8NPObject))); | 70 return static_cast<NPObject*>(malloc(sizeof(V8NPObject))); |
73 } | 71 } |
74 | 72 |
75 static void freeV8NPObject(NPObject* npObject) | 73 static void freeV8NPObject(NPObject* npObject) |
(...skipping 540 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
616 | 614 |
617 convertV8ObjectToNPVariant(resultObject, npObject, result, isolate); | 615 convertV8ObjectToNPVariant(resultObject, npObject, result, isolate); |
618 return true; | 616 return true; |
619 } | 617 } |
620 | 618 |
621 if (NP_CLASS_STRUCT_VERSION_HAS_CTOR(npObject->_class) && npObject->_class->
construct) | 619 if (NP_CLASS_STRUCT_VERSION_HAS_CTOR(npObject->_class) && npObject->_class->
construct) |
622 return npObject->_class->construct(npObject, arguments, argumentCount, r
esult); | 620 return npObject->_class->construct(npObject, arguments, argumentCount, r
esult); |
623 | 621 |
624 return false; | 622 return false; |
625 } | 623 } |
OLD | NEW |