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 494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
505 RegisteredExtension::RegisteredExtension(Extension* extension) | 505 RegisteredExtension::RegisteredExtension(Extension* extension) |
506 : extension_(extension) { } | 506 : extension_(extension) { } |
507 | 507 |
508 | 508 |
509 void RegisteredExtension::Register(RegisteredExtension* that) { | 509 void RegisteredExtension::Register(RegisteredExtension* that) { |
510 that->next_ = first_extension_; | 510 that->next_ = first_extension_; |
511 first_extension_ = that; | 511 first_extension_ = that; |
512 } | 512 } |
513 | 513 |
514 | 514 |
| 515 void RegisteredExtension::UnregisterAll() { |
| 516 RegisteredExtension* re = first_extension_; |
| 517 while (re != NULL) { |
| 518 RegisteredExtension* next = re->next(); |
| 519 delete re; |
| 520 re = next; |
| 521 } |
| 522 } |
| 523 |
| 524 |
515 void RegisterExtension(Extension* that) { | 525 void RegisterExtension(Extension* that) { |
516 RegisteredExtension* extension = new RegisteredExtension(that); | 526 RegisteredExtension* extension = new RegisteredExtension(that); |
517 RegisteredExtension::Register(extension); | 527 RegisteredExtension::Register(extension); |
518 } | 528 } |
519 | 529 |
520 | 530 |
521 Extension::Extension(const char* name, | 531 Extension::Extension(const char* name, |
522 const char* source, | 532 const char* source, |
523 int dep_count, | 533 int dep_count, |
524 const char** deps, | 534 const char** deps, |
(...skipping 5841 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6366 | 6376 |
6367 | 6377 |
6368 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { | 6378 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { |
6369 HandleScopeImplementer* scope_implementer = | 6379 HandleScopeImplementer* scope_implementer = |
6370 reinterpret_cast<HandleScopeImplementer*>(storage); | 6380 reinterpret_cast<HandleScopeImplementer*>(storage); |
6371 scope_implementer->IterateThis(v); | 6381 scope_implementer->IterateThis(v); |
6372 return storage + ArchiveSpacePerThread(); | 6382 return storage + ArchiveSpacePerThread(); |
6373 } | 6383 } |
6374 | 6384 |
6375 } } // namespace v8::internal | 6385 } } // namespace v8::internal |
OLD | NEW |