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

Unified Diff: gin/public/isolate_holder.h

Issue 1100743004: Adding field to tell if gin::IsolateHolder needs lock to be accessed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@discardable
Patch Set: Rename. Created 5 years, 8 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
« no previous file with comments | « gin/isolate_holder.cc ('k') | net/proxy/proxy_resolver_v8.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gin/public/isolate_holder.h
diff --git a/gin/public/isolate_holder.h b/gin/public/isolate_holder.h
index ba75cd8f11654f653806776be1c750acd78e75a5..dc331fff9852b9a1242b82c7b50692f32c5fb867 100644
--- a/gin/public/isolate_holder.h
+++ b/gin/public/isolate_holder.h
@@ -27,7 +27,14 @@ class GIN_EXPORT IsolateHolder {
kStrictMode
};
+ // Stores whether the client uses v8::Locker to access the isolate.
+ enum AccessMode {
+ kSingleThread,
+ kUseLocker
+ };
+
IsolateHolder();
+ IsolateHolder(AccessMode access_mode);
Ryan Sleevi 2015/04/23 20:32:14 explicit
~IsolateHolder();
// Should be invoked once before creating IsolateHolder instances to
@@ -52,10 +59,14 @@ class GIN_EXPORT IsolateHolder {
// thread.
void RemoveRunMicrotasksObserver();
+ // This method returns if v8::Locker is needed to access isolate.
+ AccessMode access_mode() const { return access_mode_; }
+
private:
v8::Isolate* isolate_;
scoped_ptr<PerIsolateData> isolate_data_;
scoped_ptr<RunMicrotasksObserver> task_observer_;
+ AccessMode access_mode_;
DISALLOW_COPY_AND_ASSIGN(IsolateHolder);
};
« no previous file with comments | « gin/isolate_holder.cc ('k') | net/proxy/proxy_resolver_v8.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698