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

Unified Diff: third_party/WebKit/Source/modules/webusb/USB.cpp

Issue 2091713002: Specialize base::IsWeakReceiver for Blink weak pointers to support base::Bind (1/5) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: +#include for build fix 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/webusb/USB.cpp
diff --git a/third_party/WebKit/Source/modules/webusb/USB.cpp b/third_party/WebKit/Source/modules/webusb/USB.cpp
index d1461fb9d306db3d38b1c04de62915d541984c2c..f06ac114c46066dad206ec99de7a99f1ac35eeb6 100644
--- a/third_party/WebKit/Source/modules/webusb/USB.cpp
+++ b/third_party/WebKit/Source/modules/webusb/USB.cpp
@@ -56,7 +56,7 @@ USB::USB(LocalFrame& frame)
{
ThreadState::current()->registerPreFinalizer(this);
frame.serviceRegistry()->connectToRemoteService(mojo::GetProxy(&m_deviceManager));
- m_deviceManager.set_connection_error_handler(createBaseCallback(bind(&USB::onDeviceManagerConnectionError, WeakPersistentThisPointer<USB>(this))));
+ m_deviceManager.set_connection_error_handler(createBaseCallback(bind(&USB::onDeviceManagerConnectionError, wrapWeakPersistent(this))));
m_deviceManager->SetClient(m_clientBinding.CreateInterfacePtrAndBind());
}
@@ -106,7 +106,7 @@ ScriptPromise USB::requestDevice(ScriptState* scriptState, const USBDeviceReques
return promise;
}
frame->serviceRegistry()->connectToRemoteService(mojo::GetProxy(&m_chooserService));
- m_chooserService.set_connection_error_handler(createBaseCallback(bind(&USB::onChooserServiceConnectionError, WeakPersistentThisPointer<USB>(this))));
+ m_chooserService.set_connection_error_handler(createBaseCallback(bind(&USB::onChooserServiceConnectionError, wrapWeakPersistent(this))));
}
String errorMessage;

Powered by Google App Engine
This is Rietveld 408576698