| 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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 m_resolver.v8Value().As<v8::Promise::Resolver>()->Reject(value); | 121 m_resolver.v8Value().As<v8::Promise::Resolver>()->Reject(value); |
| 122 } else if (!m_promise.isEmpty()) { | 122 } else if (!m_promise.isEmpty()) { |
| 123 v8::Local<v8::Object> promise = m_promise.v8Value().As<v8::Object>(); | 123 v8::Local<v8::Object> promise = m_promise.v8Value().As<v8::Object>(); |
| 124 ASSERT(V8PromiseCustom::isPromise(promise, m_isolate)); | 124 ASSERT(V8PromiseCustom::isPromise(promise, m_isolate)); |
| 125 V8PromiseCustom::reject(promise, value, m_isolate); | 125 V8PromiseCustom::reject(promise, value, m_isolate); |
| 126 } | 126 } |
| 127 m_promise.clear(); | 127 m_promise.clear(); |
| 128 m_resolver.clear(); | 128 m_resolver.clear(); |
| 129 } | 129 } |
| 130 | 130 |
| 131 void ScriptPromiseResolver::resolve(ScriptValue value) | |
| 132 { | |
| 133 ASSERT(m_isolate->InContext()); | |
| 134 resolve(value.v8Value()); | |
| 135 } | |
| 136 | |
| 137 void ScriptPromiseResolver::reject(ScriptValue value) | |
| 138 { | |
| 139 ASSERT(m_isolate->InContext()); | |
| 140 reject(value.v8Value()); | |
| 141 } | |
| 142 | |
| 143 } // namespace WebCore | 131 } // namespace WebCore |
| OLD | NEW |