Browse Source

isolates: rename node::Isolate member isolate_ to v8_isolate_

v0.7.4-release
Ben Noordhuis 13 years ago
committed by Ryan Dahl
parent
commit
9d71e74491
  1. 12
      src/node_isolate.cc
  2. 6
      src/node_isolate.h

12
src/node_isolate.cc

@ -38,14 +38,14 @@ Isolate::Isolate(uv_loop_t* loop) {
SLIST_INIT(&at_exit_callbacks_); SLIST_INIT(&at_exit_callbacks_);
loop_ = loop; loop_ = loop;
isolate_ = v8::Isolate::GetCurrent(); v8_isolate_ = v8::Isolate::GetCurrent();
if (isolate_ == NULL) { if (v8_isolate_ == NULL) {
isolate_ = v8::Isolate::New(); v8_isolate_ = v8::Isolate::New();
isolate_->Enter(); v8_isolate_->Enter();
} }
assert(isolate_->GetData() == NULL); assert(v8_isolate_->GetData() == NULL);
isolate_->SetData(this); v8_isolate_->SetData(this);
globals_init(&globals_); globals_init(&globals_);
} }

6
src/node_isolate.h

@ -57,9 +57,9 @@ public:
return loop_; return loop_;
} }
operator v8::Isolate*() { v8::Isolate* GetV8Isolate() {
NODE_ISOLATE_CHECK(this); NODE_ISOLATE_CHECK(this);
return isolate_; return v8_isolate_;
} }
/* Register a handler that should run when the current isolate exits. /* Register a handler that should run when the current isolate exits.
@ -82,7 +82,7 @@ private:
}; };
SLIST_HEAD(AtExitCallbacks, AtExitCallbackInfo) at_exit_callbacks_; SLIST_HEAD(AtExitCallbacks, AtExitCallbackInfo) at_exit_callbacks_;
v8::Isolate* isolate_; v8::Isolate* v8_isolate_;
uv_loop_t* loop_; uv_loop_t* loop_;
// Global variables for this isolate. // Global variables for this isolate.

Loading…
Cancel
Save