| OLD | NEW |
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 | 99 |
| 100 #ifdef DEBUG | 100 #ifdef DEBUG |
| 101 value->Verify(); | 101 value->Verify(); |
| 102 #endif | 102 #endif |
| 103 | 103 |
| 104 // Update the pending exception flag and return the value. | 104 // Update the pending exception flag and return the value. |
| 105 *has_pending_exception = value->IsException(); | 105 *has_pending_exception = value->IsException(); |
| 106 ASSERT(*has_pending_exception == Top::has_pending_exception()); | 106 ASSERT(*has_pending_exception == Top::has_pending_exception()); |
| 107 if (*has_pending_exception) { | 107 if (*has_pending_exception) { |
| 108 Top::ReportPendingMessages(); | 108 Top::ReportPendingMessages(); |
| 109 if (Top::pending_exception() == Failure::OutOfMemoryException()) { |
| 110 if (!HandleScopeImplementer::instance()->ignore_out_of_memory()) { |
| 111 V8::FatalProcessOutOfMemory("JS", true); |
| 112 } |
| 113 } |
| 109 return Handle<Object>(); | 114 return Handle<Object>(); |
| 110 } else { | 115 } else { |
| 111 Top::clear_pending_message(); | 116 Top::clear_pending_message(); |
| 112 } | 117 } |
| 113 | 118 |
| 114 return Handle<Object>(value->ToObjectUnchecked()); | 119 return Handle<Object>(value->ToObjectUnchecked()); |
| 115 } | 120 } |
| 116 | 121 |
| 117 | 122 |
| 118 Handle<Object> Execution::Call(Handle<JSFunction> func, | 123 Handle<Object> Execution::Call(Handle<JSFunction> func, |
| (...skipping 602 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 721 return Top::TerminateExecution(); | 726 return Top::TerminateExecution(); |
| 722 } | 727 } |
| 723 if (StackGuard::IsInterrupted()) { | 728 if (StackGuard::IsInterrupted()) { |
| 724 StackGuard::Continue(INTERRUPT); | 729 StackGuard::Continue(INTERRUPT); |
| 725 return Top::StackOverflow(); | 730 return Top::StackOverflow(); |
| 726 } | 731 } |
| 727 return Heap::undefined_value(); | 732 return Heap::undefined_value(); |
| 728 } | 733 } |
| 729 | 734 |
| 730 } } // namespace v8::internal | 735 } } // namespace v8::internal |
| OLD | NEW |