Chromium Code Reviews| 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 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 204 *caught_exception = false; | 204 *caught_exception = false; |
| 205 | 205 |
| 206 Handle<Object> result = Invoke(false, func, receiver, argc, args, | 206 Handle<Object> result = Invoke(false, func, receiver, argc, args, |
| 207 caught_exception); | 207 caught_exception); |
| 208 | 208 |
| 209 if (*caught_exception) { | 209 if (*caught_exception) { |
| 210 ASSERT(catcher.HasCaught()); | 210 ASSERT(catcher.HasCaught()); |
| 211 Isolate* isolate = Isolate::Current(); | 211 Isolate* isolate = Isolate::Current(); |
| 212 ASSERT(isolate->has_pending_exception()); | 212 ASSERT(isolate->has_pending_exception()); |
| 213 ASSERT(isolate->external_caught_exception()); | 213 ASSERT(isolate->external_caught_exception()); |
| 214 if (isolate->is_out_of_memory() && !isolate->ignore_out_of_memory()) { | |
| 215 V8::FatalProcessOutOfMemory(NULL); | |
|
Michael Starzinger
2012/12/04 09:42:07
Pass some short message to V8::FatalProcessOutOfMe
| |
| 216 } | |
| 214 if (isolate->pending_exception() == | 217 if (isolate->pending_exception() == |
| 215 isolate->heap()->termination_exception()) { | 218 isolate->heap()->termination_exception()) { |
| 216 result = isolate->factory()->termination_exception(); | 219 result = isolate->factory()->termination_exception(); |
| 217 } else { | 220 } else { |
| 218 result = v8::Utils::OpenHandle(*catcher.Exception()); | 221 result = v8::Utils::OpenHandle(*catcher.Exception()); |
| 219 } | 222 } |
| 220 isolate->OptionalRescheduleException(true); | 223 isolate->OptionalRescheduleException(true); |
| 221 } | 224 } |
| 222 | 225 |
| 223 ASSERT(!Isolate::Current()->has_pending_exception()); | 226 ASSERT(!Isolate::Current()->has_pending_exception()); |
| (...skipping 738 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 962 } | 965 } |
| 963 if (stack_guard->IsInterrupted()) { | 966 if (stack_guard->IsInterrupted()) { |
| 964 stack_guard->Continue(INTERRUPT); | 967 stack_guard->Continue(INTERRUPT); |
| 965 return isolate->StackOverflow(); | 968 return isolate->StackOverflow(); |
| 966 } | 969 } |
| 967 return isolate->heap()->undefined_value(); | 970 return isolate->heap()->undefined_value(); |
| 968 } | 971 } |
| 969 | 972 |
| 970 | 973 |
| 971 } } // namespace v8::internal | 974 } } // namespace v8::internal |
| OLD | NEW |