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

Unified Diff: src/api.cc

Issue 6903154: Revert "This implements per-isolate locking and unlocking, including tests" (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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/execution.cc » ('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 0ec27fe423d05562e0bee744d2e3349fe8d5361f..84c0be46c901a64bad6c9d859057028c84b7e264 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -53,6 +53,7 @@
#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()); \
@@ -289,7 +290,6 @@ 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");
}
@@ -5687,8 +5687,9 @@ 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));
@@ -5706,7 +5707,7 @@ int HandleScopeImplementer::ArchiveSpacePerThread() {
char* HandleScopeImplementer::RestoreThread(char* storage) {
memcpy(this, storage, sizeof(*this));
- *isolate_->handle_scope_data() = handle_scope_data_;
+ *Isolate::Current()->handle_scope_data() = handle_scope_data_;
return storage + ArchiveSpacePerThread();
}
@@ -5732,7 +5733,7 @@ void HandleScopeImplementer::IterateThis(ObjectVisitor* v) {
void HandleScopeImplementer::Iterate(ObjectVisitor* v) {
v8::ImplementationUtilities::HandleScopeData* current =
- isolate_->handle_scope_data();
+ Isolate::Current()->handle_scope_data();
handle_scope_data_ = *current;
IterateThis(v);
}
« no previous file with comments | « src/api.h ('k') | src/execution.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698