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

Unified Diff: test/cctest/test-regexp.cc

Issue 15038002: Revert "deprecate Context::New which returns Persistent" (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 7 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 | « test/cctest/test-random.cc ('k') | test/cctest/test-serialize.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-regexp.cc
diff --git a/test/cctest/test-regexp.cc b/test/cctest/test-regexp.cc
index f311dcc578c0df66a65c409c96772c210203951b..4c05aa59385b26510d87135dd56a66c78accd36f 100644
--- a/test/cctest/test-regexp.cc
+++ b/test/cctest/test-regexp.cc
@@ -711,17 +711,19 @@ typedef RegExpMacroAssemblerMIPS ArchRegExpMacroAssembler;
class ContextInitializer {
public:
ContextInitializer()
- : scope_(v8::Isolate::GetCurrent()),
- env_(v8::Context::New(v8::Isolate::GetCurrent())),
+ : env_(),
+ scope_(v8::Isolate::GetCurrent()),
zone_(Isolate::Current()->runtime_zone(), DELETE_ON_EXIT) {
+ env_ = v8::Context::New();
env_->Enter();
}
~ContextInitializer() {
env_->Exit();
+ env_.Dispose(env_->GetIsolate());
}
private:
+ v8::Persistent<v8::Context> env_;
v8::HandleScope scope_;
- v8::Handle<v8::Context> env_;
v8::internal::ZoneScope zone_;
};
« no previous file with comments | « test/cctest/test-random.cc ('k') | test/cctest/test-serialize.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698