OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2009 Apple Inc. All Rights Reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, J
SC::JSValuePtr, JSC::PutPropertySlot&); | 81 virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, J
SC::JSValuePtr, JSC::PutPropertySlot&); |
82 virtual void put(JSC::ExecState*, unsigned propertyName, JSC::JSValuePtr
); | 82 virtual void put(JSC::ExecState*, unsigned propertyName, JSC::JSValuePtr
); |
83 | 83 |
84 virtual void getPropertyNames(JSC::ExecState*, JSC::PropertyNameArray&); | 84 virtual void getPropertyNames(JSC::ExecState*, JSC::PropertyNameArray&); |
85 | 85 |
86 virtual const ClassInfo* classInfo() const { return m_classInfo; } | 86 virtual const ClassInfo* classInfo() const { return m_classInfo; } |
87 static const ClassInfo s_defaultInfo; | 87 static const ClassInfo s_defaultInfo; |
88 | 88 |
89 size_t length() const { return m_storage->length(); } | 89 size_t length() const { return m_storage->length(); } |
90 | 90 |
| 91 WTF::ByteArray* storage() const { return m_storage.get(); } |
| 92 |
91 private: | 93 private: |
92 enum VPtrStealingHackType { VPtrStealingHack }; | 94 enum VPtrStealingHackType { VPtrStealingHack }; |
93 JSByteArray(VPtrStealingHackType) | 95 JSByteArray(VPtrStealingHackType) |
94 : JSObject(createStructure(jsNull())) | 96 : JSObject(createStructure(jsNull())) |
95 , m_classInfo(0) | 97 , m_classInfo(0) |
96 { | 98 { |
97 } | 99 } |
98 | 100 |
99 RefPtr<WTF::ByteArray> m_storage; | 101 RefPtr<WTF::ByteArray> m_storage; |
100 const ClassInfo* m_classInfo; | 102 const ClassInfo* m_classInfo; |
101 }; | 103 }; |
102 | 104 |
103 JSByteArray* asByteArray(JSValuePtr value); | 105 JSByteArray* asByteArray(JSValuePtr value); |
104 inline JSByteArray* asByteArray(JSValuePtr value) | 106 inline JSByteArray* asByteArray(JSValuePtr value) |
105 { | 107 { |
106 return static_cast<JSByteArray*>(asCell(value)); | 108 return static_cast<JSByteArray*>(asCell(value)); |
107 } | 109 } |
108 } | 110 } |
109 | 111 |
110 #endif | 112 #endif |
OLD | NEW |