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

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

Issue 980523004: Retain maps embedded in optimized code for several garbage collections. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Clear on context disposal Created 5 years, 9 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
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 16170 matching lines...) Expand 10 before | Expand all | Expand 10 after
16181 "s(o);"); 16181 "s(o);");
16182 CHECK(try_catch.HasCaught()); 16182 CHECK(try_catch.HasCaught());
16183 v8::String::Utf8Value value(try_catch.Exception()); 16183 v8::String::Utf8Value value(try_catch.Exception());
16184 CHECK_EQ(0, strcmp(*value, "Hey!")); 16184 CHECK_EQ(0, strcmp(*value, "Hey!"));
16185 } 16185 }
16186 16186
16187 16187
16188 TEST(Regress528) { 16188 TEST(Regress528) {
16189 v8::V8::Initialize(); 16189 v8::V8::Initialize();
16190 v8::Isolate* isolate = CcTest::isolate(); 16190 v8::Isolate* isolate = CcTest::isolate();
16191 i::FLAG_retain_maps_for_n_gc = 0;
16191 v8::HandleScope scope(isolate); 16192 v8::HandleScope scope(isolate);
16192 v8::Local<Context> other_context; 16193 v8::Local<Context> other_context;
16193 int gc_count; 16194 int gc_count;
16194 16195
16195 // Create a context used to keep the code from aging in the compilation 16196 // Create a context used to keep the code from aging in the compilation
16196 // cache. 16197 // cache.
16197 other_context = Context::New(isolate); 16198 other_context = Context::New(isolate);
16198 16199
16199 // Context-dependent context data creates reference from the compilation 16200 // Context-dependent context data creates reference from the compilation
16200 // cache to the global object. 16201 // cache to the global object.
(...skipping 5382 matching lines...) Expand 10 before | Expand all | Expand 10 after
21583 } 21584 }
21584 { 21585 {
21585 v8::TryCatch try_catch; 21586 v8::TryCatch try_catch;
21586 uint16_t* data = reinterpret_cast<uint16_t*>(buffer); 21587 uint16_t* data = reinterpret_cast<uint16_t*>(buffer);
21587 CHECK(v8::String::NewFromTwoByte(isolate, data, v8::String::kNormalString, 21588 CHECK(v8::String::NewFromTwoByte(isolate, data, v8::String::kNormalString,
21588 length).IsEmpty()); 21589 length).IsEmpty());
21589 CHECK(try_catch.HasCaught()); 21590 CHECK(try_catch.HasCaught());
21590 } 21591 }
21591 free(buffer); 21592 free(buffer);
21592 } 21593 }
OLDNEW
« src/objects-inl.h ('K') | « test/cctest/cctest.gyp ('k') | test/cctest/test-array-list.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698