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

Unified Diff: third_party/WebKit/Source/modules/imagecapture/ImageCapture.cpp

Issue 2049003002: Wrap GCed raw pointer parameters of WTF::bind with Persistent (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: s/wrapCrossThreadPersistent/wrapPersistent/ Created 4 years, 6 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/imagecapture/ImageCapture.cpp
diff --git a/third_party/WebKit/Source/modules/imagecapture/ImageCapture.cpp b/third_party/WebKit/Source/modules/imagecapture/ImageCapture.cpp
index fb0aaf17fdacc883ca4376646bbed6d58d00a81a..f0155258d9dd8254ec6c709bdd91a2fe1303125b 100644
--- a/third_party/WebKit/Source/modules/imagecapture/ImageCapture.cpp
+++ b/third_party/WebKit/Source/modules/imagecapture/ImageCapture.cpp
@@ -92,7 +92,7 @@ ScriptPromise ImageCapture::getPhotoCapabilities(ScriptState* scriptState, Excep
// m_streamTrack->component()->source()->id() is the renderer "name" of the camera;
// TODO(mcasas) consider sending the security origin as well:
// scriptState->getExecutionContext()->getSecurityOrigin()->toString()
- m_service->GetCapabilities(m_streamTrack->component()->source()->id(), createBaseCallback(bind<media::mojom::blink::PhotoCapabilitiesPtr>(&ImageCapture::onCapabilities, this, resolver)));
+ m_service->GetCapabilities(m_streamTrack->component()->source()->id(), createBaseCallback(bind<media::mojom::blink::PhotoCapabilitiesPtr>(&ImageCapture::onCapabilities, wrapPersistent(this), wrapPersistent(resolver))));
return promise;
}
@@ -144,7 +144,7 @@ ScriptPromise ImageCapture::takePhoto(ScriptState* scriptState, ExceptionState&
// m_streamTrack->component()->source()->id() is the renderer "name" of the camera;
// TODO(mcasas) consider sending the security origin as well:
// scriptState->getExecutionContext()->getSecurityOrigin()->toString()
- m_service->TakePhoto(m_streamTrack->component()->source()->id(), createBaseCallback(bind<const String&, mojo::WTFArray<uint8_t>>(&ImageCapture::onTakePhoto, this, resolver)));
+ m_service->TakePhoto(m_streamTrack->component()->source()->id(), createBaseCallback(bind<const String&, mojo::WTFArray<uint8_t>>(&ImageCapture::onTakePhoto, wrapPersistent(this), wrapPersistent(resolver))));
return promise;
}

Powered by Google App Engine
This is Rietveld 408576698