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 22384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
22395 "f.call(friend);"); | 22395 "f.call(friend);"); |
22396 CHECK_EQ(2, named_access_count); | 22396 CHECK_EQ(2, named_access_count); |
22397 | 22397 |
22398 // Test access using Object.setPrototypeOf reflective method. | 22398 // Test access using Object.setPrototypeOf reflective method. |
22399 named_access_count = 0; | 22399 named_access_count = 0; |
22400 CompileRun("Object.setPrototypeOf(friend, {});"); | 22400 CompileRun("Object.setPrototypeOf(friend, {});"); |
22401 CHECK_EQ(1, named_access_count); | 22401 CHECK_EQ(1, named_access_count); |
22402 CompileRun("Object.getPrototypeOf(friend);"); | 22402 CompileRun("Object.getPrototypeOf(friend);"); |
22403 CHECK_EQ(2, named_access_count); | 22403 CHECK_EQ(2, named_access_count); |
22404 } | 22404 } |
| 22405 |
| 22406 |
| 22407 TEST(CaptureStackTraceForUncaughtExceptions) { |
| 22408 v8::internal::FLAG_stack_size = 150; |
| 22409 LocalContext current; |
| 22410 v8::Isolate* isolate = current->GetIsolate(); |
| 22411 v8::HandleScope scope(isolate); |
| 22412 V8::SetCaptureStackTraceForUncaughtExceptions( |
| 22413 true, 10, v8::StackTrace::kDetailed); |
| 22414 v8::TryCatch try_catch; |
| 22415 CompileRun("(function f(x) { f(x+1); })(0)"); |
| 22416 CHECK(try_catch.HasCaught()); |
| 22417 } |
OLD | NEW |