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

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

Issue 7187007: Merge arguments branch to bleeding edge (second try). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Undelete external-array test. Created 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/x64/stub-cache-x64.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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 9553 matching lines...) Expand 10 before | Expand all | Expand 10 after
9564 return count; 9564 return count;
9565 } 9565 }
9566 9566
9567 9567
9568 static void CheckSurvivingGlobalObjectsCount(int expected) { 9568 static void CheckSurvivingGlobalObjectsCount(int expected) {
9569 // We need to collect all garbage twice to be sure that everything 9569 // We need to collect all garbage twice to be sure that everything
9570 // has been collected. This is because inline caches are cleared in 9570 // has been collected. This is because inline caches are cleared in
9571 // the first garbage collection but some of the maps have already 9571 // the first garbage collection but some of the maps have already
9572 // been marked at that point. Therefore some of the maps are not 9572 // been marked at that point. Therefore some of the maps are not
9573 // collected until the second garbage collection. 9573 // collected until the second garbage collection.
9574 HEAP->global_context_map();
9574 HEAP->CollectAllGarbage(false); 9575 HEAP->CollectAllGarbage(false);
9575 HEAP->CollectAllGarbage(false); 9576 HEAP->CollectAllGarbage(false);
9576 int count = GetGlobalObjectsCount(); 9577 int count = GetGlobalObjectsCount();
9577 #ifdef DEBUG 9578 #ifdef DEBUG
9578 if (count != expected) HEAP->TracePathToGlobal(); 9579 if (count != expected) HEAP->TracePathToGlobal();
9579 #endif 9580 #endif
9580 CHECK_EQ(expected, count); 9581 CHECK_EQ(expected, count);
9581 } 9582 }
9582 9583
9583 9584
(...skipping 4911 matching lines...) Expand 10 before | Expand all | Expand 10 after
14495 CHECK_EQ(v8_str("DONT_CHANGE"), obj->Get(v8_str("1"))); 14496 CHECK_EQ(v8_str("DONT_CHANGE"), obj->Get(v8_str("1")));
14496 obj->Set(v8_num(2), v8_str("DONT_CHANGE"), v8::ReadOnly); 14497 obj->Set(v8_num(2), v8_str("DONT_CHANGE"), v8::ReadOnly);
14497 obj->Set(v8_num(2), v8_str("foobar")); 14498 obj->Set(v8_num(2), v8_str("foobar"));
14498 CHECK_EQ(v8_str("DONT_CHANGE"), obj->Get(v8_num(2))); 14499 CHECK_EQ(v8_str("DONT_CHANGE"), obj->Get(v8_num(2)));
14499 14500
14500 // Test non-smi case. 14501 // Test non-smi case.
14501 obj->Set(v8_str("2000000000"), v8_str("DONT_CHANGE"), v8::ReadOnly); 14502 obj->Set(v8_str("2000000000"), v8_str("DONT_CHANGE"), v8::ReadOnly);
14502 obj->Set(v8_str("2000000000"), v8_str("foobar")); 14503 obj->Set(v8_str("2000000000"), v8_str("foobar"));
14503 CHECK_EQ(v8_str("DONT_CHANGE"), obj->Get(v8_str("2000000000"))); 14504 CHECK_EQ(v8_str("DONT_CHANGE"), obj->Get(v8_str("2000000000")));
14504 } 14505 }
OLDNEW
« no previous file with comments | « src/x64/stub-cache-x64.cc ('k') | test/cctest/test-heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698