Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(448)

Side by Side Diff: Source/bindings/core/v8/ScriptPromise.h

Issue 1215813003: Correctly track lifetime of promise rejection events (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/bindings/core/v8/ScopedPersistent.h ('k') | Source/bindings/core/v8/ScriptValue.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « Source/bindings/core/v8/ScopedPersistent.h ('k') | Source/bindings/core/v8/ScriptValue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698