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

Side by Side Diff: test/cctest/test-regexp.cc

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, 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « test/cctest/test-mark-compact.cc ('k') | test/cctest/test-serialize.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 696 matching lines...) Expand 10 before | Expand all | Expand 10 after
707 class ContextInitializer { 707 class ContextInitializer {
708 public: 708 public:
709 ContextInitializer() 709 ContextInitializer()
710 : env_(), scope_(), zone_(Isolate::Current()->runtime_zone(), 710 : env_(), scope_(), zone_(Isolate::Current()->runtime_zone(),
711 DELETE_ON_EXIT) { 711 DELETE_ON_EXIT) {
712 env_ = v8::Context::New(); 712 env_ = v8::Context::New();
713 env_->Enter(); 713 env_->Enter();
714 } 714 }
715 ~ContextInitializer() { 715 ~ContextInitializer() {
716 env_->Exit(); 716 env_->Exit();
717 env_.Dispose(); 717 env_.Dispose(env_->GetIsolate());
718 } 718 }
719 private: 719 private:
720 v8::Persistent<v8::Context> env_; 720 v8::Persistent<v8::Context> env_;
721 v8::HandleScope scope_; 721 v8::HandleScope scope_;
722 v8::internal::ZoneScope zone_; 722 v8::internal::ZoneScope zone_;
723 }; 723 };
724 724
725 725
726 static ArchRegExpMacroAssembler::Result Execute(Code* code, 726 static ArchRegExpMacroAssembler::Result Execute(Code* code,
727 String* input, 727 String* input,
(...skipping 1072 matching lines...) Expand 10 before | Expand all | Expand 10 after
1800 ZoneList<CharacterRange> first_only(4, Isolate::Current()->runtime_zone()); 1800 ZoneList<CharacterRange> first_only(4, Isolate::Current()->runtime_zone());
1801 ZoneList<CharacterRange> second_only(4, Isolate::Current()->runtime_zone()); 1801 ZoneList<CharacterRange> second_only(4, Isolate::Current()->runtime_zone());
1802 ZoneList<CharacterRange> both(4, Isolate::Current()->runtime_zone()); 1802 ZoneList<CharacterRange> both(4, Isolate::Current()->runtime_zone());
1803 } 1803 }
1804 1804
1805 1805
1806 TEST(Graph) { 1806 TEST(Graph) {
1807 V8::Initialize(NULL); 1807 V8::Initialize(NULL);
1808 Execute("\\b\\w+\\b", false, true, true); 1808 Execute("\\b\\w+\\b", false, true, true);
1809 } 1809 }
OLDNEW
« no previous file with comments | « test/cctest/test-mark-compact.cc ('k') | test/cctest/test-serialize.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698