| OLD | NEW |
| 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 19447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 19458 testCase_(testCase), | 19458 testCase_(testCase), |
| 19459 result_(false) { } | 19459 result_(false) { } |
| 19460 | 19460 |
| 19461 void Run() { | 19461 void Run() { |
| 19462 v8::Isolate* isolate = v8::Isolate::New(); | 19462 v8::Isolate* isolate = v8::Isolate::New(); |
| 19463 isolate->Enter(); | 19463 isolate->Enter(); |
| 19464 switch (testCase_) { | 19464 switch (testCase_) { |
| 19465 case SetResourceConstraints: { | 19465 case SetResourceConstraints: { |
| 19466 static const int K = 1024; | 19466 static const int K = 1024; |
| 19467 v8::ResourceConstraints constraints; | 19467 v8::ResourceConstraints constraints; |
| 19468 constraints.set_max_young_space_size(256 * K); | 19468 constraints.set_max_new_space_size(256 * K); |
| 19469 constraints.set_max_old_space_size(4 * K * K); | 19469 constraints.set_max_old_space_size(4 * K * K); |
| 19470 v8::SetResourceConstraints(CcTest::isolate(), &constraints); | 19470 v8::SetResourceConstraints(CcTest::isolate(), &constraints); |
| 19471 break; | 19471 break; |
| 19472 } | 19472 } |
| 19473 | 19473 |
| 19474 case SetFatalHandler: | 19474 case SetFatalHandler: |
| 19475 v8::V8::SetFatalErrorHandler(NULL); | 19475 v8::V8::SetFatalErrorHandler(NULL); |
| 19476 break; | 19476 break; |
| 19477 | 19477 |
| 19478 case SetCounterFunction: | 19478 case SetCounterFunction: |
| (...skipping 2955 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 22434 v8::internal::FLAG_stack_size = 150; | 22434 v8::internal::FLAG_stack_size = 150; |
| 22435 LocalContext current; | 22435 LocalContext current; |
| 22436 v8::Isolate* isolate = current->GetIsolate(); | 22436 v8::Isolate* isolate = current->GetIsolate(); |
| 22437 v8::HandleScope scope(isolate); | 22437 v8::HandleScope scope(isolate); |
| 22438 V8::SetCaptureStackTraceForUncaughtExceptions( | 22438 V8::SetCaptureStackTraceForUncaughtExceptions( |
| 22439 true, 10, v8::StackTrace::kDetailed); | 22439 true, 10, v8::StackTrace::kDetailed); |
| 22440 v8::TryCatch try_catch; | 22440 v8::TryCatch try_catch; |
| 22441 CompileRun("(function f(x) { f(x+1); })(0)"); | 22441 CompileRun("(function f(x) { f(x+1); })(0)"); |
| 22442 CHECK(try_catch.HasCaught()); | 22442 CHECK(try_catch.HasCaught()); |
| 22443 } | 22443 } |
| OLD | NEW |