OLD | NEW |
---|---|
1 // Copyright 2008 the V8 project authors. All rights reserved. | 1 // Copyright 2008 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 559 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
570 i::Isolate* main_isolate() { return main_isolate_; } | 570 i::Isolate* main_isolate() { return main_isolate_; } |
571 | 571 |
572 private: | 572 private: |
573 i::Isolate* main_isolate_; | 573 i::Isolate* main_isolate_; |
574 i::HandleScope handle_scope_; | 574 i::HandleScope handle_scope_; |
575 }; | 575 }; |
576 | 576 |
577 | 577 |
578 class HandleAndZoneScope : public InitializedHandleScope { | 578 class HandleAndZoneScope : public InitializedHandleScope { |
579 public: | 579 public: |
580 HandleAndZoneScope() : main_zone_(main_isolate()) {} | 580 HandleAndZoneScope() : main_zone_() {} |
Michael Starzinger
2015/01/23 14:21:11
nit: Explicit initializer call can be dropped.
danno
2015/01/23 14:45:20
Done.
| |
581 | 581 |
582 // Prefixing the below with main_ reduces a lot of naming clashes. | 582 // Prefixing the below with main_ reduces a lot of naming clashes. |
583 i::Zone* main_zone() { return &main_zone_; } | 583 i::Zone* main_zone() { return &main_zone_; } |
584 | 584 |
585 private: | 585 private: |
586 i::Zone main_zone_; | 586 i::Zone main_zone_; |
587 }; | 587 }; |
588 | 588 |
589 #endif // ifndef CCTEST_H_ | 589 #endif // ifndef CCTEST_H_ |
OLD | NEW |