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

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

Issue 17827005: Get rid of ZoneScope completely. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Suggestions from danno Created 7 years, 6 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-dataflow.cc ('k') | test/cctest/test-regexp.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-liveedit.cc
diff --git a/test/cctest/test-liveedit.cc b/test/cctest/test-liveedit.cc
index 2c89a387dc900468d8d05d019d9f1f229e949aea..d02f4f46e883e41deecef7ad028f5b9e4ddc53bf 100644
--- a/test/cctest/test-liveedit.cc
+++ b/test/cctest/test-liveedit.cc
@@ -76,19 +76,20 @@ class DiffChunkStruct : public ZoneObject {
class ListDiffOutputWriter : public Comparator::Output {
public:
- explicit ListDiffOutputWriter(DiffChunkStruct** next_chunk_pointer)
- : next_chunk_pointer_(next_chunk_pointer) {
+ explicit ListDiffOutputWriter(DiffChunkStruct** next_chunk_pointer,
+ Zone* zone)
+ : next_chunk_pointer_(next_chunk_pointer), zone_(zone) {
(*next_chunk_pointer_) = NULL;
}
void AddChunk(int pos1, int pos2, int len1, int len2) {
- current_chunk_ = new(Isolate::Current()->runtime_zone()) DiffChunkStruct(
- pos1, pos2, len1, len2);
+ current_chunk_ = new(zone_) DiffChunkStruct(pos1, pos2, len1, len2);
(*next_chunk_pointer_) = current_chunk_;
next_chunk_pointer_ = &current_chunk_->next;
}
private:
DiffChunkStruct** next_chunk_pointer_;
DiffChunkStruct* current_chunk_;
+ Zone* zone_;
};
@@ -96,10 +97,10 @@ void CompareStringsOneWay(const char* s1, const char* s2,
int expected_diff_parameter = -1) {
StringCompareInput input(s1, s2);
- ZoneScope zone_scope(Isolate::Current()->runtime_zone(), DELETE_ON_EXIT);
+ Zone zone(Isolate::Current());
DiffChunkStruct* first_chunk;
- ListDiffOutputWriter writer(&first_chunk);
+ ListDiffOutputWriter writer(&first_chunk, &zone);
Comparator::CalculateDifference(&input, &writer);
« no previous file with comments | « test/cctest/test-dataflow.cc ('k') | test/cctest/test-regexp.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698