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

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

Issue 3836001: Get rid of requested size in RetryAfterGC. (Closed)
Patch Set: Created 10 years, 2 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 | « test/cctest/test-debug.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 2007-2008 the V8 project authors. All rights reserved. 1 // Copyright 2007-2008 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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 } 123 }
124 124
125 125
126 void DeclarationContext::Check(const char* source, 126 void DeclarationContext::Check(const char* source,
127 int get, int set, int query, 127 int get, int set, int query,
128 Expectations expectations, 128 Expectations expectations,
129 v8::Handle<Value> value) { 129 v8::Handle<Value> value) {
130 InitializeIfNeeded(); 130 InitializeIfNeeded();
131 // A retry after a GC may pollute the counts, so perform gc now 131 // A retry after a GC may pollute the counts, so perform gc now
132 // to avoid that. 132 // to avoid that.
133 v8::internal::Heap::CollectGarbage(0, v8::internal::NEW_SPACE); 133 v8::internal::Heap::CollectGarbage(v8::internal::NEW_SPACE);
134 HandleScope scope; 134 HandleScope scope;
135 TryCatch catcher; 135 TryCatch catcher;
136 catcher.SetVerbose(true); 136 catcher.SetVerbose(true);
137 Local<Value> result = Script::Compile(String::New(source))->Run(); 137 Local<Value> result = Script::Compile(String::New(source))->Run();
138 CHECK_EQ(get, get_count()); 138 CHECK_EQ(get, get_count());
139 CHECK_EQ(set, set_count()); 139 CHECK_EQ(set, set_count());
140 CHECK_EQ(query, query_count()); 140 CHECK_EQ(query, query_count());
141 if (expectations == EXPECT_RESULT) { 141 if (expectations == EXPECT_RESULT) {
142 CHECK(!catcher.HasCaught()); 142 CHECK(!catcher.HasCaught());
143 if (!value.IsEmpty()) { 143 if (!value.IsEmpty()) {
(...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after
584 HandleScope scope; 584 HandleScope scope;
585 585
586 { AbsentInPrototypeContext context; 586 { AbsentInPrototypeContext context;
587 context.Check("if (false) { var x = 0; }; x", 587 context.Check("if (false) { var x = 0; }; x",
588 0, 588 0,
589 0, 589 0,
590 1, // declaration 590 1, // declaration
591 EXPECT_RESULT, Undefined()); 591 EXPECT_RESULT, Undefined());
592 } 592 }
593 } 593 }
OLDNEW
« no previous file with comments | « test/cctest/test-debug.cc ('k') | test/cctest/test-heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698