| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 m_state = Invoked; | 78 m_state = Invoked; |
| 79 ASSERT(m_access); | 79 ASSERT(m_access); |
| 80 m_successCallback->handleEvent(m_access.get(), m_options->sysex); | 80 m_successCallback->handleEvent(m_access.get(), m_options->sysex); |
| 81 clear(); | 81 clear(); |
| 82 } else { | 82 } else { |
| 83 m_state = Accepted; | 83 m_state = Accepted; |
| 84 } | 84 } |
| 85 } | 85 } |
| 86 } | 86 } |
| 87 | 87 |
| 88 void MIDIAccessPromise::reject(PassRefPtr<DOMError> error) | 88 void MIDIAccessPromise::reject(PassRefPtrWillBeRawPtr<DOMError> error) |
| 89 { | 89 { |
| 90 if (m_state == Pending) { | 90 if (m_state == Pending) { |
| 91 if (m_errorCallback) { | 91 if (m_errorCallback) { |
| 92 m_state = Invoked; | 92 m_state = Invoked; |
| 93 m_errorCallback->handleEvent(error.get()); | 93 m_errorCallback->handleEvent(error.get()); |
| 94 clear(); | 94 clear(); |
| 95 } else { | 95 } else { |
| 96 m_state = Rejected; | 96 m_state = Rejected; |
| 97 m_error = error; | 97 m_error = error; |
| 98 } | 98 } |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 ASSERT(m_state == Invoked); | 132 ASSERT(m_state == Invoked); |
| 133 m_access.clear(); | 133 m_access.clear(); |
| 134 m_error.clear(); | 134 m_error.clear(); |
| 135 m_options.clear(); | 135 m_options.clear(); |
| 136 m_successCallback.clear(); | 136 m_successCallback.clear(); |
| 137 m_errorCallback.clear(); | 137 m_errorCallback.clear(); |
| 138 } | 138 } |
| 139 | 139 |
| 140 void MIDIAccessPromise::trace(Visitor* visitor) | 140 void MIDIAccessPromise::trace(Visitor* visitor) |
| 141 { | 141 { |
| 142 visitor->trace(m_error); |
| 142 visitor->trace(m_access); | 143 visitor->trace(m_access); |
| 143 } | 144 } |
| 144 | 145 |
| 145 } // namespace WebCore | 146 } // namespace WebCore |
| OLD | NEW |