Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(115)

Unified Diff: third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.cpp

Issue 2656343002: Replace [CallWith=ExecutionContext] with [CallWith=ScriptState] (Closed)
Patch Set: Few more Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.cpp
diff --git a/third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.cpp b/third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.cpp
index a1e119cee1f56f0f145dc5cbb65b85bb5b586444..85cb675df52591ff30a073a66e2606b8d9868286 100644
--- a/third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.cpp
+++ b/third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.cpp
@@ -791,14 +791,14 @@ RTCSessionDescription* RTCPeerConnection::remoteDescription() {
}
void RTCPeerConnection::setConfiguration(
- ExecutionContext* context,
+ ScriptState* scriptState,
const RTCConfiguration& rtcConfiguration,
ExceptionState& exceptionState) {
if (throwExceptionIfSignalingStateClosed(m_signalingState, exceptionState))
return;
- WebRTCConfiguration configuration =
- parseConfiguration(context, rtcConfiguration, exceptionState);
+ WebRTCConfiguration configuration = parseConfiguration(
+ scriptState->getExecutionContext(), rtcConfiguration, exceptionState);
if (exceptionState.hadException())
return;
@@ -1061,7 +1061,7 @@ String RTCPeerConnection::iceConnectionState() const {
return String();
}
-void RTCPeerConnection::addStream(ExecutionContext* context,
+void RTCPeerConnection::addStream(ScriptState* scriptState,
MediaStream* stream,
const Dictionary& mediaConstraints,
ExceptionState& exceptionState) {
@@ -1079,8 +1079,8 @@ void RTCPeerConnection::addStream(ExecutionContext* context,
return;
MediaErrorState mediaErrorState;
- WebMediaConstraints constraints =
- MediaConstraintsImpl::create(context, mediaConstraints, mediaErrorState);
+ WebMediaConstraints constraints = MediaConstraintsImpl::create(
+ scriptState->getExecutionContext(), mediaConstraints, mediaErrorState);
if (mediaErrorState.hadException()) {
mediaErrorState.raiseException(exceptionState);
return;
@@ -1169,7 +1169,7 @@ ScriptPromise RTCPeerConnection::getStats(ScriptState* scriptState) {
}
RTCDataChannel* RTCPeerConnection::createDataChannel(
- ExecutionContext* context,
+ ScriptState* scriptState,
String label,
const Dictionary& options,
ExceptionState& exceptionState) {
@@ -1181,6 +1181,7 @@ RTCDataChannel* RTCPeerConnection::createDataChannel(
DictionaryHelper::get(options, "negotiated", init.negotiated);
unsigned short value = 0;
+ ExecutionContext* context = scriptState->getExecutionContext();
if (DictionaryHelper::get(options, "id", value))
init.id = value;
if (DictionaryHelper::get(options, "maxRetransmits", value)) {

Powered by Google App Engine
This is Rietveld 408576698