Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 107 | 107 |
| 108 | 108 |
| 109 static FatalErrorCallback exception_behavior = NULL; | 109 static FatalErrorCallback exception_behavior = NULL; |
| 110 | 110 |
| 111 static void DefaultFatalErrorHandler(const char* location, | 111 static void DefaultFatalErrorHandler(const char* location, |
| 112 const char* message) { | 112 const char* message) { |
| 113 ENTER_V8; | 113 ENTER_V8; |
| 114 API_Fatal(location, message); | 114 API_Fatal(location, message); |
| 115 } | 115 } |
| 116 | 116 |
| 117 | 117 |
|
Rico
2010/11/15 13:10:16
Not this change, but remove one line here
Lasse Reichstein
2010/11/15 13:21:10
Done.
| |
| 118 | 118 |
| 119 static FatalErrorCallback& GetFatalErrorHandler() { | 119 static FatalErrorCallback& GetFatalErrorHandler() { |
| 120 if (exception_behavior == NULL) { | 120 if (exception_behavior == NULL) { |
| 121 exception_behavior = DefaultFatalErrorHandler; | 121 exception_behavior = DefaultFatalErrorHandler; |
| 122 } | 122 } |
| 123 return exception_behavior; | 123 return exception_behavior; |
| 124 } | 124 } |
| 125 | 125 |
| 126 | 126 |
| 127 void i::FatalProcessOutOfMemory(const char* location) { | |
| 128 i::V8::FatalProcessOutOfMemory(location, false); | |
| 129 } | |
| 130 | |
| 127 | 131 |
| 128 // When V8 cannot allocated memory FatalProcessOutOfMemory is called. | 132 // When V8 cannot allocated memory FatalProcessOutOfMemory is called. |
| 129 // The default fatal error handler is called and execution is stopped. | 133 // The default fatal error handler is called and execution is stopped. |
| 130 void i::V8::FatalProcessOutOfMemory(const char* location, bool take_snapshot) { | 134 void i::V8::FatalProcessOutOfMemory(const char* location, bool take_snapshot) { |
| 131 i::HeapStats heap_stats; | 135 i::HeapStats heap_stats; |
| 132 int start_marker; | 136 int start_marker; |
| 133 heap_stats.start_marker = &start_marker; | 137 heap_stats.start_marker = &start_marker; |
| 134 int new_space_size; | 138 int new_space_size; |
| 135 heap_stats.new_space_size = &new_space_size; | 139 heap_stats.new_space_size = &new_space_size; |
| 136 int new_space_capacity; | 140 int new_space_capacity; |
| (...skipping 4863 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 5000 | 5004 |
| 5001 | 5005 |
| 5002 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { | 5006 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { |
| 5003 HandleScopeImplementer* thread_local = | 5007 HandleScopeImplementer* thread_local = |
| 5004 reinterpret_cast<HandleScopeImplementer*>(storage); | 5008 reinterpret_cast<HandleScopeImplementer*>(storage); |
| 5005 thread_local->IterateThis(v); | 5009 thread_local->IterateThis(v); |
| 5006 return storage + ArchiveSpacePerThread(); | 5010 return storage + ArchiveSpacePerThread(); |
| 5007 } | 5011 } |
| 5008 | 5012 |
| 5009 } } // namespace v8::internal | 5013 } } // namespace v8::internal |
| OLD | NEW |