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

Unified Diff: gin/isolate_holder.cc

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: Adding explicit. 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 | « no previous file | gin/public/isolate_holder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gin/isolate_holder.cc
diff --git a/gin/isolate_holder.cc b/gin/isolate_holder.cc
index 9ef41d374a0625296ab82a5e02b995ffc9383274..9a68e0f8aaf4be8fe866faee8f62c21e23adac12 100644
--- a/gin/isolate_holder.cc
+++ b/gin/isolate_holder.cc
@@ -22,7 +22,11 @@ namespace {
v8::ArrayBuffer::Allocator* g_array_buffer_allocator = nullptr;
} // namespace
-IsolateHolder::IsolateHolder() {
+IsolateHolder::IsolateHolder() : IsolateHolder(AccessMode::kSingleThread) {
+}
+
+IsolateHolder::IsolateHolder(AccessMode access_mode)
+ : access_mode_(access_mode) {
v8::ArrayBuffer::Allocator* allocator = g_array_buffer_allocator;
CHECK(allocator) << "You need to invoke gin::IsolateHolder::Initialize first";
v8::Isolate::CreateParams params;
« no previous file with comments | « no previous file | gin/public/isolate_holder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698