summaryrefslogtreecommitdiffstats
path: root/chromium/gin/context_holder.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/gin/context_holder.cc')
-rw-r--r--chromium/gin/context_holder.cc10
1 files changed, 2 insertions, 8 deletions
diff --git a/chromium/gin/context_holder.cc b/chromium/gin/context_holder.cc
index 32b50518376..241b25622c5 100644
--- a/chromium/gin/context_holder.cc
+++ b/chromium/gin/context_holder.cc
@@ -14,20 +14,14 @@ ContextHolder::ContextHolder(v8::Isolate* isolate)
}
ContextHolder::~ContextHolder() {
- v8::HandleScope handle_scope(isolate());
- v8::Handle<v8::Context> context = this->context();
-
- data_->Detach(context);
+ // PerContextData needs to be destroyed before the context.
data_.reset();
-
- // TODO(abarth): Figure out how to set kResetInDestructor to true.
- context_.Reset();
}
void ContextHolder::SetContext(v8::Handle<v8::Context> context) {
DCHECK(context_.IsEmpty());
context_.Reset(isolate_, context);
- data_.reset(new PerContextData(context));
+ data_.reset(new PerContextData(this, context));
}
} // namespace gin