<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[185873] trunk</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/185873">185873</a></dd>
<dt>Author</dt> <dd>youenn.fablet@crf.canon.fr</dd>
<dt>Date</dt> <dd>2015-06-23 07:10:06 -0700 (Tue, 23 Jun 2015)</dd>
</dl>
<h3>Log Message</h3>
<pre>MediaDevices.getUserMedia should migrate from callbacks to DOMPromise
https://bugs.webkit.org/show_bug.cgi?id=146200
Reviewed by Darin Adler.
Source/WebCore:
Introduced DOMPromiseWithCallback to resolve/reject promises while allowing promise clients to use a typed callback approach.
Migrated MediaDevices.getUserMedia from callbacks to DOMPromiseWithCallback.
Removed MediaDevices.getUserMedia custom binding.
Covered by existing tests.
* CMakeLists.txt: Removing custom binding.
* Modules/mediastream/MediaDevices.cpp:
(WebCore::MediaDevices::getUserMedia): Moving from callback to promise.
* Modules/mediastream/MediaDevices.h: Ditto.
* Modules/mediastream/MediaDevices.idl: Removing custom binding.
* Modules/mediastream/NavigatorUserMedia.cpp:
(WebCore::NavigatorUserMedia::webkitGetUserMedia): Converting from promise callback to API callbacks.
* Modules/mediastream/UserMediaRequest.cpp:
(WebCore::UserMediaRequest::create): Moving from callback to promise.
(WebCore::UserMediaRequest::UserMediaRequest): Ditto.
(WebCore::UserMediaRequest::didCreateStream): Ditto.
(WebCore::UserMediaRequest::failedToCreateStreamWithConstraintsError): Ditto.
(WebCore::UserMediaRequest::failedToCreateStreamWithPermissionError): Ditto.
* Modules/mediastream/UserMediaRequest.h: Ditto.
* bindings/js/JSDOMPromise.h: Introducing DOMPromiseWithCallback and removing crypto specific header.
(WebCore::DOMPromiseWithCallback::DOMPromiseWithCallback):
(WebCore::Error>::resolve):
(WebCore::Error>::reject):
* bindings/js/JSMediaDevicesCustom.cpp: Removed.
* bindings/js/JSSubtleCryptoCustom.cpp: Updating headers.
LayoutTests:
* fast/mediastream/MediaDevices-getUserMedia-expected.txt:</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsfastmediastreamMediaDevicesgetUserMediaexpectedtxt">trunk/LayoutTests/fast/mediastream/MediaDevices-getUserMedia-expected.txt</a></li>
<li><a href="#trunkSourceWebCoreCMakeListstxt">trunk/Source/WebCore/CMakeLists.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreModulesmediastreamMediaDevicescpp">trunk/Source/WebCore/Modules/mediastream/MediaDevices.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesmediastreamMediaDevicesh">trunk/Source/WebCore/Modules/mediastream/MediaDevices.h</a></li>
<li><a href="#trunkSourceWebCoreModulesmediastreamMediaDevicesidl">trunk/Source/WebCore/Modules/mediastream/MediaDevices.idl</a></li>
<li><a href="#trunkSourceWebCoreModulesmediastreamNavigatorUserMediacpp">trunk/Source/WebCore/Modules/mediastream/NavigatorUserMedia.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesmediastreamUserMediaRequestcpp">trunk/Source/WebCore/Modules/mediastream/UserMediaRequest.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesmediastreamUserMediaRequesth">trunk/Source/WebCore/Modules/mediastream/UserMediaRequest.h</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSDOMPromiseh">trunk/Source/WebCore/bindings/js/JSDOMPromise.h</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSSubtleCryptoCustomcpp">trunk/Source/WebCore/bindings/js/JSSubtleCryptoCustom.cpp</a></li>
</ul>
<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkSourceWebCorebindingsjsJSMediaDevicesCustomcpp">trunk/Source/WebCore/bindings/js/JSMediaDevicesCustom.cpp</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (185872 => 185873)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2015-06-23 11:29:32 UTC (rev 185872)
+++ trunk/LayoutTests/ChangeLog        2015-06-23 14:10:06 UTC (rev 185873)
</span><span class="lines">@@ -1,3 +1,12 @@
</span><ins>+2015-06-23 Youenn Fablet <youenn.fablet@crf.canon.fr>
+
+ MediaDevices.getUserMedia should migrate from callbacks to DOMPromise
+ https://bugs.webkit.org/show_bug.cgi?id=146200
+
+ Reviewed by Darin Adler.
+
+ * fast/mediastream/MediaDevices-getUserMedia-expected.txt:
+
</ins><span class="cx"> 2015-06-23 Xabier Rodriguez Calvar <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr>
</span><span class="cx">
</span><span class="cx"> [Streams API] Implement ReadableStream js source "'cancel" callback
</span></span></pre></div>
<a id="trunkLayoutTestsfastmediastreamMediaDevicesgetUserMediaexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/mediastream/MediaDevices-getUserMedia-expected.txt (185872 => 185873)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/mediastream/MediaDevices-getUserMedia-expected.txt        2015-06-23 11:29:32 UTC (rev 185872)
+++ trunk/LayoutTests/fast/mediastream/MediaDevices-getUserMedia-expected.txt        2015-06-23 14:10:06 UTC (rev 185873)
</span><span class="lines">@@ -5,7 +5,7 @@
</span><span class="cx">
</span><span class="cx"> PASS typeof navigator.mediaDevices.webkitGetUserMedia is 'undefined'
</span><span class="cx"> PASS navigator.mediaDevices.getUserMedia({audio:true}).then(gotStream1); did not throw exception.
</span><del>-PASS navigator.mediaDevices.getUserMedia() rejected with error: TypeError: First argument of getUserMedia must be a valid Dictionary
</del><ins>+PASS navigator.mediaDevices.getUserMedia() rejected with error: TypeError: Not enough arguments
</ins><span class="cx"> PASS navigator.mediaDevices.getUserMedia({}) rejected with error: Error: NotSupportedError: DOM Exception 9
</span><span class="cx"> PASS Stream generated.
</span><span class="cx"> PASS stream.getAudioTracks().length is 1
</span></span></pre></div>
<a id="trunkSourceWebCoreCMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/CMakeLists.txt (185872 => 185873)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/CMakeLists.txt        2015-06-23 11:29:32 UTC (rev 185872)
+++ trunk/Source/WebCore/CMakeLists.txt        2015-06-23 14:10:06 UTC (rev 185873)
</span><span class="lines">@@ -1153,7 +1153,6 @@
</span><span class="cx"> bindings/js/JSLazyEventListener.cpp
</span><span class="cx"> bindings/js/JSLocationCustom.cpp
</span><span class="cx"> bindings/js/JSMainThreadExecState.cpp
</span><del>- bindings/js/JSMediaDevicesCustom.cpp
</del><span class="cx"> bindings/js/JSMediaSourceStatesCustom.cpp
</span><span class="cx"> bindings/js/JSMediaStreamCapabilitiesCustom.cpp
</span><span class="cx"> bindings/js/JSMessageChannelCustom.cpp
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (185872 => 185873)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-06-23 11:29:32 UTC (rev 185872)
+++ trunk/Source/WebCore/ChangeLog        2015-06-23 14:10:06 UTC (rev 185873)
</span><span class="lines">@@ -1,3 +1,37 @@
</span><ins>+2015-06-23 Youenn Fablet <youenn.fablet@crf.canon.fr>
+
+ MediaDevices.getUserMedia should migrate from callbacks to DOMPromise
+ https://bugs.webkit.org/show_bug.cgi?id=146200
+
+ Reviewed by Darin Adler.
+
+ Introduced DOMPromiseWithCallback to resolve/reject promises while allowing promise clients to use a typed callback approach.
+ Migrated MediaDevices.getUserMedia from callbacks to DOMPromiseWithCallback.
+ Removed MediaDevices.getUserMedia custom binding.
+
+ Covered by existing tests.
+
+ * CMakeLists.txt: Removing custom binding.
+ * Modules/mediastream/MediaDevices.cpp:
+ (WebCore::MediaDevices::getUserMedia): Moving from callback to promise.
+ * Modules/mediastream/MediaDevices.h: Ditto.
+ * Modules/mediastream/MediaDevices.idl: Removing custom binding.
+ * Modules/mediastream/NavigatorUserMedia.cpp:
+ (WebCore::NavigatorUserMedia::webkitGetUserMedia): Converting from promise callback to API callbacks.
+ * Modules/mediastream/UserMediaRequest.cpp:
+ (WebCore::UserMediaRequest::create): Moving from callback to promise.
+ (WebCore::UserMediaRequest::UserMediaRequest): Ditto.
+ (WebCore::UserMediaRequest::didCreateStream): Ditto.
+ (WebCore::UserMediaRequest::failedToCreateStreamWithConstraintsError): Ditto.
+ (WebCore::UserMediaRequest::failedToCreateStreamWithPermissionError): Ditto.
+ * Modules/mediastream/UserMediaRequest.h: Ditto.
+ * bindings/js/JSDOMPromise.h: Introducing DOMPromiseWithCallback and removing crypto specific header.
+ (WebCore::DOMPromiseWithCallback::DOMPromiseWithCallback):
+ (WebCore::Error>::resolve):
+ (WebCore::Error>::reject):
+ * bindings/js/JSMediaDevicesCustom.cpp: Removed.
+ * bindings/js/JSSubtleCryptoCustom.cpp: Updating headers.
+
</ins><span class="cx"> 2015-06-23 Xabier Rodriguez Calvar <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr>
</span><span class="cx">
</span><span class="cx"> [Streams API] Implement ReadableStream js source "'cancel" callback
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediastreamMediaDevicescpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediastream/MediaDevices.cpp (185872 => 185873)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediastream/MediaDevices.cpp        2015-06-23 11:29:32 UTC (rev 185872)
+++ trunk/Source/WebCore/Modules/mediastream/MediaDevices.cpp        2015-06-23 14:10:06 UTC (rev 185873)
</span><span class="lines">@@ -60,8 +60,13 @@
</span><span class="cx"> return downcast<Document>(scriptExecutionContext());
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void MediaDevices::getUserMedia(const Dictionary& options, ResolveCallback resolveCallback, RejectCallback rejectCallback, ExceptionCode& ec) const
</del><ins>+void MediaDevices::getUserMedia(const Dictionary& options, Promise&& promise, ExceptionCode& ec) const
</ins><span class="cx"> {
</span><ins>+ if (!options.isObject()) {
+ ec = TypeError;
+ return;
+ }
+
</ins><span class="cx"> UserMediaController* userMedia = UserMediaController::from(document() ? document()->page() : nullptr);
</span><span class="cx"> if (!userMedia) {
</span><span class="cx"> // FIXME: We probably want to return a MediaStreamError here using the rejectCallback, and get rid off the ExceptionCode parameter.
</span><span class="lines">@@ -69,7 +74,7 @@
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- RefPtr<UserMediaRequest> request = UserMediaRequest::create(document(), userMedia, options, WTF::move(resolveCallback), WTF::move(rejectCallback), ec);
</del><ins>+ RefPtr<UserMediaRequest> request = UserMediaRequest::create(document(), userMedia, options, WTF::move(promise), ec);
</ins><span class="cx"> if (!request) {
</span><span class="cx"> ec = NOT_SUPPORTED_ERR;
</span><span class="cx"> return;
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediastreamMediaDevicesh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediastream/MediaDevices.h (185872 => 185873)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediastream/MediaDevices.h        2015-06-23 11:29:32 UTC (rev 185872)
+++ trunk/Source/WebCore/Modules/mediastream/MediaDevices.h        2015-06-23 14:10:06 UTC (rev 185873)
</span><span class="lines">@@ -34,6 +34,7 @@
</span><span class="cx"> #if ENABLE(MEDIA_STREAM)
</span><span class="cx">
</span><span class="cx"> #include "ContextDestructionObserver.h"
</span><ins>+#include "JSDOMPromise.h"
</ins><span class="cx"> #include "ScriptWrappable.h"
</span><span class="cx"> #include <functional>
</span><span class="cx"> #include <wtf/RefCounted.h>
</span><span class="lines">@@ -55,11 +56,9 @@
</span><span class="cx">
</span><span class="cx"> Document* document() const;
</span><span class="cx">
</span><del>- typedef std::function<void(MediaStream&)> ResolveCallback;
- typedef std::function<void(NavigatorUserMediaError&)> RejectCallback;
</del><ins>+ typedef DOMPromiseWithCallback<RefPtr<MediaStream>, RefPtr<NavigatorUserMediaError>> Promise;
+ void getUserMedia(const Dictionary&, Promise&&, ExceptionCode&) const;
</ins><span class="cx">
</span><del>- void getUserMedia(const Dictionary&, ResolveCallback, RejectCallback, ExceptionCode&) const;
-
</del><span class="cx"> private:
</span><span class="cx"> explicit MediaDevices(ScriptExecutionContext*);
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediastreamMediaDevicesidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediastream/MediaDevices.idl (185872 => 185873)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediastream/MediaDevices.idl        2015-06-23 11:29:32 UTC (rev 185872)
+++ trunk/Source/WebCore/Modules/mediastream/MediaDevices.idl        2015-06-23 14:10:06 UTC (rev 185873)
</span><span class="lines">@@ -32,5 +32,5 @@
</span><span class="cx"> NoInterfaceObject,
</span><span class="cx"> Conditional=MEDIA_STREAM
</span><span class="cx"> ] interface MediaDevices {
</span><del>- [Custom, RaisesException] Promise getUserMedia(Dictionary options);
</del><ins>+ [RaisesException] Promise getUserMedia(Dictionary options);
</ins><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediastreamNavigatorUserMediacpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediastream/NavigatorUserMedia.cpp (185872 => 185873)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediastream/NavigatorUserMedia.cpp        2015-06-23 11:29:32 UTC (rev 185872)
+++ trunk/Source/WebCore/Modules/mediastream/NavigatorUserMedia.cpp        2015-06-23 14:10:06 UTC (rev 185873)
</span><span class="lines">@@ -29,7 +29,9 @@
</span><span class="cx"> #include "Document.h"
</span><span class="cx"> #include "ExceptionCode.h"
</span><span class="cx"> #include "Frame.h"
</span><ins>+#include "MediaStream.h"
</ins><span class="cx"> #include "Navigator.h"
</span><ins>+#include "NavigatorUserMediaError.h"
</ins><span class="cx"> #include "NavigatorUserMediaErrorCallback.h"
</span><span class="cx"> #include "NavigatorUserMediaSuccessCallback.h"
</span><span class="cx"> #include "Page.h"
</span><span class="lines">@@ -48,6 +50,7 @@
</span><span class="cx">
</span><span class="cx"> void NavigatorUserMedia::webkitGetUserMedia(Navigator* navigator, const Dictionary& options, PassRefPtr<NavigatorUserMediaSuccessCallback> successCallback, PassRefPtr<NavigatorUserMediaErrorCallback> errorCallback, ExceptionCode& ec)
</span><span class="cx"> {
</span><ins>+ // FIXME: Remove this test once IDL is updated to make errroCallback parameter mandatory.
</ins><span class="cx"> if (!successCallback || !errorCallback) {
</span><span class="cx"> ec = TYPE_MISMATCH_ERR;
</span><span class="cx"> return;
</span><span class="lines">@@ -59,7 +62,25 @@
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- RefPtr<UserMediaRequest> request = UserMediaRequest::create(navigator->frame()->document(), userMedia, options, successCallback, errorCallback, ec);
</del><ins>+ // We do not need to protect the context (i.e. document) here as UserMediaRequest is observing context destruction and will check validity before resolving/rejecting promise.
+ Document* document = navigator->frame()->document();
+
+ ASSERT(errorCallback);
+ ASSERT(successCallback);
+ auto resolveCallback = [successCallback, document](const RefPtr<MediaStream>& stream) mutable {
+ RefPtr<MediaStream> protectedStream = stream;
+ document->postTask([successCallback, protectedStream](ScriptExecutionContext&) {
+ successCallback->handleEvent(protectedStream.get());
+ });
+ };
+ auto rejectCallback = [errorCallback, document](const RefPtr<NavigatorUserMediaError>& error) mutable {
+ RefPtr<NavigatorUserMediaError> protectedError = error;
+ document->postTask([errorCallback, protectedError](ScriptExecutionContext&) {
+ errorCallback->handleEvent(protectedError.get());
+ });
+ };
+
+ auto request = UserMediaRequest::create(navigator->frame()->document(), userMedia, options, MediaDevices::Promise(WTF::move(resolveCallback), WTF::move(rejectCallback)), ec);
</ins><span class="cx"> if (!request) {
</span><span class="cx"> ec = NOT_SUPPORTED_ERR;
</span><span class="cx"> return;
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediastreamUserMediaRequestcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediastream/UserMediaRequest.cpp (185872 => 185873)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediastream/UserMediaRequest.cpp        2015-06-23 11:29:32 UTC (rev 185872)
+++ trunk/Source/WebCore/Modules/mediastream/UserMediaRequest.cpp        2015-06-23 14:10:06 UTC (rev 185873)
</span><span class="lines">@@ -41,6 +41,8 @@
</span><span class="cx"> #include "Document.h"
</span><span class="cx"> #include "ExceptionCode.h"
</span><span class="cx"> #include "Frame.h"
</span><ins>+#include "JSMediaStream.h"
+#include "JSNavigatorUserMediaError.h"
</ins><span class="cx"> #include "MediaConstraintsImpl.h"
</span><span class="cx"> #include "MediaStream.h"
</span><span class="cx"> #include "MediaStreamPrivate.h"
</span><span class="lines">@@ -71,36 +73,8 @@
</span><span class="cx"> return constraints.release();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<UserMediaRequest> UserMediaRequest::create(ScriptExecutionContext* context, UserMediaController* controller, const Dictionary& options, PassRefPtr<NavigatorUserMediaSuccessCallback> successCallback, PassRefPtr<NavigatorUserMediaErrorCallback> errorCallback, ExceptionCode& ec)
</del><ins>+RefPtr<UserMediaRequest> UserMediaRequest::create(ScriptExecutionContext* context, UserMediaController* controller, const Dictionary& options, MediaDevices::Promise&& promise, ExceptionCode& ec)
</ins><span class="cx"> {
</span><del>- ASSERT(successCallback);
-
- auto resolveCallback = [successCallback, context](MediaStream& stream) mutable {
- ASSERT(context);
-
- RefPtr<MediaStream> mediaStream = &stream;
- context->postTask([successCallback, mediaStream](ScriptExecutionContext&) {
- successCallback->handleEvent(mediaStream.get());
- });
- };
- auto rejectCallback = [errorCallback, context](NavigatorUserMediaError& error) mutable {
- ASSERT(context);
-
- if (errorCallback) {
- RefPtr<NavigatorUserMediaError> eventError = &error;
- context->postTask([errorCallback, eventError](ScriptExecutionContext&) {
- errorCallback->handleEvent(eventError.get());
- });
- }
- };
-
- return UserMediaRequest::create(context, controller, options, WTF::move(resolveCallback), WTF::move(rejectCallback), ec);
-}
-
-RefPtr<UserMediaRequest> UserMediaRequest::create(ScriptExecutionContext* context, UserMediaController* controller, const Dictionary& options, MediaDevices::ResolveCallback&& resolveCallback, MediaDevices::RejectCallback&& rejectCallback, ExceptionCode& ec)
-{
- ASSERT(resolveCallback && rejectCallback);
-
</del><span class="cx"> RefPtr<MediaConstraints> audioConstraints = parseOptions(options, AtomicString("audio", AtomicString::ConstructFromLiteral), ec);
</span><span class="cx"> if (ec)
</span><span class="cx"> return nullptr;
</span><span class="lines">@@ -112,16 +86,15 @@
</span><span class="cx"> if (!audioConstraints && !videoConstraints)
</span><span class="cx"> return nullptr;
</span><span class="cx">
</span><del>- return adoptRef(*new UserMediaRequest(context, controller, audioConstraints.release(), videoConstraints.release(), WTF::move(resolveCallback), WTF::move(rejectCallback)));
</del><ins>+ return adoptRef(*new UserMediaRequest(context, controller, audioConstraints.release(), videoConstraints.release(), WTF::move(promise)));
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-UserMediaRequest::UserMediaRequest(ScriptExecutionContext* context, UserMediaController* controller, PassRefPtr<MediaConstraints> audioConstraints, PassRefPtr<MediaConstraints> videoConstraints, MediaDevices::ResolveCallback&& resolveCallback, MediaDevices::RejectCallback&& rejectCallback)
</del><ins>+UserMediaRequest::UserMediaRequest(ScriptExecutionContext* context, UserMediaController* controller, PassRefPtr<MediaConstraints> audioConstraints, PassRefPtr<MediaConstraints> videoConstraints, MediaDevices::Promise&& promise)
</ins><span class="cx"> : ContextDestructionObserver(context)
</span><span class="cx"> , m_audioConstraints(audioConstraints)
</span><span class="cx"> , m_videoConstraints(videoConstraints)
</span><span class="cx"> , m_controller(controller)
</span><del>- , m_resolveCallback(WTF::move(resolveCallback))
- , m_rejectCallback(WTF::move(rejectCallback))
</del><ins>+ , m_promise(WTF::move(promise))
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -144,7 +117,6 @@
</span><span class="cx"> RealtimeMediaSourceCenter::singleton().validateRequestConstraints(this, m_audioConstraints, m_videoConstraints);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-
</del><span class="cx"> void UserMediaRequest::constraintsValidated()
</span><span class="cx"> {
</span><span class="cx"> RefPtr<UserMediaRequest> protectedThis(this);
</span><span class="lines">@@ -186,7 +158,7 @@
</span><span class="cx"> for (auto& track : stream->getVideoTracks())
</span><span class="cx"> track->applyConstraints(m_videoConstraints);
</span><span class="cx">
</span><del>- m_resolveCallback(*stream);
</del><ins>+ m_promise.resolve(stream);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void UserMediaRequest::failedToCreateStreamWithConstraintsError(const String& constraintName)
</span><span class="lines">@@ -195,7 +167,7 @@
</span><span class="cx"> if (!m_scriptExecutionContext)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- m_rejectCallback(NavigatorUserMediaError::create(NavigatorUserMediaError::constraintNotSatisfiedErrorName(), constraintName).get());
</del><ins>+ m_promise.reject(NavigatorUserMediaError::create(NavigatorUserMediaError::constraintNotSatisfiedErrorName(), constraintName));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void UserMediaRequest::failedToCreateStreamWithPermissionError()
</span><span class="lines">@@ -204,7 +176,7 @@
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> // FIXME: Replace NavigatorUserMediaError with MediaStreamError (see bug 143335)
</span><del>- m_rejectCallback(NavigatorUserMediaError::create(NavigatorUserMediaError::permissionDeniedErrorName(), emptyString()));
</del><ins>+ m_promise.reject(NavigatorUserMediaError::create(NavigatorUserMediaError::permissionDeniedErrorName(), emptyString()));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void UserMediaRequest::contextDestroyed()
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediastreamUserMediaRequesth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediastream/UserMediaRequest.h (185872 => 185873)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediastream/UserMediaRequest.h        2015-06-23 11:29:32 UTC (rev 185872)
+++ trunk/Source/WebCore/Modules/mediastream/UserMediaRequest.h        2015-06-23 14:10:06 UTC (rev 185873)
</span><span class="lines">@@ -58,8 +58,7 @@
</span><span class="cx">
</span><span class="cx"> class UserMediaRequest : public MediaStreamCreationClient, public ContextDestructionObserver {
</span><span class="cx"> public:
</span><del>- static RefPtr<UserMediaRequest> create(ScriptExecutionContext*, UserMediaController*, const Dictionary& options, PassRefPtr<NavigatorUserMediaSuccessCallback>, PassRefPtr<NavigatorUserMediaErrorCallback>, ExceptionCode&);
- static RefPtr<UserMediaRequest> create(ScriptExecutionContext*, UserMediaController*, const Dictionary& options, MediaDevices::ResolveCallback&&, MediaDevices::RejectCallback&&, ExceptionCode&);
</del><ins>+ static RefPtr<UserMediaRequest> create(ScriptExecutionContext*, UserMediaController*, const Dictionary& options, MediaDevices::Promise&&, ExceptionCode&);
</ins><span class="cx"> ~UserMediaRequest();
</span><span class="cx">
</span><span class="cx"> WEBCORE_EXPORT SecurityOrigin* securityOrigin() const;
</span><span class="lines">@@ -72,7 +71,7 @@
</span><span class="cx"> bool requiresVideo() const { return m_videoConstraints; }
</span><span class="cx">
</span><span class="cx"> private:
</span><del>- UserMediaRequest(ScriptExecutionContext*, UserMediaController*, PassRefPtr<MediaConstraints> audioConstraints, PassRefPtr<MediaConstraints> videoConstraints, MediaDevices::ResolveCallback&&, MediaDevices::RejectCallback&&);
</del><ins>+ UserMediaRequest(ScriptExecutionContext*, UserMediaController*, PassRefPtr<MediaConstraints> audioConstraints, PassRefPtr<MediaConstraints> videoConstraints, MediaDevices::Promise&&);
</ins><span class="cx">
</span><span class="cx"> // MediaStreamCreationClient
</span><span class="cx"> virtual void constraintsValidated() override final;
</span><span class="lines">@@ -89,8 +88,7 @@
</span><span class="cx">
</span><span class="cx"> UserMediaController* m_controller;
</span><span class="cx">
</span><del>- MediaDevices::ResolveCallback m_resolveCallback;
- MediaDevices::RejectCallback m_rejectCallback;
</del><ins>+ MediaDevices::Promise m_promise;
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (185872 => 185873)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2015-06-23 11:29:32 UTC (rev 185872)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2015-06-23 14:10:06 UTC (rev 185873)
</span><span class="lines">@@ -2205,7 +2205,6 @@
</span><span class="cx">                 5DFE8F560D16477B0076E937 /* ScheduledAction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCA378BA0D15F64200B793D6 /* ScheduledAction.cpp */; };
</span><span class="cx">                 5DFE8F570D16477C0076E937 /* ScheduledAction.h in Headers */ = {isa = PBXBuildFile; fileRef = BCA378BB0D15F64200B793D6 /* ScheduledAction.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 5DFEBAB718592B6D00C75BEB /* WebKitAvailability.h in Headers */ = {isa = PBXBuildFile; fileRef = 5DFEBAB618592B6D00C75BEB /* WebKitAvailability.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><del>-                5EA725D11ACABD3800EAD17B /* JSMediaDevicesCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5EA725D01ACABD2700EAD17B /* JSMediaDevicesCustom.cpp */; };
</del><span class="cx">                 5EA725D21ACABD4700EAD17B /* MediaDevices.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5EA725CD1ACABCD900EAD17B /* MediaDevices.cpp */; };
</span><span class="cx">                 5EA725D31ACABD4700EAD17B /* MediaDevices.h in Headers */ = {isa = PBXBuildFile; fileRef = 5EA725CE1ACABCD900EAD17B /* MediaDevices.h */; };
</span><span class="cx">                 5EA725D51ACABD5700EAD17B /* NavigatorMediaDevices.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5EA725CA1ACABCB500EAD17B /* NavigatorMediaDevices.cpp */; };
</span><span class="lines">@@ -9464,7 +9463,6 @@
</span><span class="cx">                 5EA725CD1ACABCD900EAD17B /* MediaDevices.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MediaDevices.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 5EA725CE1ACABCD900EAD17B /* MediaDevices.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediaDevices.h; sourceTree = "<group>"; };
</span><span class="cx">                 5EA725CF1ACABCD900EAD17B /* MediaDevices.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = MediaDevices.idl; sourceTree = "<group>"; };
</span><del>-                5EA725D01ACABD2700EAD17B /* JSMediaDevicesCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSMediaDevicesCustom.cpp; sourceTree = "<group>"; };
</del><span class="cx">                 5F2DBBE7178E332D00141486 /* CertificateInfoMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = CertificateInfoMac.mm; sourceTree = "<group>"; };
</span><span class="cx">                 5F2DBBE8178E336900141486 /* CertificateInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CertificateInfo.h; sourceTree = "<group>"; };
</span><span class="cx">                 5FC7DC26CFE2563200B85AE5 /* JSEventTarget.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSEventTarget.h; sourceTree = "<group>"; };
</span><span class="lines">@@ -21406,7 +21404,6 @@
</span><span class="cx">                                 A7D0318D0E93540300E24ACD /* JSImageDataCustom.cpp */,
</span><span class="cx">                                 7A74ECBC101839DA00BF939E /* JSInspectorFrontendHostCustom.cpp */,
</span><span class="cx">                                 BCE1C43F0D9830F4003B02F2 /* JSLocationCustom.cpp */,
</span><del>-                                5EA725D01ACABD2700EAD17B /* JSMediaDevicesCustom.cpp */,
</del><span class="cx">                                 AD726FE716D9F204003A4E6D /* JSMediaListCustom.h */,
</span><span class="cx">                                 07C59B6D17F794F6000FBCBB /* JSMediaSourceStatesCustom.cpp */,
</span><span class="cx">                                 0705851617FB40E9005F2BCB /* JSMediaStreamCapabilitiesCustom.cpp */,
</span><span class="lines">@@ -28984,7 +28981,6 @@
</span><span class="cx">                                 8FAC774D119872CB0015AE94 /* JSMainThreadExecState.cpp in Sources */,
</span><span class="cx">                                 CD27F6E51457685A0078207D /* JSMediaController.cpp in Sources */,
</span><span class="cx">                                 CDAB6D2D17C814EE00C60B34 /* JSMediaControlsHost.cpp in Sources */,
</span><del>-                                5EA725D11ACABD3800EAD17B /* JSMediaDevicesCustom.cpp in Sources */,
</del><span class="cx">                                 FD23A12513F5FA5900F67001 /* JSMediaElementAudioSourceNode.cpp in Sources */,
</span><span class="cx">                                 E44614180CD6826900FADA75 /* JSMediaError.cpp in Sources */,
</span><span class="cx">                                 CDA98DA31601464100FEA3B1 /* JSMediaKeyError.cpp in Sources */,
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSDOMPromiseh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSDOMPromise.h (185872 => 185873)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSDOMPromise.h        2015-06-23 11:29:32 UTC (rev 185872)
+++ trunk/Source/WebCore/bindings/js/JSDOMPromise.h        2015-06-23 14:10:06 UTC (rev 185873)
</span><span class="lines">@@ -28,11 +28,10 @@
</span><span class="cx">
</span><span class="cx"> #if ENABLE(PROMISES)
</span><span class="cx">
</span><del>-#include "JSCryptoKey.h"
-#include "JSCryptoKeyPair.h"
</del><span class="cx"> #include "JSDOMBinding.h"
</span><span class="cx"> #include <heap/StrongInlines.h>
</span><span class="cx"> #include <runtime/JSPromiseDeferred.h>
</span><ins>+#include <wtf/Optional.h>
</ins><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><span class="lines">@@ -86,6 +85,31 @@
</span><span class="cx"> DeferredWrapper m_wrapper;
</span><span class="cx"> };
</span><span class="cx">
</span><ins>+template<typename Value, typename Error>
+class DOMPromiseWithCallback {
+public:
+ DOMPromiseWithCallback(DeferredWrapper&& wrapper) : m_wrapper(WTF::move(wrapper)) { }
+ DOMPromiseWithCallback(std::function<void(const Value&)> resolve, std::function<void(const Error&)> reject)
+ : m_resolveCallback(WTF::move(resolve))
+ , m_rejectCallback(WTF::move(reject))
+ {
+ ASSERT(m_resolveCallback);
+ ASSERT(m_rejectCallback);
+ }
+ explicit DOMPromiseWithCallback(DOMPromiseWithCallback&& promise)
+ : m_wrapper(WTF::move(promise.m_wrapper))
+ , m_resolveCallback(WTF::move(promise.m_resolveCallback))
+ , m_rejectCallback(WTF::move(promise.m_rejectCallback)) { }
+
+ void resolve(const Value&);
+ void reject(const Error&);
+
+private:
+ Optional<DOMPromise<Value, Error>> m_wrapper;
+ std::function<void(const Value&)> m_resolveCallback;
+ std::function<void(const Error&)> m_rejectCallback;
+};
+
</ins><span class="cx"> template<class ResolveResultType>
</span><span class="cx"> inline void DeferredWrapper::resolve(const ResolveResultType& result)
</span><span class="cx"> {
</span><span class="lines">@@ -196,8 +220,30 @@
</span><span class="cx"> reject(*exec, jsString(exec, result));
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+template<typename Value, typename Error>
+inline void DOMPromiseWithCallback<Value, Error>::resolve(const Value& value)
+{
+ if (m_resolveCallback) {
+ m_resolveCallback(value);
+ return;
+ }
+ ASSERT(m_wrapper);
+ m_wrapper.value().resolve(value);
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+template<typename Value, typename Error>
+inline void DOMPromiseWithCallback<Value, Error>::reject(const Error& error)
+{
+ if (m_rejectCallback) {
+ m_rejectCallback(error);
+ return;
+ }
+ ASSERT(m_wrapper);
+ m_wrapper.value().reject(error);
+}
+
+}
+
</ins><span class="cx"> #endif // ENABLE(PROMISES)
</span><span class="cx">
</span><span class="cx"> #endif // JSDOMPromise_h
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSMediaDevicesCustomcpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/bindings/js/JSMediaDevicesCustom.cpp (185872 => 185873)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSMediaDevicesCustom.cpp        2015-06-23 11:29:32 UTC (rev 185872)
+++ trunk/Source/WebCore/bindings/js/JSMediaDevicesCustom.cpp        2015-06-23 14:10:06 UTC (rev 185873)
</span><span class="lines">@@ -1,84 +0,0 @@
</span><del>-/*
- * Copyright (C) 2015 Ericsson AB. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- * 3. Neither the name of Ericsson nor the names of its contributors
- * may be used to endorse or promote products derived from this
- * software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-
-#if ENABLE(MEDIA_STREAM)
-#include "JSMediaDevices.h"
-
-#include "Dictionary.h"
-#include "ExceptionCode.h"
-#include "JSDOMBinding.h"
-#include "JSDOMPromise.h"
-#include "JSMediaStream.h"
-#include "JSNavigatorUserMediaError.h"
-#include <runtime/Exception.h>
-
-using namespace JSC;
-
-namespace WebCore {
-
-JSValue JSMediaDevices::getUserMedia(ExecState* exec)
-{
- JSPromiseDeferred* promiseDeferred = JSPromiseDeferred::create(exec, globalObject());
- DeferredWrapper wrapper(exec, globalObject(), promiseDeferred);
-
- Dictionary options(exec, exec->argument(0));
- if (exec->hadException()) {
- Exception* exception = exec->exception();
- exec->clearException();
- wrapper.reject(exception->value());
- return promiseDeferred->promise();
- }
-
- if (!options.isObject()) {
- JSValue error = createTypeError(exec, "First argument of getUserMedia must be a valid Dictionary");
- wrapper.reject(error);
- return promiseDeferred->promise();
- }
-
- auto resolveCallback = [wrapper](MediaStream& stream) mutable {
- wrapper.resolve(&stream);
- };
- auto rejectCallback = [wrapper](NavigatorUserMediaError& error) mutable {
- wrapper.reject(&error);
- };
-
- ExceptionCode ec = 0;
- impl().getUserMedia(options, WTF::move(resolveCallback), WTF::move(rejectCallback), ec);
- if (ec)
- wrapper.reject(ec);
-
- return promiseDeferred->promise();
-}
-
-} // namespace WebCore
-
-#endif // ENABLE(MEDIA_STREAM)
</del></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSSubtleCryptoCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSSubtleCryptoCustom.cpp (185872 => 185873)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSSubtleCryptoCustom.cpp        2015-06-23 11:29:32 UTC (rev 185872)
+++ trunk/Source/WebCore/bindings/js/JSSubtleCryptoCustom.cpp        2015-06-23 14:10:06 UTC (rev 185873)
</span><span class="lines">@@ -36,6 +36,8 @@
</span><span class="cx"> #include "Document.h"
</span><span class="cx"> #include "ExceptionCode.h"
</span><span class="cx"> #include "JSCryptoAlgorithmDictionary.h"
</span><ins>+#include "JSCryptoKey.h"
+#include "JSCryptoKeyPair.h"
</ins><span class="cx"> #include "JSCryptoKeySerializationJWK.h"
</span><span class="cx"> #include "JSCryptoOperationData.h"
</span><span class="cx"> #include "JSDOMPromise.h"
</span></span></pre>
</div>
</div>
</body>
</html>