Index: android_armeabi-v7a/libadblockplus.a
diff --git a/android_armeabi-v7a/libadblockplus.a b/android_armeabi-v7a/libadblockplus.a
index 23daa7a16fe1094d60fcf547192bc64302872222..d6381f507738898d25da4680787df10ed999aa52 100644
Binary files a/android_armeabi-v7a/libadblockplus.a and b/android_armeabi-v7a/libadblockplus.a differ
Index: android_armeabi-v7a/libv8_base.a
diff --git a/android_armeabi-v7a/libv8_base.a b/android_armeabi-v7a/libv8_base.a
index b59b01cb12a051ac5564dcc88ffafe0ea17bfdaf..5face6ee44db7c389397d439b521b0e51939d63d 100644
Binary files a/android_armeabi-v7a/libv8_base.a and b/android_armeabi-v7a/libv8_base.a differ
Index: android_armeabi-v7a/libv8_snapshot.a
diff --git a/android_armeabi-v7a/libv8_snapshot.a b/android_armeabi-v7a/libv8_snapshot.a
index 360cc73c16a89ea69070bd237b539d4d1686186b..2637565143cc15b79d804b64303011ee131d6a28 100644
Binary files a/android_armeabi-v7a/libv8_snapshot.a and b/android_armeabi-v7a/libv8_snapshot.a differ
Index: android_x86/libadblockplus.a
diff --git a/android_x86/libadblockplus.a b/android_x86/libadblockplus.a
index c379d01f25af82934dcd062231a31ecb1a7c83e2..f473c91f81cc49d15d5363959d7fdb1c7338e746 100644
Binary files a/android_x86/libadblockplus.a and b/android_x86/libadblockplus.a differ
Index: android_x86/libv8_base.a
diff --git a/android_x86/libv8_base.a b/android_x86/libv8_base.a
index 431a38c71be864b60f2bf3adfcb05b438fd4c5c8..b31fe076dbff753c34d546c96227d9c1f047c28e 100644
Binary files a/android_x86/libv8_base.a and b/android_x86/libv8_base.a differ
Index: android_x86/libv8_snapshot.a
diff --git a/android_x86/libv8_snapshot.a b/android_x86/libv8_snapshot.a
index b8c0701363e24ce889b7151fd83b8206617f525f..9e3f2124f0765ae8a8b37e34c02868b60a5f0720 100644
Binary files a/android_x86/libv8_snapshot.a and b/android_x86/libv8_snapshot.a differ
Index: include/AdblockPlus/DefaultWebRequest.h
diff --git a/include/AdblockPlus/DefaultWebRequest.h b/include/AdblockPlus/DefaultWebRequest.h
index 83940c299a92b99831a795b0f0189e922e2721c9..0c7e8721f04e6f01080a10c220c6011b4c399765 100644
--- a/include/AdblockPlus/DefaultWebRequest.h
+++ b/include/AdblockPlus/DefaultWebRequest.h
@@ -27,10 +27,21 @@ namespace AdblockPlus
    * on other platforms. A dummy implementation that always reports failure is
    * used if libcurl is not available.
    */
-  class DefaultWebRequest : public WebRequest
+  class DefaultWebRequestSync : public WebRequest
   {
     ServerResponse GET(const std::string& url, const HeaderList& requestHeaders) const;
   };
+
+  class DefaultWebRequest : public IWebRequest
+  {
+  public:
+    explicit DefaultWebRequest(const WebRequestSharedPtr& syncImpl);
+    ~DefaultWebRequest();
+
+    void GET(const std::string& url, const HeaderList& requestHeaders, const GetCallback& getCallback) override;
+  private:
+    WebRequestSharedPtr syncImpl;
+  };
 }
 
 #endif
Index: include/AdblockPlus/FilterEngine.h
diff --git a/include/AdblockPlus/FilterEngine.h b/include/AdblockPlus/FilterEngine.h
index bbfb2e1202ebe7f0eb41d631bade10dd8b102d46..537142f8c97d39b572a6bcff6ce76644fccecec1 100644
--- a/include/AdblockPlus/FilterEngine.h
+++ b/include/AdblockPlus/FilterEngine.h
@@ -255,10 +255,11 @@ namespace AdblockPlus
     typedef std::function<void(Notification&&)> ShowNotificationCallback;
 
     /**
-     * Callback function returning false when current connection is not
-     * allowedConnectionType, e.g. because it is a metered connection.
+     * Asynchronous callback function passing false when current connection
+     * type does not correspond to allowedConnectionType, e.g. because it is a
+     * metered connection.
      */
-    typedef std::function<bool(const std::string* allowedConnectionType)> IsConnectionAllowedCallback;
+    typedef std::function<void(const std::string* allowedConnectionType, const std::function<void(bool)>&)> IsConnectionAllowedAsyncCallback;
 
     /**
      * FilterEngine creation parameters.
@@ -271,11 +272,11 @@ namespace AdblockPlus
        */
       Prefs preconfiguredPrefs;
       /**
-       * `AdblockPlus::FilterEngine::IsConnectionAllowedCallback` a callback
-       * checking whether the request from Adblock Plus should be blocked on
-       * the current connection.
+       * A callback of `AdblockPlus::FilterEngine::IsConnectionAllowedAsyncCallback` type
+       * checking whether the request to download a subscription from Adblock Plus may be performed
+       * on the current connection.
        */
-      IsConnectionAllowedCallback isConnectionAllowedCallback;
+      IsConnectionAllowedAsyncCallback isSubscriptionDowloadAllowedCallback;
     };
 
     /**
Index: include/AdblockPlus/IWebRequest.h
diff --git a/include/AdblockPlus/WebRequest.h b/include/AdblockPlus/IWebRequest.h
similarity index 75%
copy from include/AdblockPlus/WebRequest.h
copy to include/AdblockPlus/IWebRequest.h
index 6c206c9d5c3b8e2229feec11eca8ebb4e2f1abd4..110d25fdebdbdf2530f568ef547a25595da0c5ac 100644
--- a/include/AdblockPlus/WebRequest.h
+++ b/include/AdblockPlus/IWebRequest.h
@@ -15,20 +15,21 @@
  * along with Adblock Plus.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#ifndef ADBLOCK_PLUS_WEB_REQUEST_H
-#define ADBLOCK_PLUS_WEB_REQUEST_H
+#ifndef ADBLOCK_PLUS_IWEB_REQUEST_H
+#define ADBLOCK_PLUS_IWEB_REQUEST_H
 
+#include <cstdint>
+#include <functional>
 #include <memory>
-#include <stdint.h>
-#include <string>
 #include <vector>
+#include <string>
 
 namespace AdblockPlus
 {
   /**
    * List of HTTP headers.
    */
-  typedef std::vector<std::pair<std::string, std::string> > HeaderList;
+  typedef std::vector<std::pair<std::string, std::string>> HeaderList;
 
   /**
    * HTTP response.
@@ -66,15 +67,14 @@ namespace AdblockPlus
   };
 
   /**
-   * Web request interface.
+   * Web request interface used to implement XMLHttpRequest.
    */
-  class WebRequest
+  struct IWebRequest
   {
-  public:
     /**
      * Possible [Mozilla status codes](https://developer.mozilla.org/en/docs/Table_Of_Errors#Network_Errors).
      */
-    enum
+    enum MozillaStatusCode
     {
       NS_OK = 0,
       NS_ERROR_FAILURE = 0x80004005,
@@ -94,21 +94,26 @@ namespace AdblockPlus
       NS_ERROR_NOT_INITIALIZED = 0xc1f30001
     };
 
-    virtual inline ~WebRequest() {};
+    /**
+     * Callback type invoked when the server response is ready.
+     * The parameter is the server response.
+     */
+    typedef std::function<void(const ServerResponse&)> GetCallback;
+    virtual ~IWebRequest() {};
 
     /**
      * Performs a GET request.
      * @param url Request URL.
      * @param requestHeaders Request headers.
-     * @return HTTP response.
+     * @param getCallback to invoke when the server response is ready.
      */
-    virtual ServerResponse GET(const std::string& url, const HeaderList& requestHeaders) const = 0;
+    virtual void GET(const std::string& url, const HeaderList& requestHeaders, const GetCallback& getCallback) = 0;
   };
 
   /**
-   * Shared smart pointer to a `WebRequest` instance.
+   * Unique smart pointer to an instance of `IWebRequest` implementation.
    */
-  typedef std::shared_ptr<WebRequest> WebRequestPtr;
+  typedef std::unique_ptr<IWebRequest> WebRequestPtr;
 }
 
 #endif
Index: include/AdblockPlus/JsEngine.h
diff --git a/include/AdblockPlus/JsEngine.h b/include/AdblockPlus/JsEngine.h
index f54b98febd3d256ac88fa027c572aae948bd24bc..63f929c94a0b481b33ec3270d50a6ab51408540b 100644
--- a/include/AdblockPlus/JsEngine.h
+++ b/include/AdblockPlus/JsEngine.h
@@ -57,6 +57,11 @@ namespace AdblockPlus
   TimerPtr CreateDefaultTimer();
 
   /**
+   * A factory to construct DefaultWebRequest.
+   */
+  WebRequestPtr CreateDefaultWebRequest();
+
+  /**
    * Scope based isolate manager. Creates a new isolate instance on
    * constructing and disposes it on destructing.
    */
@@ -77,11 +82,6 @@ namespace AdblockPlus
   };
 
   /**
-   * Shared smart pointer to ScopedV8Isolate instance;
-   */
-  typedef std::shared_ptr<ScopedV8Isolate> ScopedV8IsolatePtr;
-
-  /**
    * JavaScript engine used by `FilterEngine`, wraps v8.
    */
   class JsEngine : public std::enable_shared_from_this<JsEngine>
@@ -120,13 +120,14 @@ namespace AdblockPlus
      * Creates a new JavaScript engine instance.
      * @param appInfo Information about the app.
      * @param timer Implementation of timer.
+     * @param webRequest Implementation of web request.
      * @param isolate v8::Isolate wrapper. This parameter should be considered
      *        as a temporary hack for tests, it will go away. Issue #3593.
      * @return New `JsEngine` instance.
      */
     static JsEnginePtr New(const AppInfo& appInfo = AppInfo(),
       TimerPtr timer = CreateDefaultTimer(),
-      const ScopedV8IsolatePtr& isolate = ScopedV8IsolatePtr(new ScopedV8Isolate()));
+      WebRequestPtr webRequest = CreateDefaultWebRequest());
 
     /**
      * Registers the callback function for an event.
@@ -241,6 +242,13 @@ namespace AdblockPlus
      */
     static void ScheduleTimer(const v8::Arguments& arguments);
 
+    /*
+     * Private functionality required to implement web requests.
+     * @param arguments `v8::Arguments` is the arguments received in C++
+     * callback associated for global GET method.
+     */
+    static void ScheduleWebRequest(const v8::Arguments& arguments);
+
     /**
      * Converts v8 arguments to `JsValue` objects.
      * @param arguments `v8::Arguments` object containing the arguments to
@@ -263,17 +271,12 @@ namespace AdblockPlus
     void SetFileSystem(const FileSystemPtr& val);
 
     /**
-     * @see `SetWebRequest()`.
-     */
-    WebRequestPtr GetWebRequest() const;
-
-    /**
      * Sets the `WebRequest` implementation used for XMLHttpRequests.
      * Setting this is optional, the engine will use a `DefaultWebRequest`
      * instance by default, which might be sufficient.
      * @param The `WebRequest` instance to use.
      */
-    void SetWebRequest(const WebRequestPtr& val);
+    void SetWebRequest(const WebRequestSharedPtr& val);
 
     /**
      * @see `SetLogSystem()`.
@@ -301,22 +304,26 @@ namespace AdblockPlus
      */
     v8::Isolate* GetIsolate()
     {
-      return isolate->Get();
+      return isolate.Get();
     }
 
+    /**
+     * Notifies JS engine about critically low memory what should cause a
+     * garbage collection.
+     */
+    void NotifyLowMemory();
   private:
     void CallTimerTask(const JsWeakValuesID& timerParamsID);
 
-    explicit JsEngine(const ScopedV8IsolatePtr& isolate, TimerPtr timer);
+    explicit JsEngine(TimerPtr timer, WebRequestPtr webRequest);
 
     JsValue GetGlobalObject();
 
     /// Isolate must be disposed only after disposing of all objects which are
     /// using it.
-    ScopedV8IsolatePtr isolate;
+    ScopedV8Isolate isolate;
 
     FileSystemPtr fileSystem;
-    WebRequestPtr webRequest;
     LogSystemPtr logSystem;
     std::unique_ptr<v8::Persistent<v8::Context>> context;
     EventMap eventCallbacks;
@@ -324,6 +331,8 @@ namespace AdblockPlus
     JsWeakValuesLists jsWeakValuesLists;
     std::mutex jsWeakValuesListsMutex;
     TimerPtr timer;
+    WebRequestPtr webRequest;
+    WebRequestSharedPtr webRequestLegacy;
   };
 }
 
Index: include/AdblockPlus/WebRequest.h
diff --git a/include/AdblockPlus/WebRequest.h b/include/AdblockPlus/WebRequest.h
index 6c206c9d5c3b8e2229feec11eca8ebb4e2f1abd4..a98ab092d1d1f3d7e90a03d6c6551429c7955f9d 100644
--- a/include/AdblockPlus/WebRequest.h
+++ b/include/AdblockPlus/WebRequest.h
@@ -18,82 +18,16 @@
 #ifndef ADBLOCK_PLUS_WEB_REQUEST_H
 #define ADBLOCK_PLUS_WEB_REQUEST_H
 
-#include <memory>
-#include <stdint.h>
-#include <string>
-#include <vector>
+#include "IWebRequest.h"
 
 namespace AdblockPlus
 {
   /**
-   * List of HTTP headers.
-   */
-  typedef std::vector<std::pair<std::string, std::string> > HeaderList;
-
-  /**
-   * HTTP response.
-   */
-  struct ServerResponse
-  {
-    //@{
-    /**
-     * [Mozilla status code](https://developer.mozilla.org/en/docs/Table_Of_Errors#Network_Errors)
-     * indicating the network-level request status.
-     * This should be 0 (NS_OK) if the request succeeded. Note that this should
-     * be NS_OK if the server responded with an error code like "404 Not Found".
-     */
-#ifdef _WIN32
-    __int64 status;
-#else
-    int64_t status;
-#endif
-    //@}
-
-    /**
-     * List of response headers.
-     */
-    HeaderList responseHeaders;
-
-    /**
-     * HTTP status of the response (e.g.\ 404).
-     */
-    int responseStatus;
-
-    /**
-     * Body text of the response.
-     */
-    std::string responseText;
-  };
-
-  /**
    * Web request interface.
    */
   class WebRequest
   {
   public:
-    /**
-     * Possible [Mozilla status codes](https://developer.mozilla.org/en/docs/Table_Of_Errors#Network_Errors).
-     */
-    enum
-    {
-      NS_OK = 0,
-      NS_ERROR_FAILURE = 0x80004005,
-      NS_ERROR_OUT_OF_MEMORY = 0x8007000e,
-      NS_ERROR_MALFORMED_URI = 0x804b000a,
-      NS_ERROR_CONNECTION_REFUSED = 0x804b000d,
-      NS_ERROR_NET_TIMEOUT = 0x804b000e,
-      NS_ERROR_NO_CONTENT = 0x804b0011,
-      NS_ERROR_UNKNOWN_PROTOCOL = 0x804b0012,
-      NS_ERROR_NET_RESET = 0x804b0014,
-      NS_ERROR_UNKNOWN_HOST = 0x804b001e,
-      NS_ERROR_REDIRECT_LOOP = 0x804b001f,
-      NS_ERROR_UNKNOWN_PROXY_HOST = 0x804b002a,
-      NS_ERROR_NET_INTERRUPT = 0x804b0047,
-      NS_ERROR_UNKNOWN_PROXY_CONNECTION_REFUSED = 0x804b0048,
-      NS_CUSTOM_ERROR_BASE = 0x80850000,
-      NS_ERROR_NOT_INITIALIZED = 0xc1f30001
-    };
-
     virtual inline ~WebRequest() {};
 
     /**
@@ -108,7 +42,7 @@ namespace AdblockPlus
   /**
    * Shared smart pointer to a `WebRequest` instance.
    */
-  typedef std::shared_ptr<WebRequest> WebRequestPtr;
+  typedef std::shared_ptr<WebRequest> WebRequestSharedPtr;
 }
 
 #endif
