| Summary: | Web Inspector: convert ReplayManager to a promise-based API | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Brian Burg <burg> | ||||
| Component: | Web Inspector | Assignee: | Brian Burg <burg> | ||||
| Status: | RESOLVED FIXED | ||||||
| Severity: | Normal | CC: | graouts, joepeck, timothy, webkit-bug-importer | ||||
| Priority: | P2 | Keywords: | InRadar | ||||
| Version: | 528+ (Nightly build) | ||||||
| Hardware: | All | ||||||
| OS: | All | ||||||
| Bug Depends on: | |||||||
| Bug Blocks: | 135608 | ||||||
| Attachments: |
|
||||||
|
Description
Brian Burg
2014-07-24 12:37:50 PDT
Created attachment 235448 [details]
Patch
Comment on attachment 235448 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=235448&action=review > Source/WebInspectorUI/UserInterface/Controllers/ReplayManager.js:231 > + switchSession: function(sessionId) { // --> () What is the "// --> ()" for? > Source/WebInspectorUI/UserInterface/Controllers/ReplayManager.js:253 > + }) > + .then(function ensureSessionDataIsLoaded(session) { I like these on the same line. > Source/WebInspectorUI/UserInterface/Views/ReplayDashboardView.js:124 > + }).then(function() { Yay! Same line. Comment on attachment 235448 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=235448&action=review >> Source/WebInspectorUI/UserInterface/Controllers/ReplayManager.js:231 >> + switchSession: function(sessionId) { // --> () > > What is the "// --> ()" for? This is my (crappy) syntax for documenting which functions return a promise, and what the fulfilled promise value is (if any). Contrast to the getSegment() function. >> Source/WebInspectorUI/UserInterface/Controllers/ReplayManager.js:253 >> + .then(function ensureSessionDataIsLoaded(session) { > > I like these on the same line. OK If it's okay with you, I'm going to land this without the UI changes, since those aren't reviewed yet. Committed r172161: <http://trac.webkit.org/changeset/172161> |