OLD | NEW |
1 // Copyright 2008 the V8 project authors. All rights reserved. | 1 // Copyright 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 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
362 saved_contexts_.Initialize(0); | 362 saved_contexts_.Initialize(0); |
363 spare_ = NULL; | 363 spare_ = NULL; |
364 ignore_out_of_memory_ = false; | 364 ignore_out_of_memory_ = false; |
365 call_depth_ = 0; | 365 call_depth_ = 0; |
366 } | 366 } |
367 | 367 |
368 void Free() { | 368 void Free() { |
369 ASSERT(blocks_.length() == 0); | 369 ASSERT(blocks_.length() == 0); |
370 ASSERT(entered_contexts_.length() == 0); | 370 ASSERT(entered_contexts_.length() == 0); |
371 ASSERT(saved_contexts_.length() == 0); | 371 ASSERT(saved_contexts_.length() == 0); |
| 372 blocks_.Free(); |
| 373 entered_contexts_.Free(); |
| 374 saved_contexts_.Free(); |
372 if (spare_ != NULL) { | 375 if (spare_ != NULL) { |
373 DeleteArray(spare_); | 376 DeleteArray(spare_); |
374 spare_ = NULL; | 377 spare_ = NULL; |
375 } | 378 } |
376 ASSERT(call_depth_ == 0); | 379 ASSERT(call_depth_ == 0); |
377 } | 380 } |
378 | 381 |
379 List<internal::Object**> blocks_; | 382 List<internal::Object**> blocks_; |
380 // Used as a stack to keep track of entered contexts. | 383 // Used as a stack to keep track of entered contexts. |
381 List<Handle<Object> > entered_contexts_; | 384 List<Handle<Object> > entered_contexts_; |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
458 #ifdef DEBUG | 461 #ifdef DEBUG |
459 v8::ImplementationUtilities::ZapHandleRange( | 462 v8::ImplementationUtilities::ZapHandleRange( |
460 spare_, | 463 spare_, |
461 &spare_[kHandleBlockSize]); | 464 &spare_[kHandleBlockSize]); |
462 #endif | 465 #endif |
463 } | 466 } |
464 | 467 |
465 } } // namespace v8::internal | 468 } } // namespace v8::internal |
466 | 469 |
467 #endif // V8_API_H_ | 470 #endif // V8_API_H_ |
OLD | NEW |