[gin] Add a v8::Platform implementation to allow for v8 posting tasks

This currently has no effect unless concurrent sweeping and job based
sweeping is turned on in v8.

BUG=v8:3015
[email protected],[email protected]

Review URL: https://codereview.chromium.org/225413004

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@261872 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/gin/per_isolate_data.h b/gin/per_isolate_data.h
index fbdbca7..bffe5fb 100644
--- a/gin/per_isolate_data.h
+++ b/gin/per_isolate_data.h
@@ -8,10 +8,15 @@
 #include <map>
 
 #include "base/basictypes.h"
+#include "base/memory/ref_counted.h"
 #include "gin/gin_export.h"
 #include "gin/public/wrapper_info.h"
 #include "v8/include/v8.h"
 
+namespace base {
+class MessageLoopProxy;
+}
+
 namespace gin {
 
 class IndexedPropertyInterceptor;
@@ -60,6 +65,9 @@
 
   v8::Isolate* isolate() { return isolate_; }
   v8::ArrayBuffer::Allocator* allocator() { return allocator_; }
+  base::MessageLoopProxy* message_loop_proxy() {
+    return message_loop_proxy_.get();
+  }
 
  private:
   typedef std::map<
@@ -79,6 +87,7 @@
   FunctionTemplateMap function_templates_;
   IndexedPropertyInterceptorMap indexed_interceptors_;
   NamedPropertyInterceptorMap named_interceptors_;
+  scoped_refptr<base::MessageLoopProxy> message_loop_proxy_;
 
   DISALLOW_COPY_AND_ASSIGN(PerIsolateData);
 };