| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2008 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 * | 7 * |
| 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 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 } | 175 } |
| 176 | 176 |
| 177 ImageData::ImageData(const IntSize& size, DOMUint8ClampedArray* byteArray) | 177 ImageData::ImageData(const IntSize& size, DOMUint8ClampedArray* byteArray) |
| 178 : m_size(size) | 178 : m_size(size) |
| 179 , m_data(byteArray) | 179 , m_data(byteArray) |
| 180 { | 180 { |
| 181 ASSERT(size.width() >= 0 && size.height() >= 0); | 181 ASSERT(size.width() >= 0 && size.height() >= 0); |
| 182 ASSERT_WITH_SECURITY_IMPLICATION(static_cast<unsigned>(size.width() * size.h
eight() * 4) <= m_data->length()); | 182 ASSERT_WITH_SECURITY_IMPLICATION(static_cast<unsigned>(size.width() * size.h
eight() * 4) <= m_data->length()); |
| 183 } | 183 } |
| 184 | 184 |
| 185 void ImageData::dispose() | |
| 186 { | |
| 187 m_data.clear(); | |
| 188 } | |
| 189 | |
| 190 } // namespace blink | 185 } // namespace blink |
| OLD | NEW |