| OLD | NEW |
| 1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 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 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 // Check that we are not passing a finalized external string to | 225 // Check that we are not passing a finalized external string to |
| 226 // the callback. | 226 // the callback. |
| 227 ASSERT(!object_->IsExternalAsciiString() || | 227 ASSERT(!object_->IsExternalAsciiString() || |
| 228 ExternalAsciiString::cast(object_)->resource() != NULL); | 228 ExternalAsciiString::cast(object_)->resource() != NULL); |
| 229 ASSERT(!object_->IsExternalTwoByteString() || | 229 ASSERT(!object_->IsExternalTwoByteString() || |
| 230 ExternalTwoByteString::cast(object_)->resource() != NULL); | 230 ExternalTwoByteString::cast(object_)->resource() != NULL); |
| 231 // Leaving V8. | 231 // Leaving V8. |
| 232 VMState state(isolate, EXTERNAL); | 232 VMState state(isolate, EXTERNAL); |
| 233 func(object, par); | 233 func(object, par); |
| 234 } | 234 } |
| 235 // Absense of explicit cleanup or revival of weak handle | 235 // Absence of explicit cleanup or revival of weak handle |
| 236 // in most of the cases would lead to memory leak. | 236 // in most of the cases would lead to memory leak. |
| 237 ASSERT(state_ != NEAR_DEATH); | 237 ASSERT(state_ != NEAR_DEATH); |
| 238 return true; | 238 return true; |
| 239 } | 239 } |
| 240 | 240 |
| 241 private: | 241 private: |
| 242 inline NodeBlock* FindBlock(); | 242 inline NodeBlock* FindBlock(); |
| 243 inline void IncreaseBlockUses(GlobalHandles* global_handles); | 243 inline void IncreaseBlockUses(GlobalHandles* global_handles); |
| 244 inline void DecreaseBlockUses(GlobalHandles* global_handles); | 244 inline void DecreaseBlockUses(GlobalHandles* global_handles); |
| 245 | 245 |
| (...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 712 implicit_ref_groups_.Clear(); | 712 implicit_ref_groups_.Clear(); |
| 713 } | 713 } |
| 714 | 714 |
| 715 | 715 |
| 716 void GlobalHandles::TearDown() { | 716 void GlobalHandles::TearDown() { |
| 717 // TODO(1428): invoke weak callbacks. | 717 // TODO(1428): invoke weak callbacks. |
| 718 } | 718 } |
| 719 | 719 |
| 720 | 720 |
| 721 } } // namespace v8::internal | 721 } } // namespace v8::internal |
| OLD | NEW |