OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |