DescriptionAdd a helper for implementing Promise-valued properties.
ScriptPromiseProperty is intended for implementing DOM attributes
whose value is a Promise. Specifically:
- The same Promise object is returned each time. Many specifications
require this (for example FontFaceSet.ready [1]).
- All references to script objects are 'weak'. This means
ScriptPromiseProperty will not cause leaks through cross-heap
references. The caller must ensure the lifetime of the "holder's"
wrapper, which is typically already the case if the property was
accessed through script.
- The API is designed to support multiple worlds, with one Promise in
each. However currently only the main world is supported.
This is ongoing work in implementing navigator.serviceWorker.ready.
[1] http://dev.w3.org/csswg/css-font-loading/#font-face-set-ready
BUG=363967
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=177450
Patch Set 1 #
Total comments: 7
Patch Set 2 : Feedback--more state assertions in test. #
Total comments: 16
Patch Set 3 : Feedback, plus remove ActiveDOMObject stuff. #Patch Set 4 : Remove a RefCountedWillBeGarbageCollected. #
Total comments: 17
Patch Set 5 : Feedback. #
Total comments: 3
Patch Set 6 : More feedback. Keeping separate header file for now. #
Messages
Total messages: 17 (0 generated)
|