Skip to content

Commit

Permalink
Remove unused param in Callbacks::OnSuccess
Browse files Browse the repository at this point in the history
Bug: None
Change-Id: I5bf79f30370028bd11a9b583abe7f3705ab92f83
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3162157
Commit-Queue: Elad Alon <[email protected]>
Reviewed-by: Henrik Boström <[email protected]>
Cr-Commit-Position: refs/heads/main@{#923320}
NOKEYCHECK=True
GitOrigin-RevId: 3ef52dd6359fc3cad9ad7deceef8ac49c99c35c3
  • Loading branch information
Elad Alon authored and copybara-github committed Sep 21, 2021
1 parent 867010b commit 39d7fb2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
3 changes: 1 addition & 2 deletions blink/renderer/modules/mediastream/media_devices.cc
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,7 @@ class PromiseResolverCallbacks final : public UserMediaRequest::Callbacks {
on_success_follow_up_(std::move(on_success_follow_up)) {}
~PromiseResolverCallbacks() override = default;

void OnSuccess(ScriptWrappable* callback_this_value,
MediaStream* stream) override {
void OnSuccess(MediaStream* stream) override {
DCHECK(stream);

MediaStreamTrack* video_track = nullptr;
Expand Down
7 changes: 3 additions & 4 deletions blink/renderer/modules/mediastream/user_media_request.cc
Original file line number Diff line number Diff line change
Expand Up @@ -318,9 +318,8 @@ class UserMediaRequest::V8Callbacks final : public UserMediaRequest::Callbacks {
UserMediaRequest::Callbacks::Trace(visitor);
}

void OnSuccess(ScriptWrappable* callback_this_value,
MediaStream* stream) override {
success_callback_->InvokeAndReportException(callback_this_value, stream);
void OnSuccess(MediaStream* stream) override {
success_callback_->InvokeAndReportException(nullptr, stream);
}
void OnError(ScriptWrappable* callback_this_value,
const V8MediaStreamError* error) override {
Expand Down Expand Up @@ -567,7 +566,7 @@ void UserMediaRequest::OnMediaStreamInitialized(MediaStream* stream) {
RecordIdentifiabilityMetric(surface_, GetExecutionContext(),
IdentifiabilityBenignStringToken(g_empty_string));
// After this call, the execution context may be invalid.
callbacks_->OnSuccess(nullptr, stream);
callbacks_->OnSuccess(stream);
is_resolved_ = true;
}

Expand Down
3 changes: 1 addition & 2 deletions blink/renderer/modules/mediastream/user_media_request.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,7 @@ class MODULES_EXPORT UserMediaRequest final
public:
virtual ~Callbacks() = default;

virtual void OnSuccess(ScriptWrappable* callback_this_value,
MediaStream*) = 0;
virtual void OnSuccess(MediaStream*) = 0;
virtual void OnError(ScriptWrappable* callback_this_value,
const V8MediaStreamError* error) = 0;

Expand Down

0 comments on commit 39d7fb2

Please sign in to comment.