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

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

Issue 263103006: Set max new space size in tests to proper MB value. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 7 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 | 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 19499 matching lines...) Expand 10 before | Expand all | Expand 10 after
19510 testCase_(testCase), 19510 testCase_(testCase),
19511 result_(false) { } 19511 result_(false) { }
19512 19512
19513 void Run() { 19513 void Run() {
19514 v8::Isolate* isolate = v8::Isolate::New(); 19514 v8::Isolate* isolate = v8::Isolate::New();
19515 isolate->Enter(); 19515 isolate->Enter();
19516 switch (testCase_) { 19516 switch (testCase_) {
19517 case SetResourceConstraints: { 19517 case SetResourceConstraints: {
19518 static const int K = 1024; 19518 static const int K = 1024;
19519 v8::ResourceConstraints constraints; 19519 v8::ResourceConstraints constraints;
19520 constraints.set_max_new_space_size(256 * K); 19520 constraints.set_max_new_space_size(2 * K * K);
19521 constraints.set_max_old_space_size(4 * K * K); 19521 constraints.set_max_old_space_size(4 * K * K);
19522 v8::SetResourceConstraints(CcTest::isolate(), &constraints); 19522 v8::SetResourceConstraints(CcTest::isolate(), &constraints);
19523 break; 19523 break;
19524 } 19524 }
19525 19525
19526 case SetFatalHandler: 19526 case SetFatalHandler:
19527 v8::V8::SetFatalErrorHandler(NULL); 19527 v8::V8::SetFatalErrorHandler(NULL);
19528 break; 19528 break;
19529 19529
19530 case SetCounterFunction: 19530 case SetCounterFunction:
(...skipping 2968 matching lines...) Expand 10 before | Expand all | Expand 10 after
22499 v8::internal::FLAG_stack_size = 150; 22499 v8::internal::FLAG_stack_size = 150;
22500 LocalContext current; 22500 LocalContext current;
22501 v8::Isolate* isolate = current->GetIsolate(); 22501 v8::Isolate* isolate = current->GetIsolate();
22502 v8::HandleScope scope(isolate); 22502 v8::HandleScope scope(isolate);
22503 V8::SetCaptureStackTraceForUncaughtExceptions( 22503 V8::SetCaptureStackTraceForUncaughtExceptions(
22504 true, 10, v8::StackTrace::kDetailed); 22504 true, 10, v8::StackTrace::kDetailed);
22505 v8::TryCatch try_catch; 22505 v8::TryCatch try_catch;
22506 CompileRun("(function f(x) { f(x+1); })(0)"); 22506 CompileRun("(function f(x) { f(x+1); })(0)");
22507 CHECK(try_catch.HasCaught()); 22507 CHECK(try_catch.HasCaught());
22508 } 22508 }
OLDNEW
« no previous file with comments | « no previous file | test/cctest/test-heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698