| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2009 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2013 Google Inc. All rights reserved. | 3 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 | 55 |
| 56 void* data() const { return m_data; } | 56 void* data() const { return m_data; } |
| 57 unsigned sizeInBytes() const { return m_sizeInBytes; } | 57 unsigned sizeInBytes() const { return m_sizeInBytes; } |
| 58 | 58 |
| 59 bool hasDeallocationObserver() const { return !!m_deallocationObserver; } | 59 bool hasDeallocationObserver() const { return !!m_deallocationObserver; } |
| 60 void setDeallocationObserver(ArrayBufferDeallocationObserver* observer) { m_
deallocationObserver = observer; } | 60 void setDeallocationObserver(ArrayBufferDeallocationObserver* observer) { m_
deallocationObserver = observer; } |
| 61 | 61 |
| 62 void transfer(ArrayBufferContents& other); | 62 void transfer(ArrayBufferContents& other); |
| 63 void copyTo(ArrayBufferContents& other); | 63 void copyTo(ArrayBufferContents& other); |
| 64 | 64 |
| 65 static bool allocateMemory(size_t, InitializationPolicy, void*& data); | 65 static void allocateMemory(size_t, InitializationPolicy, void*& data); |
| 66 static void freeMemory(void* data); | 66 static void freeMemory(void* data); |
| 67 | 67 |
| 68 private: | 68 private: |
| 69 void* m_data; | 69 void* m_data; |
| 70 unsigned m_sizeInBytes; | 70 unsigned m_sizeInBytes; |
| 71 ArrayBufferDeallocationObserver* m_deallocationObserver; | 71 ArrayBufferDeallocationObserver* m_deallocationObserver; |
| 72 }; | 72 }; |
| 73 | 73 |
| 74 } // namespace WTF | 74 } // namespace WTF |
| 75 | 75 |
| 76 #endif // ArrayBufferContents_h | 76 #endif // ArrayBufferContents_h |
| OLD | NEW |