summaryrefslogtreecommitdiffstats
path: root/chromium/net/proxy/proxy_resolver_v8.h
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/net/proxy/proxy_resolver_v8.h')
-rw-r--r--chromium/net/proxy/proxy_resolver_v8.h23
1 files changed, 9 insertions, 14 deletions
diff --git a/chromium/net/proxy/proxy_resolver_v8.h b/chromium/net/proxy/proxy_resolver_v8.h
index 76ec7252700..c754e311247 100644
--- a/chromium/net/proxy/proxy_resolver_v8.h
+++ b/chromium/net/proxy/proxy_resolver_v8.h
@@ -10,6 +10,10 @@
#include "net/base/net_export.h"
#include "net/proxy/proxy_resolver.h"
+namespace gin {
+class IsolateHolder;
+} // namespace gin
+
namespace v8 {
class HeapStatistics;
class Isolate;
@@ -86,23 +90,14 @@ class NET_EXPORT_PRIVATE ProxyResolverV8 : public ProxyResolver {
virtual void CancelRequest(RequestHandle request) OVERRIDE;
virtual LoadState GetLoadState(RequestHandle request) const OVERRIDE;
virtual void CancelSetPacScript() OVERRIDE;
- virtual void PurgeMemory() OVERRIDE;
virtual int SetPacScript(
const scoped_refptr<ProxyResolverScriptData>& script_data,
const net::CompletionCallback& /*callback*/) OVERRIDE;
- // Remember the default Isolate, must be called from the main thread. This
- // hack can be removed when the "default Isolate" concept is gone.
- static void RememberDefaultIsolate();
-
-#if defined(OS_WIN)
- // Create an isolate to use for the proxy resolver. Until the "default
- // Isolate" concept is gone, it is preferable to invoke
- // RememberDefaultIsolate() as creating a new Isolate in additional to the
- // default Isolate will waste a few MB of memory and the runtime it took to
- // create the default Isolate.
- static void CreateIsolate();
-#endif
+ // Create an isolate to use for the proxy resolver. If the embedder invokes
+ // this method multiple times, it must be invoked in a thread safe manner,
+ // e.g. always from the same thread.
+ static void EnsureIsolateCreated();
static v8::Isolate* GetDefaultIsolate();
@@ -112,7 +107,7 @@ class NET_EXPORT_PRIVATE ProxyResolverV8 : public ProxyResolver {
static size_t GetUsedHeapSize();
private:
- static v8::Isolate* g_default_isolate_;
+ static gin::IsolateHolder* g_proxy_resolver_isolate_;
// Context holds the Javascript state for the most recently loaded PAC
// script. It corresponds with the data from the last call to