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

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

Issue 1425013006: Using override keyword in ObjectVisitor class hierarchy. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 1 month 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
« no previous file with comments | « test/cctest/test-global-handles.cc ('k') | no next file » | 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 4457 matching lines...) Expand 10 before | Expand all | Expand 10 after
4468 // Verify that the pointers in the large object got updated. 4468 // Verify that the pointers in the large object got updated.
4469 for (int i = 0; i < kSize; i += kStep) { 4469 for (int i = 0; i < kSize; i += kStep) {
4470 CHECK_EQ(lo->get(i), *lit); 4470 CHECK_EQ(lo->get(i), *lit);
4471 CHECK(lo->get(i) != old_location); 4471 CHECK(lo->get(i) != old_location);
4472 } 4472 }
4473 } 4473 }
4474 4474
4475 4475
4476 class DummyVisitor : public ObjectVisitor { 4476 class DummyVisitor : public ObjectVisitor {
4477 public: 4477 public:
4478 void VisitPointers(Object** start, Object** end) { } 4478 void VisitPointers(Object** start, Object** end) override {}
4479 }; 4479 };
4480 4480
4481 4481
4482 TEST(DeferredHandles) { 4482 TEST(DeferredHandles) {
4483 CcTest::InitializeVM(); 4483 CcTest::InitializeVM();
4484 Isolate* isolate = CcTest::i_isolate(); 4484 Isolate* isolate = CcTest::i_isolate();
4485 Heap* heap = isolate->heap(); 4485 Heap* heap = isolate->heap();
4486 v8::HandleScope scope(reinterpret_cast<v8::Isolate*>(isolate)); 4486 v8::HandleScope scope(reinterpret_cast<v8::Isolate*>(isolate));
4487 HandleScopeData* data = isolate->handle_scope_data(); 4487 HandleScopeData* data = isolate->handle_scope_data();
4488 Handle<Object> init(heap->empty_string(), isolate); 4488 Handle<Object> init(heap->empty_string(), isolate);
(...skipping 1795 matching lines...) Expand 10 before | Expand all | Expand 10 after
6284 isolate->IncrementJsCallsFromApiCounter(); 6284 isolate->IncrementJsCallsFromApiCounter();
6285 isolate->IncrementJsCallsFromApiCounter(); 6285 isolate->IncrementJsCallsFromApiCounter();
6286 isolate->IncrementJsCallsFromApiCounter(); 6286 isolate->IncrementJsCallsFromApiCounter();
6287 calls_per_ms = memory_reducer->SampleAndGetJsCallsPerMs(4); 6287 calls_per_ms = memory_reducer->SampleAndGetJsCallsPerMs(4);
6288 CheckDoubleEquals(2, calls_per_ms); 6288 CheckDoubleEquals(2, calls_per_ms);
6289 } 6289 }
6290 6290
6291 6291
6292 } // namespace internal 6292 } // namespace internal
6293 } // namespace v8 6293 } // namespace v8
OLDNEW
« no previous file with comments | « test/cctest/test-global-handles.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698