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

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

Issue 816353002: Revert "Retain maps for several garbage collections" (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 12 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 unified diff | Download patch
« no previous file with comments | « src/heap/mark-compact.cc ('k') | test/cctest/test-heap.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 19426 matching lines...) Expand 10 before | Expand all | Expand 10 after
19437 "s(o);"); 19437 "s(o);");
19438 CHECK(try_catch.HasCaught()); 19438 CHECK(try_catch.HasCaught());
19439 v8::String::Utf8Value value(try_catch.Exception()); 19439 v8::String::Utf8Value value(try_catch.Exception());
19440 CHECK_EQ(0, strcmp(*value, "Hey!")); 19440 CHECK_EQ(0, strcmp(*value, "Hey!"));
19441 } 19441 }
19442 19442
19443 19443
19444 TEST(Regress528) { 19444 TEST(Regress528) {
19445 v8::V8::Initialize(); 19445 v8::V8::Initialize();
19446 v8::Isolate* isolate = CcTest::isolate(); 19446 v8::Isolate* isolate = CcTest::isolate();
19447 i::FLAG_retain_maps_for_n_gc = 0;
19448 v8::HandleScope scope(isolate); 19447 v8::HandleScope scope(isolate);
19449 v8::Local<Context> other_context; 19448 v8::Local<Context> other_context;
19450 int gc_count; 19449 int gc_count;
19451 19450
19452 // Create a context used to keep the code from aging in the compilation 19451 // Create a context used to keep the code from aging in the compilation
19453 // cache. 19452 // cache.
19454 other_context = Context::New(isolate); 19453 other_context = Context::New(isolate);
19455 19454
19456 // Context-dependent context data creates reference from the compilation 19455 // Context-dependent context data creates reference from the compilation
19457 // cache to the global object. 19456 // cache to the global object.
(...skipping 5263 matching lines...) Expand 10 before | Expand all | Expand 10 after
24721 TEST(ClassPrototypeCreationContext) { 24720 TEST(ClassPrototypeCreationContext) {
24722 i::FLAG_harmony_classes = true; 24721 i::FLAG_harmony_classes = true;
24723 v8::Isolate* isolate = CcTest::isolate(); 24722 v8::Isolate* isolate = CcTest::isolate();
24724 v8::HandleScope handle_scope(isolate); 24723 v8::HandleScope handle_scope(isolate);
24725 LocalContext env; 24724 LocalContext env;
24726 24725
24727 Handle<Object> result = Handle<Object>::Cast( 24726 Handle<Object> result = Handle<Object>::Cast(
24728 CompileRun("'use strict'; class Example { }; Example.prototype")); 24727 CompileRun("'use strict'; class Example { }; Example.prototype"));
24729 CHECK(env.local() == result->CreationContext()); 24728 CHECK(env.local() == result->CreationContext());
24730 } 24729 }
OLDNEW
« no previous file with comments | « src/heap/mark-compact.cc ('k') | test/cctest/test-heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698