| 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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 bool isEmpty() const | 91 bool isEmpty() const |
| 92 { | 92 { |
| 93 return m_promise.isEmpty(); | 93 return m_promise.isEmpty(); |
| 94 } | 94 } |
| 95 | 95 |
| 96 void clear() | 96 void clear() |
| 97 { | 97 { |
| 98 m_promise.clear(); | 98 m_promise.clear(); |
| 99 } | 99 } |
| 100 | 100 |
| 101 void setReference(const v8::Persistent<v8::Object>& parent, v8::Isolate* iso
late) |
| 102 { |
| 103 m_promise.setReference(parent, isolate); |
| 104 } |
| 105 |
| 101 bool operator==(const ScriptPromise& value) const | 106 bool operator==(const ScriptPromise& value) const |
| 102 { | 107 { |
| 103 return m_promise == value.m_promise; | 108 return m_promise == value.m_promise; |
| 104 } | 109 } |
| 105 | 110 |
| 106 bool operator!=(const ScriptPromise& value) const | 111 bool operator!=(const ScriptPromise& value) const |
| 107 { | 112 { |
| 108 return !operator==(value); | 113 return !operator==(value); |
| 109 } | 114 } |
| 110 | 115 |
| (...skipping 28 matching lines...) Expand all Loading... |
| 139 | 144 |
| 140 private: | 145 private: |
| 141 RefPtr<ScriptState> m_scriptState; | 146 RefPtr<ScriptState> m_scriptState; |
| 142 ScriptValue m_promise; | 147 ScriptValue m_promise; |
| 143 }; | 148 }; |
| 144 | 149 |
| 145 } // namespace blink | 150 } // namespace blink |
| 146 | 151 |
| 147 | 152 |
| 148 #endif // ScriptPromise_h | 153 #endif // ScriptPromise_h |
| OLD | NEW |