| 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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 | 89 |
| 90 #ifdef DEBUG | 90 #ifdef DEBUG |
| 91 value->Verify(); | 91 value->Verify(); |
| 92 #endif | 92 #endif |
| 93 | 93 |
| 94 // Update the pending exception flag and return the value. | 94 // Update the pending exception flag and return the value. |
| 95 *has_pending_exception = value->IsException(); | 95 *has_pending_exception = value->IsException(); |
| 96 ASSERT(*has_pending_exception == Top::has_pending_exception()); | 96 ASSERT(*has_pending_exception == Top::has_pending_exception()); |
| 97 if (*has_pending_exception) { | 97 if (*has_pending_exception) { |
| 98 Top::setup_external_caught(); | 98 Top::setup_external_caught(); |
| 99 } | 99 // If the pending exception is OutOfMemoryException set out_of_memory in |
| 100 | 100 // the global context. Note: We have to mark the global context here |
| 101 // If the pending exception is OutOfMemoryException set out_of_memory in | 101 // since the GenerateThrowOutOfMemory stub cannot make a RuntimeCall to |
| 102 // the global context. Note: We have to mark the global context here | 102 // set it. |
| 103 // since the GenerateThrowOutOfMemory stub cannot make a RuntimeCall to | |
| 104 // set it. | |
| 105 if (*has_pending_exception) { | |
| 106 if (Top::pending_exception() == Failure::OutOfMemoryException()) { | 103 if (Top::pending_exception() == Failure::OutOfMemoryException()) { |
| 107 Top::context()->mark_out_of_memory(); | 104 Top::context()->mark_out_of_memory(); |
| 108 } | 105 } |
| 106 return Handle<Object>(); |
| 109 } | 107 } |
| 110 | 108 |
| 111 return Handle<Object>(value); | 109 return Handle<Object>(value); |
| 112 } | 110 } |
| 113 | 111 |
| 114 | 112 |
| 115 Handle<Object> Execution::Call(Handle<JSFunction> func, | 113 Handle<Object> Execution::Call(Handle<JSFunction> func, |
| 116 Handle<Object> receiver, | 114 Handle<Object> receiver, |
| 117 int argc, | 115 int argc, |
| 118 Object*** args, | 116 Object*** args, |
| (...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 522 // All allocation spaces other than NEW_SPACE have the same effect. | 520 // All allocation spaces other than NEW_SPACE have the same effect. |
| 523 Heap::CollectGarbage(0, OLD_DATA_SPACE); | 521 Heap::CollectGarbage(0, OLD_DATA_SPACE); |
| 524 return v8::Undefined(); | 522 return v8::Undefined(); |
| 525 } | 523 } |
| 526 | 524 |
| 527 | 525 |
| 528 static GCExtension kGCExtension; | 526 static GCExtension kGCExtension; |
| 529 v8::DeclareExtension kGCExtensionDeclaration(&kGCExtension); | 527 v8::DeclareExtension kGCExtensionDeclaration(&kGCExtension); |
| 530 | 528 |
| 531 } } // namespace v8::internal | 529 } } // namespace v8::internal |
| OLD | NEW |