| 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 19499 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |