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

Unified Diff: gin/per_isolate_data.h

Issue 2478813002: When an Isolate is configured to use lockers, foreground tasks need to lock (Closed)
Patch Set: updates Created 4 years, 1 month 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
« no previous file with comments | « gin/isolate_holder.cc ('k') | gin/per_isolate_data.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gin/per_isolate_data.h
diff --git a/gin/per_isolate_data.h b/gin/per_isolate_data.h
index 9b804aa4ba5d885dc96d3d0d903f430ab7dfae1f..4b4037b1b8b2b872c4a697c93124b12627cfe9e6 100644
--- a/gin/per_isolate_data.h
+++ b/gin/per_isolate_data.h
@@ -11,6 +11,7 @@
#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "gin/gin_export.h"
+#include "gin/public/isolate_holder.h"
#include "gin/public/v8_idle_task_runner.h"
#include "gin/public/wrapper_info.h"
#include "v8/include/v8.h"
@@ -29,7 +30,9 @@ class WrappableBase;
// class stores all the Gin-related data that varies per isolate.
class GIN_EXPORT PerIsolateData {
public:
- PerIsolateData(v8::Isolate* isolate, v8::ArrayBuffer::Allocator* allocator);
+ PerIsolateData(v8::Isolate* isolate,
+ v8::ArrayBuffer::Allocator* allocator,
+ IsolateHolder::AccessMode access_mode);
~PerIsolateData();
static PerIsolateData* From(v8::Isolate* isolate);
@@ -74,6 +77,8 @@ class GIN_EXPORT PerIsolateData {
return idle_task_runner_.get();
}
+ IsolateHolder::AccessMode access_mode() const { return access_mode_; }
+
private:
typedef std::map<
WrapperInfo*, v8::Eternal<v8::ObjectTemplate> > ObjectTemplateMap;
@@ -88,6 +93,7 @@ class GIN_EXPORT PerIsolateData {
// owned by the IsolateHolder, which also owns the PerIsolateData.
v8::Isolate* isolate_;
v8::ArrayBuffer::Allocator* allocator_;
+ IsolateHolder::AccessMode access_mode_;
ObjectTemplateMap object_templates_;
FunctionTemplateMap function_templates_;
IndexedPropertyInterceptorMap indexed_interceptors_;
« no previous file with comments | « gin/isolate_holder.cc ('k') | gin/per_isolate_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698