| 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 7961 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 7972 void HandleScopeImplementer::BeginDeferredScope() { | 7972 void HandleScopeImplementer::BeginDeferredScope() { | 
| 7973   ASSERT(last_handle_before_deferred_block_ == NULL); | 7973   ASSERT(last_handle_before_deferred_block_ == NULL); | 
| 7974   last_handle_before_deferred_block_ = isolate()->handle_scope_data()->next; | 7974   last_handle_before_deferred_block_ = isolate()->handle_scope_data()->next; | 
| 7975 } | 7975 } | 
| 7976 | 7976 | 
| 7977 | 7977 | 
| 7978 DeferredHandles::~DeferredHandles() { | 7978 DeferredHandles::~DeferredHandles() { | 
| 7979   isolate_->UnlinkDeferredHandles(this); | 7979   isolate_->UnlinkDeferredHandles(this); | 
| 7980 | 7980 | 
| 7981   for (int i = 0; i < blocks_.length(); i++) { | 7981   for (int i = 0; i < blocks_.length(); i++) { | 
| 7982 #ifdef ENABLE_EXTRA_CHECKS | 7982 #ifdef ENABLE_HANDLE_ZAPPING | 
| 7983     HandleScope::ZapRange(blocks_[i], &blocks_[i][kHandleBlockSize]); | 7983     HandleScope::ZapRange(blocks_[i], &blocks_[i][kHandleBlockSize]); | 
| 7984 #endif | 7984 #endif | 
| 7985     isolate_->handle_scope_implementer()->ReturnBlock(blocks_[i]); | 7985     isolate_->handle_scope_implementer()->ReturnBlock(blocks_[i]); | 
| 7986   } | 7986   } | 
| 7987 } | 7987 } | 
| 7988 | 7988 | 
| 7989 | 7989 | 
| 7990 void DeferredHandles::Iterate(ObjectVisitor* v) { | 7990 void DeferredHandles::Iterate(ObjectVisitor* v) { | 
| 7991   ASSERT(!blocks_.is_empty()); | 7991   ASSERT(!blocks_.is_empty()); | 
| 7992 | 7992 | 
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 8046   Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); | 8046   Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); | 
| 8047   Address callback_address = | 8047   Address callback_address = | 
| 8048       reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 8048       reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 
| 8049   VMState<EXTERNAL> state(isolate); | 8049   VMState<EXTERNAL> state(isolate); | 
| 8050   ExternalCallbackScope call_scope(isolate, callback_address); | 8050   ExternalCallbackScope call_scope(isolate, callback_address); | 
| 8051   return callback(info); | 8051   return callback(info); | 
| 8052 } | 8052 } | 
| 8053 | 8053 | 
| 8054 | 8054 | 
| 8055 } }  // namespace v8::internal | 8055 } }  // namespace v8::internal | 
| OLD | NEW | 
|---|