| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google 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 are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 : m_blobDataHandle(dataHandle) | 79 : m_blobDataHandle(dataHandle) |
| 80 , m_hasBeenClosed(false) | 80 , m_hasBeenClosed(false) |
| 81 { | 81 { |
| 82 } | 82 } |
| 83 | 83 |
| 84 Blob::~Blob() | 84 Blob::~Blob() |
| 85 { | 85 { |
| 86 } | 86 } |
| 87 | 87 |
| 88 // static | 88 // static |
| 89 Blob* Blob::create(const Vector<ArrayBufferOrArrayBufferViewOrBlobOrString>& blo
bParts, const BlobPropertyBag& options, ExceptionState& exceptionState) | 89 Blob* Blob::create(const HeapVector<ArrayBufferOrArrayBufferViewOrBlobOrString>&
blobParts, const BlobPropertyBag& options, ExceptionState& exceptionState) |
| 90 { | 90 { |
| 91 ASSERT(options.hasType()); | 91 ASSERT(options.hasType()); |
| 92 if (!options.type().containsOnlyASCII()) { | 92 if (!options.type().containsOnlyASCII()) { |
| 93 exceptionState.throwDOMException(SyntaxError, "The 'type' property must
consist of ASCII characters."); | 93 exceptionState.throwDOMException(SyntaxError, "The 'type' property must
consist of ASCII characters."); |
| 94 return nullptr; | 94 return nullptr; |
| 95 } | 95 } |
| 96 | 96 |
| 97 ASSERT(options.hasEndings()); | 97 ASSERT(options.hasEndings()); |
| 98 bool normalizeLineEndingsToNative = options.endings() == "native"; | 98 bool normalizeLineEndingsToNative = options.endings() == "native"; |
| 99 | 99 |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 { | 173 { |
| 174 blobData.appendBlob(m_blobDataHandle, 0, m_blobDataHandle->size()); | 174 blobData.appendBlob(m_blobDataHandle, 0, m_blobDataHandle->size()); |
| 175 } | 175 } |
| 176 | 176 |
| 177 URLRegistry& Blob::registry() const | 177 URLRegistry& Blob::registry() const |
| 178 { | 178 { |
| 179 return BlobURLRegistry::registry(); | 179 return BlobURLRegistry::registry(); |
| 180 } | 180 } |
| 181 | 181 |
| 182 } // namespace blink | 182 } // namespace blink |
| OLD | NEW |