| 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 7507 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7518 void HandleScopeImplementer::BeginDeferredScope() { | 7518 void HandleScopeImplementer::BeginDeferredScope() { |
| 7519 ASSERT(last_handle_before_deferred_block_ == NULL); | 7519 ASSERT(last_handle_before_deferred_block_ == NULL); |
| 7520 last_handle_before_deferred_block_ = isolate()->handle_scope_data()->next; | 7520 last_handle_before_deferred_block_ = isolate()->handle_scope_data()->next; |
| 7521 } | 7521 } |
| 7522 | 7522 |
| 7523 | 7523 |
| 7524 DeferredHandles::~DeferredHandles() { | 7524 DeferredHandles::~DeferredHandles() { |
| 7525 isolate_->UnlinkDeferredHandles(this); | 7525 isolate_->UnlinkDeferredHandles(this); |
| 7526 | 7526 |
| 7527 for (int i = 0; i < blocks_.length(); i++) { | 7527 for (int i = 0; i < blocks_.length(); i++) { |
| 7528 #ifdef ENABLE_EXTRA_CHECKS | 7528 #ifdef ENABLE_HANDLE_ZAPPING |
| 7529 HandleScope::ZapRange(blocks_[i], &blocks_[i][kHandleBlockSize]); | 7529 HandleScope::ZapRange(blocks_[i], &blocks_[i][kHandleBlockSize]); |
| 7530 #endif | 7530 #endif |
| 7531 isolate_->handle_scope_implementer()->ReturnBlock(blocks_[i]); | 7531 isolate_->handle_scope_implementer()->ReturnBlock(blocks_[i]); |
| 7532 } | 7532 } |
| 7533 } | 7533 } |
| 7534 | 7534 |
| 7535 | 7535 |
| 7536 void DeferredHandles::Iterate(ObjectVisitor* v) { | 7536 void DeferredHandles::Iterate(ObjectVisitor* v) { |
| 7537 ASSERT(!blocks_.is_empty()); | 7537 ASSERT(!blocks_.is_empty()); |
| 7538 | 7538 |
| (...skipping 27 matching lines...) Expand all Loading... |
| 7566 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); | 7566 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); |
| 7567 Address callback_address = | 7567 Address callback_address = |
| 7568 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 7568 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); |
| 7569 VMState<EXTERNAL> state(isolate); | 7569 VMState<EXTERNAL> state(isolate); |
| 7570 ExternalCallbackScope call_scope(isolate, callback_address); | 7570 ExternalCallbackScope call_scope(isolate, callback_address); |
| 7571 callback(info); | 7571 callback(info); |
| 7572 } | 7572 } |
| 7573 | 7573 |
| 7574 | 7574 |
| 7575 } } // namespace v8::internal | 7575 } } // namespace v8::internal |
| OLD | NEW |