Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
isolates: rename node::Isolate member isolate_ to v8_isolate_
Browse files Browse the repository at this point in the history
  • Loading branch information
bnoordhuis committed Dec 9, 2011
1 parent 19640de commit 7597cad
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
12 changes: 6 additions & 6 deletions src/node_isolate.cc
Expand Up @@ -38,14 +38,14 @@ Isolate::Isolate(uv_loop_t* loop) {
SLIST_INIT(&at_exit_callbacks_);
loop_ = loop;

isolate_ = v8::Isolate::GetCurrent();
if (isolate_ == NULL) {
isolate_ = v8::Isolate::New();
isolate_->Enter();
v8_isolate_ = v8::Isolate::GetCurrent();
if (v8_isolate_ == NULL) {
v8_isolate_ = v8::Isolate::New();
v8_isolate_->Enter();
}

assert(isolate_->GetData() == NULL);
isolate_->SetData(this);
assert(v8_isolate_->GetData() == NULL);
v8_isolate_->SetData(this);

globals_init(&globals_);
}
Expand Down
6 changes: 3 additions & 3 deletions src/node_isolate.h
Expand Up @@ -57,9 +57,9 @@ class Isolate {
return loop_;
}

operator v8::Isolate*() {
v8::Isolate* GetV8Isolate() {
NODE_ISOLATE_CHECK(this);
return isolate_;
return v8_isolate_;
}

/* Register a handler that should run when the current isolate exits.
Expand All @@ -82,7 +82,7 @@ class Isolate {
};

SLIST_HEAD(AtExitCallbacks, AtExitCallbackInfo) at_exit_callbacks_;
v8::Isolate* isolate_;
v8::Isolate* v8_isolate_;
uv_loop_t* loop_;

// Global variables for this isolate.
Expand Down

0 comments on commit 7597cad

Please sign in to comment.