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 14164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
14175 // Impossible event. | 14175 // Impossible event. |
14176 CHECK(false); | 14176 CHECK(false); |
14177 break; | 14177 break; |
14178 } | 14178 } |
14179 } | 14179 } |
14180 | 14180 |
14181 | 14181 |
14182 UNINITIALIZED_TEST(SetJitCodeEventHandler) { | 14182 UNINITIALIZED_TEST(SetJitCodeEventHandler) { |
14183 i::FLAG_stress_compaction = true; | 14183 i::FLAG_stress_compaction = true; |
14184 i::FLAG_incremental_marking = false; | 14184 i::FLAG_incremental_marking = false; |
| 14185 if (i::FLAG_never_compact) return; |
14185 const char* script = | 14186 const char* script = |
14186 "function bar() {" | 14187 "function bar() {" |
14187 " var sum = 0;" | 14188 " var sum = 0;" |
14188 " for (i = 0; i < 100; ++i)" | 14189 " for (i = 0; i < 100; ++i)" |
14189 " sum = foo(i);" | 14190 " sum = foo(i);" |
14190 " return sum;" | 14191 " return sum;" |
14191 "}" | 14192 "}" |
14192 "function foo(i) { return i * i; };" | 14193 "function foo(i) { return i * i; };" |
14193 "bar();"; | 14194 "bar();"; |
14194 | 14195 |
(...skipping 8239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
22434 v8::internal::FLAG_stack_size = 150; | 22435 v8::internal::FLAG_stack_size = 150; |
22435 LocalContext current; | 22436 LocalContext current; |
22436 v8::Isolate* isolate = current->GetIsolate(); | 22437 v8::Isolate* isolate = current->GetIsolate(); |
22437 v8::HandleScope scope(isolate); | 22438 v8::HandleScope scope(isolate); |
22438 V8::SetCaptureStackTraceForUncaughtExceptions( | 22439 V8::SetCaptureStackTraceForUncaughtExceptions( |
22439 true, 10, v8::StackTrace::kDetailed); | 22440 true, 10, v8::StackTrace::kDetailed); |
22440 v8::TryCatch try_catch; | 22441 v8::TryCatch try_catch; |
22441 CompileRun("(function f(x) { f(x+1); })(0)"); | 22442 CompileRun("(function f(x) { f(x+1); })(0)"); |
22442 CHECK(try_catch.HasCaught()); | 22443 CHECK(try_catch.HasCaught()); |
22443 } | 22444 } |
OLD | NEW |