Changeset 220440 in webkit
- Timestamp:
- Aug 8, 2017 8:24:31 PM (7 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r220436 r220440 1 2017-08-08 Sam Weinig <sam@webkit.org> 2 3 Address review feedback from https://bugs.webkit.org/show_bug.cgi?id=175246. 4 5 * bindings/js/DOMPromiseProxy.h: 6 * css/FontFaceSet.cpp: 7 * css/FontFaceSet.h: 8 1 9 2017-08-08 Devin Rousso <drousso@apple.com> 2 10 -
trunk/Source/WebCore/bindings/js/DOMPromiseProxy.h
r220433 r220440 47 47 JSC::JSValue promise(JSC::ExecState&, JSDOMGlobalObject&); 48 48 49 void reset();49 void clear(); 50 50 51 51 bool isFulfilled() const; … … 71 71 JSC::JSValue promise(JSC::ExecState&, JSDOMGlobalObject&); 72 72 73 void reset();73 void clear(); 74 74 75 75 bool isFulfilled() const; … … 83 83 }; 84 84 85 // Instead of storing the value of the resolution directly, DOMPromiseProxyWithResolveCallback 86 // allows the owner to specify callback to be called when the resolved value is needed. This is 87 // needed to avoid reference cycles when the resolved value is the owner, such as is the case with 88 // FontFace and FontFaceSet. 85 89 template<typename IDLType> 86 90 class DOMPromiseProxyWithResolveCallback { … … 100 104 JSC::JSValue promise(JSC::ExecState&, JSDOMGlobalObject&); 101 105 102 void reset();106 void clear(); 103 107 104 108 bool isFulfilled() const; … … 144 148 145 149 template<typename IDLType> 146 inline void DOMPromiseProxy<IDLType>:: reset()150 inline void DOMPromiseProxy<IDLType>::clear() 147 151 { 148 152 m_valueOrException = std::nullopt; … … 213 217 } 214 218 215 inline void DOMPromiseProxy<IDLVoid>:: reset()219 inline void DOMPromiseProxy<IDLVoid>::clear() 216 220 { 217 221 m_valueOrException = std::nullopt; … … 281 285 282 286 template<typename IDLType> 283 inline void DOMPromiseProxyWithResolveCallback<IDLType>:: reset()287 inline void DOMPromiseProxyWithResolveCallback<IDLType>::clear() 284 288 { 285 289 m_valueOrException = std::nullopt; -
trunk/Source/WebCore/css/FontFaceSet.cpp
r220433 r220440 190 190 { 191 191 // FIXME: Fire a "loading" event asynchronously. 192 m_isReady = false; 193 m_readyPromise.reset(); 192 m_readyPromise.clear(); 194 193 } 195 194 … … 197 196 { 198 197 m_readyPromise.resolve(*this); 199 m_isReady = true;200 198 } 201 199 -
trunk/Source/WebCore/css/FontFaceSet.h
r220433 r220440 114 114 HashMap<RefPtr<FontFace>, Vector<Ref<PendingPromise>>> m_pendingPromises; 115 115 ReadyPromise m_readyPromise; 116 bool m_isReady { true };117 116 }; 118 117
Note: See TracChangeset
for help on using the changeset viewer.