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

Unified Diff: net/proxy/proxy_resolver_v8.h

Issue 11959029: Make the v8 Isolate used in the proxy resolver explicit. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Created 7 years, 11 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: net/proxy/proxy_resolver_v8.h
diff --git a/net/proxy/proxy_resolver_v8.h b/net/proxy/proxy_resolver_v8.h
index 823e93a08cde9c70c70e02df077f34c624a1cac9..326b5a4ad2cdf6b76a3cabe63273912e28637d99 100644
--- a/net/proxy/proxy_resolver_v8.h
+++ b/net/proxy/proxy_resolver_v8.h
@@ -10,6 +10,10 @@
#include "net/base/net_export.h"
#include "net/proxy/proxy_resolver.h"
+namespace v8 {
+class Isolate;
+} // namespace v8
+
namespace net {
// Implementation of ProxyResolver that uses V8 to evaluate PAC scripts.
@@ -85,7 +89,14 @@ class NET_EXPORT_PRIVATE ProxyResolverV8 : public ProxyResolver {
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();
+ static v8::Isolate* GetDefaultIsolate();
+
private:
+ static v8::Isolate* g_default_isolate_;
+
// Context holds the Javascript state for the most recently loaded PAC
// script. It corresponds with the data from the last call to
// SetPacScript().

Powered by Google App Engine
This is Rietveld 408576698