| OLD | NEW |
| 1 // Copyright 2011 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 |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 #ifdef DEBUG | 125 #ifdef DEBUG |
| 126 value->Verify(); | 126 value->Verify(); |
| 127 #endif | 127 #endif |
| 128 | 128 |
| 129 // Update the pending exception flag and return the value. | 129 // Update the pending exception flag and return the value. |
| 130 *has_pending_exception = value->IsException(); | 130 *has_pending_exception = value->IsException(); |
| 131 ASSERT(*has_pending_exception == Isolate::Current()->has_pending_exception()); | 131 ASSERT(*has_pending_exception == Isolate::Current()->has_pending_exception()); |
| 132 if (*has_pending_exception) { | 132 if (*has_pending_exception) { |
| 133 isolate->ReportPendingMessages(); | 133 isolate->ReportPendingMessages(); |
| 134 if (isolate->pending_exception() == Failure::OutOfMemoryException()) { | 134 if (isolate->pending_exception() == Failure::OutOfMemoryException()) { |
| 135 if (!isolate->handle_scope_implementer()->ignore_out_of_memory()) { | 135 if (!isolate->ignore_out_of_memory()) { |
| 136 V8::FatalProcessOutOfMemory("JS", true); | 136 V8::FatalProcessOutOfMemory("JS", true); |
| 137 } | 137 } |
| 138 } | 138 } |
| 139 return Handle<Object>(); | 139 return Handle<Object>(); |
| 140 } else { | 140 } else { |
| 141 isolate->clear_pending_message(); | 141 isolate->clear_pending_message(); |
| 142 } | 142 } |
| 143 | 143 |
| 144 return Handle<Object>(value->ToObjectUnchecked(), isolate); | 144 return Handle<Object>(value->ToObjectUnchecked(), isolate); |
| 145 } | 145 } |
| (...skipping 678 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 824 return isolate->TerminateExecution(); | 824 return isolate->TerminateExecution(); |
| 825 } | 825 } |
| 826 if (stack_guard->IsInterrupted()) { | 826 if (stack_guard->IsInterrupted()) { |
| 827 stack_guard->Continue(INTERRUPT); | 827 stack_guard->Continue(INTERRUPT); |
| 828 return isolate->StackOverflow(); | 828 return isolate->StackOverflow(); |
| 829 } | 829 } |
| 830 return isolate->heap()->undefined_value(); | 830 return isolate->heap()->undefined_value(); |
| 831 } | 831 } |
| 832 | 832 |
| 833 } } // namespace v8::internal | 833 } } // namespace v8::internal |
| OLD | NEW |