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

Unified Diff: src/api.cc

Issue 6788023: Per-isolate v8::Locker and v8::Unlocker (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fixes for simulator (arm/mips) Created 9 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 | « src/api.h ('k') | src/arm/simulator-arm.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/api.cc
diff --git a/src/api.cc b/src/api.cc
index c72857da644eedb55f4ce93002f73ef7e20b29bf..c5c66a799fd5c07e59074f279fb0b480189e65a6 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -53,7 +53,6 @@
#define LOG_API(isolate, expr) LOG(isolate, ApiEntryCall(expr))
-// TODO(isolates): avoid repeated TLS reads in function prologues.
#ifdef ENABLE_VMSTATE_TRACKING
#define ENTER_V8(isolate) \
ASSERT((isolate)->IsInitialized()); \
@@ -290,6 +289,7 @@ static inline bool EnsureInitializedForIsolate(i::Isolate* isolate,
if (isolate != NULL) {
if (isolate->IsInitialized()) return true;
}
+ ASSERT(isolate == i::Isolate::Current());
return ApiCheck(InitializeHelper(), location, "Error initializing V8");
}
@@ -5739,9 +5739,8 @@ void HandleScopeImplementer::FreeThreadResources() {
char* HandleScopeImplementer::ArchiveThread(char* storage) {
- Isolate* isolate = Isolate::Current();
v8::ImplementationUtilities::HandleScopeData* current =
- isolate->handle_scope_data();
+ isolate_->handle_scope_data();
handle_scope_data_ = *current;
memcpy(storage, this, sizeof(*this));
@@ -5759,7 +5758,7 @@ int HandleScopeImplementer::ArchiveSpacePerThread() {
char* HandleScopeImplementer::RestoreThread(char* storage) {
memcpy(this, storage, sizeof(*this));
- *Isolate::Current()->handle_scope_data() = handle_scope_data_;
+ *isolate_->handle_scope_data() = handle_scope_data_;
return storage + ArchiveSpacePerThread();
}
@@ -5785,7 +5784,7 @@ void HandleScopeImplementer::IterateThis(ObjectVisitor* v) {
void HandleScopeImplementer::Iterate(ObjectVisitor* v) {
v8::ImplementationUtilities::HandleScopeData* current =
- Isolate::Current()->handle_scope_data();
+ isolate_->handle_scope_data();
handle_scope_data_ = *current;
IterateThis(v);
}
« no previous file with comments | « src/api.h ('k') | src/arm/simulator-arm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698