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

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

Issue 125240: Make test-api/ApplyInterruption less likely to time out in debug... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 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 | « no previous file | no next file » | 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 6348 matching lines...) Expand 10 before | Expand all | Expand 10 after
6359 void LongRunningApply() { 6359 void LongRunningApply() {
6360 block_->Signal(); 6360 block_->Signal();
6361 int rounds = 0; 6361 int rounds = 0;
6362 while (gc_during_apply_ < kRequiredGCs) { 6362 while (gc_during_apply_ < kRequiredGCs) {
6363 int gc_before = gc_count_; 6363 int gc_before = gc_count_;
6364 { 6364 {
6365 const char* c_source = 6365 const char* c_source =
6366 "function do_very_little(bar) {" 6366 "function do_very_little(bar) {"
6367 " this.foo = bar;" 6367 " this.foo = bar;"
6368 "}" 6368 "}"
6369 "for (var i = 0; i < 100000; i++) {" 6369 "for (var i = 0; i < 10000; i++) {"
6370 " do_very_little.apply(this, ['bar']);" 6370 " do_very_little.apply(this, ['bar']);"
6371 "}"; 6371 "}";
6372 Local<String> source = String::New(c_source); 6372 Local<String> source = String::New(c_source);
6373 Local<Script> script = Script::Compile(source); 6373 Local<Script> script = Script::Compile(source);
6374 Local<Value> result = script->Run(); 6374 Local<Value> result = script->Run();
6375 // Check that no exception was thrown. 6375 // Check that no exception was thrown.
6376 CHECK(!result.IsEmpty()); 6376 CHECK(!result.IsEmpty());
6377 } 6377 }
6378 int gc_after = gc_count_; 6378 int gc_after = gc_count_;
6379 gc_during_apply_ += gc_after - gc_before; 6379 gc_during_apply_ += gc_after - gc_before;
(...skipping 570 matching lines...) Expand 10 before | Expand all | Expand 10 after
6950 calling_context2->Exit(); 6950 calling_context2->Exit();
6951 6951
6952 // Dispose the contexts to allow them to be garbage collected. 6952 // Dispose the contexts to allow them to be garbage collected.
6953 calling_context0.Dispose(); 6953 calling_context0.Dispose();
6954 calling_context1.Dispose(); 6954 calling_context1.Dispose();
6955 calling_context2.Dispose(); 6955 calling_context2.Dispose();
6956 calling_context0.Clear(); 6956 calling_context0.Clear();
6957 calling_context1.Clear(); 6957 calling_context1.Clear();
6958 calling_context2.Clear(); 6958 calling_context2.Clear();
6959 } 6959 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698