Bug 157400 - Return a Promise from HTMLMediaElement.play()
Summary: Return a Promise from HTMLMediaElement.play()
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jer Noble
URL:
Keywords: WebExposed
: 157530 (view as bug list)
Depends on: 157531
Blocks:
  Show dependency treegraph
 
Reported: 2016-05-05 16:53 PDT by Jer Noble
Modified: 2016-05-10 13:32 PDT (History)
6 users (show)

See Also:


Attachments
Patch (26.43 KB, patch)
2016-05-05 16:58 PDT, Jer Noble
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews101 for mac-yosemite (883.88 KB, application/zip)
2016-05-05 17:44 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews105 for mac-yosemite-wk2 (1.07 MB, application/zip)
2016-05-05 17:48 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews116 for mac-yosemite (1.37 MB, application/zip)
2016-05-05 17:56 PDT, Build Bot
no flags Details
Patch (32.84 KB, patch)
2016-05-06 14:49 PDT, Jer Noble
no flags Details | Formatted Diff | Diff
Patch (33.06 KB, patch)
2016-05-06 14:58 PDT, Jer Noble
eric.carlson: review+
Details | Formatted Diff | Diff
Patch for landing (33.02 KB, patch)
2016-05-06 17:45 PDT, Jer Noble
buildbot: commit-queue-
Details | Formatted Diff | Diff
Archive of layout-test-results from ews107 for mac-yosemite-wk2 (809.81 KB, application/zip)
2016-05-06 18:36 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews115 for mac-yosemite (1.33 MB, application/zip)
2016-05-06 18:47 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews103 for mac-yosemite (1.20 MB, application/zip)
2016-05-06 19:11 PDT, Build Bot
no flags Details
Patch for landing (35.12 KB, patch)
2016-05-07 10:40 PDT, Jer Noble
buildbot: commit-queue-
Details | Formatted Diff | Diff
Archive of layout-test-results from ews114 for mac-yosemite (1.32 MB, application/zip)
2016-05-07 11:42 PDT, Build Bot
no flags Details
Patch for landing (44.25 KB, patch)
2016-05-09 14:43 PDT, Jer Noble
buildbot: commit-queue-
Details | Formatted Diff | Diff
Archive of layout-test-results from ews101 for mac-yosemite (1.04 MB, application/zip)
2016-05-09 15:20 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews117 for mac-yosemite (1.14 MB, application/zip)
2016-05-09 15:38 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews123 for ios-simulator-wk2 (663.52 KB, application/zip)
2016-05-09 16:09 PDT, Build Bot
no flags Details
Patch for landing (44.79 KB, patch)
2016-05-10 09:29 PDT, Jer Noble
buildbot: commit-queue-
Details | Formatted Diff | Diff
Archive of layout-test-results from ews102 for mac-yosemite (823.16 KB, application/zip)
2016-05-10 10:08 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews104 for mac-yosemite-wk2 (796.51 KB, application/zip)
2016-05-10 10:18 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews114 for mac-yosemite (1.14 MB, application/zip)
2016-05-10 10:21 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews121 for ios-simulator-wk2 (666.59 KB, application/zip)
2016-05-10 10:24 PDT, Build Bot
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jer Noble 2016-05-05 16:53:34 PDT
Return a Promise from HTMLMediaElement.play()
Comment 1 Jer Noble 2016-05-05 16:58:13 PDT
Created attachment 278204 [details]
Patch
Comment 2 Build Bot 2016-05-05 17:44:09 PDT
Comment on attachment 278204 [details]
Patch

Attachment 278204 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.webkit.org/results/1273998

New failing tests:
imported/w3c/web-platform-tests/html/dom/interfaces.html
media/media-load-event.html
Comment 3 Build Bot 2016-05-05 17:44:11 PDT
Created attachment 278209 [details]
Archive of layout-test-results from ews101 for mac-yosemite

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews101  Port: mac-yosemite  Platform: Mac OS X 10.10.5
Comment 4 Build Bot 2016-05-05 17:48:30 PDT
Comment on attachment 278204 [details]
Patch

Attachment 278204 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.webkit.org/results/1274002

New failing tests:
imported/w3c/web-platform-tests/html/dom/interfaces.html
media/media-load-event.html
Comment 5 Build Bot 2016-05-05 17:48:32 PDT
Created attachment 278210 [details]
Archive of layout-test-results from ews105 for mac-yosemite-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews105  Port: mac-yosemite-wk2  Platform: Mac OS X 10.10.5
Comment 6 Build Bot 2016-05-05 17:56:39 PDT
Comment on attachment 278204 [details]
Patch

Attachment 278204 [details] did not pass mac-debug-ews (mac):
Output: http://webkit-queues.webkit.org/results/1274010

New failing tests:
media/media-load-event.html
Comment 7 Build Bot 2016-05-05 17:56:41 PDT
Created attachment 278211 [details]
Archive of layout-test-results from ews116 for mac-yosemite

The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews116  Port: mac-yosemite  Platform: Mac OS X 10.10.5
Comment 8 Eric Carlson 2016-05-05 18:39:25 PDT
Comment on attachment 278204 [details]
Patch

r=me - once the tests all pass :-)
Comment 9 Jer Noble 2016-05-06 14:49:29 PDT
Created attachment 278271 [details]
Patch
Comment 10 Jer Noble 2016-05-06 14:58:02 PDT
Created attachment 278274 [details]
Patch
Comment 11 Eric Carlson 2016-05-06 15:10:49 PDT
Comment on attachment 278274 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=278274&action=review

> Source/WebCore/html/HTMLMediaElement.cpp:914
> +    pendingPlayPromises.swap(m_pendingPlayPromises);

Wouldn't move be better than swap here?

> Source/WebCore/html/HTMLMediaElement.cpp:923
> +    pendingPlayPromises.swap(m_pendingPlayPromises);

Ditto.
Comment 12 Jer Noble 2016-05-06 17:45:56 PDT
Created attachment 278299 [details]
Patch for landing
Comment 13 Build Bot 2016-05-06 18:36:36 PDT
Comment on attachment 278299 [details]
Patch for landing

Attachment 278299 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.webkit.org/results/1279381

New failing tests:
imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/playing-the-media-resource/pause-remove-from-document.html
Comment 14 Build Bot 2016-05-06 18:36:40 PDT
Created attachment 278303 [details]
Archive of layout-test-results from ews107 for mac-yosemite-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews107  Port: mac-yosemite-wk2  Platform: Mac OS X 10.10.5
Comment 15 Build Bot 2016-05-06 18:47:52 PDT
Comment on attachment 278299 [details]
Patch for landing

Attachment 278299 [details] did not pass mac-debug-ews (mac):
Output: http://webkit-queues.webkit.org/results/1279387

New failing tests:
imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/TextTrack/cues.html
imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/playing-the-media-resource/pause-remove-from-document.html
Comment 16 Build Bot 2016-05-06 18:47:55 PDT
Created attachment 278304 [details]
Archive of layout-test-results from ews115 for mac-yosemite

The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews115  Port: mac-yosemite  Platform: Mac OS X 10.10.5
Comment 17 Build Bot 2016-05-06 19:11:05 PDT
Comment on attachment 278299 [details]
Patch for landing

Attachment 278299 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.webkit.org/results/1279510

New failing tests:
imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/TextTrack/cues.html
imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/playing-the-media-resource/pause-remove-from-document.html
Comment 18 Build Bot 2016-05-06 19:11:09 PDT
Created attachment 278310 [details]
Archive of layout-test-results from ews103 for mac-yosemite

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews103  Port: mac-yosemite  Platform: Mac OS X 10.10.5
Comment 19 Jer Noble 2016-05-07 10:40:11 PDT
Created attachment 278327 [details]
Patch for landing
Comment 20 Build Bot 2016-05-07 11:42:50 PDT
Comment on attachment 278327 [details]
Patch for landing

Attachment 278327 [details] did not pass mac-debug-ews (mac):
Output: http://webkit-queues.webkit.org/results/1283174

New failing tests:
imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/TextTrack/cues.html
Comment 21 Build Bot 2016-05-07 11:42:54 PDT
Created attachment 278332 [details]
Archive of layout-test-results from ews114 for mac-yosemite

The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews114  Port: mac-yosemite  Platform: Mac OS X 10.10.5
Comment 22 Jer Noble 2016-05-09 14:43:13 PDT
Created attachment 278441 [details]
Patch for landing
Comment 23 WebKit Commit Bot 2016-05-09 14:46:10 PDT
Attachment 278441 [details] did not pass style-queue:


ERROR: Source/WebCore/platform/GenericTaskQueue.h:56:  The parameter name "function" adds no information, so it should be removed.  [readability/parameter_name] [5]
Total errors found: 1 in 26 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 24 Build Bot 2016-05-09 15:20:35 PDT
Comment on attachment 278441 [details]
Patch for landing

Attachment 278441 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.webkit.org/results/1295081

New failing tests:
editing/selection/move-by-word-visually-crash-test-4.html
Comment 25 Build Bot 2016-05-09 15:20:39 PDT
Created attachment 278443 [details]
Archive of layout-test-results from ews101 for mac-yosemite

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews101  Port: mac-yosemite  Platform: Mac OS X 10.10.5
Comment 26 Build Bot 2016-05-09 15:38:45 PDT
Comment on attachment 278441 [details]
Patch for landing

Attachment 278441 [details] did not pass mac-debug-ews (mac):
Output: http://webkit-queues.webkit.org/results/1295107

Number of test failures exceeded the failure limit.
Comment 27 Build Bot 2016-05-09 15:38:49 PDT
Created attachment 278446 [details]
Archive of layout-test-results from ews117 for mac-yosemite

The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews117  Port: mac-yosemite  Platform: Mac OS X 10.10.5
Comment 28 Build Bot 2016-05-09 16:09:08 PDT
Comment on attachment 278441 [details]
Patch for landing

Attachment 278441 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: http://webkit-queues.webkit.org/results/1295266

New failing tests:
editing/selection/move-by-word-visually-crash-test-4.html
Comment 29 Build Bot 2016-05-09 16:09:12 PDT
Created attachment 278452 [details]
Archive of layout-test-results from ews123 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews123  Port: ios-simulator-wk2  Platform: Mac OS X 10.11.4
Comment 30 Jer Noble 2016-05-10 09:29:18 PDT
Created attachment 278500 [details]
Patch for landing
Comment 31 Build Bot 2016-05-10 10:08:23 PDT
Comment on attachment 278500 [details]
Patch for landing

Attachment 278500 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.webkit.org/results/1299301

New failing tests:
editing/selection/move-by-word-visually-crash-test-4.html
Comment 32 Build Bot 2016-05-10 10:08:26 PDT
Created attachment 278506 [details]
Archive of layout-test-results from ews102 for mac-yosemite

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews102  Port: mac-yosemite  Platform: Mac OS X 10.10.5
Comment 33 Build Bot 2016-05-10 10:17:58 PDT
Comment on attachment 278500 [details]
Patch for landing

Attachment 278500 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.webkit.org/results/1299302

New failing tests:
editing/selection/move-by-word-visually-crash-test-4.html
Comment 34 Build Bot 2016-05-10 10:18:01 PDT
Created attachment 278507 [details]
Archive of layout-test-results from ews104 for mac-yosemite-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews104  Port: mac-yosemite-wk2  Platform: Mac OS X 10.10.5
Comment 35 Build Bot 2016-05-10 10:21:39 PDT
Comment on attachment 278500 [details]
Patch for landing

Attachment 278500 [details] did not pass mac-debug-ews (mac):
Output: http://webkit-queues.webkit.org/results/1299300

Number of test failures exceeded the failure limit.
Comment 36 Build Bot 2016-05-10 10:21:43 PDT
Created attachment 278509 [details]
Archive of layout-test-results from ews114 for mac-yosemite

The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews114  Port: mac-yosemite  Platform: Mac OS X 10.10.5
Comment 37 Build Bot 2016-05-10 10:24:47 PDT
Comment on attachment 278500 [details]
Patch for landing

Attachment 278500 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: http://webkit-queues.webkit.org/results/1299306

New failing tests:
editing/selection/move-by-word-visually-crash-test-4.html
Comment 38 Build Bot 2016-05-10 10:24:51 PDT
Created attachment 278510 [details]
Archive of layout-test-results from ews121 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews121  Port: ios-simulator-wk2  Platform: Mac OS X 10.11.4
Comment 39 Jer Noble 2016-05-10 10:26:32 PDT
Committed r200627: <http://trac.webkit.org/changeset/200627>
Comment 40 Simon Fraser (smfr) 2016-05-10 11:46:13 PDT
This seems to have caused a crash in an unrelated test:
https://build.webkit.org/results/Apple%20iOS%209%20Simulator%20Debug%20WK2%20(Tests)/r200627%20(1780)/results.html
Comment 41 WebKit Commit Bot 2016-05-10 13:15:17 PDT
Re-opened since this is blocked by bug 157531
Comment 42 Jer Noble 2016-05-10 13:31:30 PDT
Committed r200638: <http://trac.webkit.org/changeset/200638>
Comment 43 Jer Noble 2016-05-10 13:32:39 PDT
*** Bug 157530 has been marked as a duplicate of this bug. ***