Chromium Code Reviews| 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 1573 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1584 delete string_tracker_; | 1584 delete string_tracker_; |
| 1585 string_tracker_ = NULL; | 1585 string_tracker_ = NULL; |
| 1586 | 1586 |
| 1587 delete memory_allocator_; | 1587 delete memory_allocator_; |
| 1588 memory_allocator_ = NULL; | 1588 memory_allocator_ = NULL; |
| 1589 delete code_range_; | 1589 delete code_range_; |
| 1590 code_range_ = NULL; | 1590 code_range_ = NULL; |
| 1591 delete global_handles_; | 1591 delete global_handles_; |
| 1592 global_handles_ = NULL; | 1592 global_handles_ = NULL; |
| 1593 | 1593 |
| 1594 if (external_reference_table_ != NULL) { | |
|
Vitaly Repeshko
2011/08/16 17:52:32
It's safe to delete NULL. "if" is not necessary.
Jakob Kummerow
2011/08/17 08:47:30
Done.
| |
| 1595 delete external_reference_table_; | |
| 1596 external_reference_table_ = NULL; | |
| 1597 } | |
| 1598 | |
| 1594 #ifdef ENABLE_DEBUGGER_SUPPORT | 1599 #ifdef ENABLE_DEBUGGER_SUPPORT |
| 1595 delete debugger_; | 1600 delete debugger_; |
| 1596 debugger_ = NULL; | 1601 debugger_ = NULL; |
| 1597 delete debug_; | 1602 delete debug_; |
| 1598 debug_ = NULL; | 1603 debug_ = NULL; |
| 1599 #endif | 1604 #endif |
| 1600 } | 1605 } |
| 1601 | 1606 |
| 1602 | 1607 |
| 1603 void Isolate::InitializeThreadLocal() { | 1608 void Isolate::InitializeThreadLocal() { |
| (...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1865 | 1870 |
| 1866 #ifdef DEBUG | 1871 #ifdef DEBUG |
| 1867 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \ | 1872 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \ |
| 1868 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_); | 1873 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_); |
| 1869 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET) | 1874 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET) |
| 1870 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET) | 1875 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET) |
| 1871 #undef ISOLATE_FIELD_OFFSET | 1876 #undef ISOLATE_FIELD_OFFSET |
| 1872 #endif | 1877 #endif |
| 1873 | 1878 |
| 1874 } } // namespace v8::internal | 1879 } } // namespace v8::internal |
| OLD | NEW |