| OLD | NEW |
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 |
| 11 // with the distribution. | 11 // with the distribution. |
| (...skipping 553 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 565 | 565 |
| 566 Failure* Isolate::ReThrow(MaybeObject* exception, MessageLocation* location) { | 566 Failure* Isolate::ReThrow(MaybeObject* exception, MessageLocation* location) { |
| 567 bool can_be_caught_externally = false; | 567 bool can_be_caught_externally = false; |
| 568 ShouldReportException(&can_be_caught_externally, | 568 ShouldReportException(&can_be_caught_externally, |
| 569 is_catchable_by_javascript(exception)); | 569 is_catchable_by_javascript(exception)); |
| 570 thread_local_top()->catcher_ = can_be_caught_externally ? | 570 thread_local_top()->catcher_ = can_be_caught_externally ? |
| 571 try_catch_handler() : NULL; | 571 try_catch_handler() : NULL; |
| 572 | 572 |
| 573 // Set the exception being re-thrown. | 573 // Set the exception being re-thrown. |
| 574 set_pending_exception(exception); | 574 set_pending_exception(exception); |
| 575 if (exception->IsFailure()) return exception->ToFailureUnchecked(); |
| 575 return Failure::Exception(); | 576 return Failure::Exception(); |
| 576 } | 577 } |
| 577 | 578 |
| 578 | 579 |
| 579 Failure* Isolate::ThrowIllegalOperation() { | 580 Failure* Isolate::ThrowIllegalOperation() { |
| 580 return Throw(heap_.illegal_access_symbol()); | 581 return Throw(heap_.illegal_access_symbol()); |
| 581 } | 582 } |
| 582 | 583 |
| 583 | 584 |
| 584 void Isolate::ScheduleThrow(Object* exception) { | 585 void Isolate::ScheduleThrow(Object* exception) { |
| (...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 968 thread_local_top()->simulator_ = Simulator::current(this); | 969 thread_local_top()->simulator_ = Simulator::current(this); |
| 969 #endif | 970 #endif |
| 970 #endif | 971 #endif |
| 971 if (RuntimeProfiler::IsEnabled() && current_vm_state() == JS) { | 972 if (RuntimeProfiler::IsEnabled() && current_vm_state() == JS) { |
| 972 RuntimeProfiler::IsolateEnteredJS(this); | 973 RuntimeProfiler::IsolateEnteredJS(this); |
| 973 } | 974 } |
| 974 return from + sizeof(ThreadLocalTop); | 975 return from + sizeof(ThreadLocalTop); |
| 975 } | 976 } |
| 976 | 977 |
| 977 } } // namespace v8::internal | 978 } } // namespace v8::internal |
| OLD | NEW |