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

Unified Diff: test/cctest/cctest.h

Issue 12033011: Add Isolate parameter to Persistent class. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Added explicit Created 7 years, 11 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/profile-generator.cc ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/cctest.h
diff --git a/test/cctest/cctest.h b/test/cctest/cctest.h
index f9f3b420f20eaf341efabaf7ca612fdbde68755e..44690b38aea6b935ccf985862e29bce1a7b4b543 100644
--- a/test/cctest/cctest.h
+++ b/test/cctest/cctest.h
@@ -179,11 +179,13 @@ class LocalContext {
v8::Handle<v8::Value> global_object = v8::Handle<v8::Value>())
: context_(v8::Context::New(extensions, global_template, global_object)) {
context_->Enter();
+ // We can't do this later perhaps because of a fatal error.
+ isolate_ = context_->GetIsolate();
}
virtual ~LocalContext() {
context_->Exit();
- context_.Dispose();
+ context_.Dispose(isolate_);
}
v8::Context* operator->() { return *context_; }
@@ -196,6 +198,7 @@ class LocalContext {
private:
v8::Persistent<v8::Context> context_;
+ v8::Isolate* isolate_;
};
« no previous file with comments | « src/profile-generator.cc ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698