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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 template<typename T> | 113 template<typename T> |
114 void reject(PassRefPtr<T> value, ExecutionContext* context) { reject(value.g
et(), context); } | 114 void reject(PassRefPtr<T> value, ExecutionContext* context) { reject(value.g
et(), context); } |
115 template<typename T> | 115 template<typename T> |
116 void reject(RawPtr<T> value, ExecutionContext* context) { reject(value.get()
, context); } | 116 void reject(RawPtr<T> value, ExecutionContext* context) { reject(value.get()
, context); } |
117 | 117 |
118 template<typename T> | 118 template<typename T> |
119 inline void resolve(T* value); | 119 inline void resolve(T* value); |
120 template<typename T> | 120 template<typename T> |
121 inline void reject(T* value); | 121 inline void reject(T* value); |
122 | 122 |
| 123 template<typename T, size_t inlineCapacity> |
| 124 void resolve(const Vector<T, inlineCapacity>& iterator) { resolve(v8ArrayNoI
nline(iterator, m_isolate)); } |
| 125 template<typename T, size_t inlineCapacity> |
| 126 void reject(const Vector<T, inlineCapacity>& iterator) { reject(v8ArrayNoInl
ine(iterator, m_isolate)); } |
| 127 |
123 template<typename T> | 128 template<typename T> |
124 void resolve(PassRefPtr<T> value) { resolve(value.get()); } | 129 void resolve(PassRefPtr<T> value) { resolve(value.get()); } |
125 template<typename T> | 130 template<typename T> |
126 void resolve(RawPtr<T> value) { resolve(value.get()); } | 131 void resolve(RawPtr<T> value) { resolve(value.get()); } |
127 template<typename T> | 132 template<typename T> |
128 void reject(PassRefPtr<T> value) { reject(value.get()); } | 133 void reject(PassRefPtr<T> value) { reject(value.get()); } |
129 template<typename T> | 134 template<typename T> |
130 void reject(RawPtr<T> value) { reject(value.get()); } | 135 void reject(RawPtr<T> value) { reject(value.get()); } |
131 | 136 |
132 void resolve(ScriptValue); | 137 void resolve(ScriptValue); |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 void ScriptPromiseResolver::reject(T* value) | 178 void ScriptPromiseResolver::reject(T* value) |
174 { | 179 { |
175 ASSERT(m_isolate->InContext()); | 180 ASSERT(m_isolate->InContext()); |
176 reject(value, v8::Object::New(m_isolate)); | 181 reject(value, v8::Object::New(m_isolate)); |
177 } | 182 } |
178 | 183 |
179 } // namespace WebCore | 184 } // namespace WebCore |
180 | 185 |
181 | 186 |
182 #endif // ScriptPromiseResolver_h | 187 #endif // ScriptPromiseResolver_h |
OLD | NEW |