Index: src/bootstrapper.h |
diff --git a/src/bootstrapper.h b/src/bootstrapper.h |
index fead45604fb46829d0b3a29893c139030d86110b..e33415eeb9ca5f9e5157f0bf23a8b93cff8af286 100644 |
--- a/src/bootstrapper.h |
+++ b/src/bootstrapper.h |
@@ -65,7 +65,7 @@ class SourceCodeCache BASE_EMBEDDED { |
} |
void Add(Vector<const char> name, Handle<SharedFunctionInfo> shared) { |
- HandleScope scope; |
+ HandleScope scope(shared->GetIsolate()); |
int length = cache_->length(); |
Handle<FixedArray> new_array = |
FACTORY->NewFixedArray(length + 2, TENURED); |
@@ -95,7 +95,6 @@ class Bootstrapper { |
// Creates a JavaScript Global Context with initial object graph. |
// The returned value is a global handle casted to V8Environment*. |
Handle<Context> CreateEnvironment( |
- Isolate* isolate, |
Handle<Object> global_object, |
v8::Handle<v8::ObjectTemplate> global_template, |
v8::ExtensionConfiguration* extensions); |
@@ -132,6 +131,7 @@ class Bootstrapper { |
SourceCodeCache* extensions_cache() { return &extensions_cache_; } |
private: |
+ Isolate* isolate_; |
typedef int NestingCounterType; |
NestingCounterType nesting_; |
SourceCodeCache extensions_cache_; |
@@ -144,7 +144,7 @@ class Bootstrapper { |
friend class Isolate; |
friend class NativesExternalStringResource; |
- Bootstrapper(); |
+ explicit Bootstrapper(Isolate* isolate); |
DISALLOW_COPY_AND_ASSIGN(Bootstrapper); |
}; |
@@ -152,15 +152,18 @@ class Bootstrapper { |
class BootstrapperActive BASE_EMBEDDED { |
public: |
- BootstrapperActive() { |
- ++Isolate::Current()->bootstrapper()->nesting_; |
+ explicit BootstrapperActive(Bootstrapper* bootstrapper) |
+ : bootstrapper_(bootstrapper) { |
+ ++bootstrapper_->nesting_; |
} |
~BootstrapperActive() { |
- --Isolate::Current()->bootstrapper()->nesting_; |
+ --bootstrapper_->nesting_; |
} |
private: |
+ Bootstrapper* bootstrapper_; |
+ |
DISALLOW_COPY_AND_ASSIGN(BootstrapperActive); |
}; |