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

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

Issue 91503002: Mark deprecated APIs with relatively little use as deprecated (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years 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-debug.cc ('k') | test/cctest/test-heap-profiler.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 2949 matching lines...) Expand 10 before | Expand all | Expand 10 after
2960 2960
2961 void ReleaseStackTraceDataTest(const char* source, const char* accessor) { 2961 void ReleaseStackTraceDataTest(const char* source, const char* accessor) {
2962 // Test that the data retained by the Error.stack accessor is released 2962 // Test that the data retained by the Error.stack accessor is released
2963 // after the first time the accessor is fired. We use external string 2963 // after the first time the accessor is fired. We use external string
2964 // to check whether the data is being released since the external string 2964 // to check whether the data is being released since the external string
2965 // resource's callback is fired when the external string is GC'ed. 2965 // resource's callback is fired when the external string is GC'ed.
2966 v8::HandleScope scope(CcTest::isolate()); 2966 v8::HandleScope scope(CcTest::isolate());
2967 SourceResource* resource = new SourceResource(i::StrDup(source)); 2967 SourceResource* resource = new SourceResource(i::StrDup(source));
2968 { 2968 {
2969 v8::HandleScope scope(CcTest::isolate()); 2969 v8::HandleScope scope(CcTest::isolate());
2970 v8::Handle<v8::String> source_string = v8::String::NewExternal(resource); 2970 v8::Handle<v8::String> source_string =
2971 v8::String::NewExternal(CcTest::isolate(), resource);
2971 CcTest::heap()->CollectAllAvailableGarbage(); 2972 CcTest::heap()->CollectAllAvailableGarbage();
2972 v8::Script::Compile(source_string)->Run(); 2973 v8::Script::Compile(source_string)->Run();
2973 CHECK(!resource->IsDisposed()); 2974 CHECK(!resource->IsDisposed());
2974 } 2975 }
2975 // CcTest::heap()->CollectAllAvailableGarbage(); 2976 // CcTest::heap()->CollectAllAvailableGarbage();
2976 CHECK(!resource->IsDisposed()); 2977 CHECK(!resource->IsDisposed());
2977 2978
2978 CompileRun(accessor); 2979 CompileRun(accessor);
2979 CcTest::heap()->CollectAllAvailableGarbage(); 2980 CcTest::heap()->CollectAllAvailableGarbage();
2980 2981
(...skipping 629 matching lines...) Expand 10 before | Expand all | Expand 10 after
3610 for (int i = 0; i < 4; i++) { 3611 for (int i = 0; i < 4; i++) {
3611 heap->CollectAllGarbage(false); 3612 heap->CollectAllGarbage(false);
3612 } 3613 }
3613 3614
3614 // The site still exists because of our global handle, but the code is no 3615 // The site still exists because of our global handle, but the code is no
3615 // longer referred to by dependent_code(). 3616 // longer referred to by dependent_code().
3616 DependentCode::GroupStartIndexes starts(site->dependent_code()); 3617 DependentCode::GroupStartIndexes starts(site->dependent_code());
3617 int index = starts.at(DependentCode::kAllocationSiteTransitionChangedGroup); 3618 int index = starts.at(DependentCode::kAllocationSiteTransitionChangedGroup);
3618 CHECK(!(site->dependent_code()->is_code_at(index))); 3619 CHECK(!(site->dependent_code()->is_code_at(index)));
3619 } 3620 }
OLDNEW
« no previous file with comments | « test/cctest/test-debug.cc ('k') | test/cctest/test-heap-profiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698