| 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 | 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 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 308 // Reject the promise and run the error callback | 308 // Reject the promise and run the error callback |
| 309 DOMException* error = | 309 DOMException* error = |
| 310 DOMException::create(EncodingError, "Unable to decode audio data"); | 310 DOMException::create(EncodingError, "Unable to decode audio data"); |
| 311 resolver->reject(error); | 311 resolver->reject(error); |
| 312 if (errorCallback) | 312 if (errorCallback) |
| 313 errorCallback->handleEvent(error); | 313 errorCallback->handleEvent(error); |
| 314 } | 314 } |
| 315 | 315 |
| 316 // We've resolved the promise. Remove it now. | 316 // We've resolved the promise. Remove it now. |
| 317 DCHECK(m_decodeAudioResolvers.contains(resolver)); | 317 DCHECK(m_decodeAudioResolvers.contains(resolver)); |
| 318 m_decodeAudioResolvers.remove(resolver); | 318 m_decodeAudioResolvers.erase(resolver); |
| 319 } | 319 } |
| 320 | 320 |
| 321 AudioBufferSourceNode* BaseAudioContext::createBufferSource( | 321 AudioBufferSourceNode* BaseAudioContext::createBufferSource( |
| 322 ExceptionState& exceptionState) { | 322 ExceptionState& exceptionState) { |
| 323 DCHECK(isMainThread()); | 323 DCHECK(isMainThread()); |
| 324 | 324 |
| 325 AudioBufferSourceNode* node = | 325 AudioBufferSourceNode* node = |
| 326 AudioBufferSourceNode::create(*this, exceptionState); | 326 AudioBufferSourceNode::create(*this, exceptionState); |
| 327 | 327 |
| 328 // Do not add a reference to this source node now. The reference will be added | 328 // Do not add a reference to this source node now. The reference will be added |
| (...skipping 570 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 899 } | 899 } |
| 900 | 900 |
| 901 SecurityOrigin* BaseAudioContext::getSecurityOrigin() const { | 901 SecurityOrigin* BaseAudioContext::getSecurityOrigin() const { |
| 902 if (getExecutionContext()) | 902 if (getExecutionContext()) |
| 903 return getExecutionContext()->getSecurityOrigin(); | 903 return getExecutionContext()->getSecurityOrigin(); |
| 904 | 904 |
| 905 return nullptr; | 905 return nullptr; |
| 906 } | 906 } |
| 907 | 907 |
| 908 } // namespace blink | 908 } // namespace blink |
| OLD | NEW |