Remove noexcept from AsyncSocket::prepareReadBuffer
authorStepan Palamarchuk <stepan@fb.com>
Mon, 7 Nov 2016 20:37:52 +0000 (12:37 -0800)
committerFacebook Github Bot <facebook-github-bot-bot@fb.com>
Mon, 7 Nov 2016 20:38:30 +0000 (12:38 -0800)
Summary:
`prepareReadBuffer` is calling a callback function that is not a noexcept
also `prepareReadBuffer` is being called only from one place, that wraps this function call with try/catch.

Reviewed By: jmswen

Differential Revision: D4138424

fbshipit-source-id: a05bdd6f741761567a7d0291017c285b0bf15522

folly/io/async/AsyncSSLSocket.cpp
folly/io/async/AsyncSSLSocket.h
folly/io/async/AsyncSocket.cpp
folly/io/async/AsyncSocket.h

index 8a07c41d1a37f473ac880b70975f9ee2df441f32..8804b8d1ff64633303e23c2c8d99024618ff5498 100644 (file)
@@ -1180,7 +1180,7 @@ void AsyncSSLSocket::setBufferMovableEnabled(bool enabled) {
   bufferMovableEnabled_ = enabled;
 }
 
-void AsyncSSLSocket::prepareReadBuffer(void** buf, size_t* buflen) noexcept {
+void AsyncSSLSocket::prepareReadBuffer(void** buf, size_t* buflen) {
   CHECK(readCallback_);
   if (isBufferMovable_) {
     *buf = nullptr;
index f2f9e7e7f1e3a2c0f415a7cda375ec1eaa7f1bf5..6f8b14644bba8fa7875d021bfafa01a20917e436 100644 (file)
@@ -668,7 +668,7 @@ class AsyncSSLSocket : public virtual AsyncSocket {
 
   // Inherit event notification methods from AsyncSocket except
   // the following.
-  void prepareReadBuffer(void** buf, size_t* buflen) noexcept override;
+  void prepareReadBuffer(void** buf, size_t* buflen) override;
   void handleRead() noexcept override;
   void handleWrite() noexcept override;
   void handleAccept() noexcept;
index b1bbba24120eb59fb86c3fbda6b30848b05d0c9c..652f90f5d46cd2578199670dc71c4a5024980459 100644 (file)
@@ -1333,7 +1333,7 @@ AsyncSocket::performRead(void** buf, size_t* buflen, size_t* /* offset */) {
   }
 }
 
-void AsyncSocket::prepareReadBuffer(void** buf, size_t* buflen) noexcept {
+void AsyncSocket::prepareReadBuffer(void** buf, size_t* buflen) {
   // no matter what, buffer should be preapared for non-ssl socket
   CHECK(readCallback_);
   readCallback_->getReadBuffer(buf, buflen);
index 30ae8d8461c9fa3befcc1548cdd2cf12ee20b47b..3f5d715d60952690b5b158fdf5d3f98a9099b4fc 100644 (file)
@@ -767,7 +767,7 @@ class AsyncSocket : virtual public AsyncTransportWrapper {
   void ioReady(uint16_t events) noexcept;
   virtual void checkForImmediateRead() noexcept;
   virtual void handleInitialReadWrite() noexcept;
-  virtual void prepareReadBuffer(void** buf, size_t* buflen) noexcept;
+  virtual void prepareReadBuffer(void** buf, size_t* buflen);
   virtual void handleRead() noexcept;
   virtual void handleWrite() noexcept;
   virtual void handleConnect() noexcept;