Chromium Code Reviews| 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 7408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 7419 } | 7419 } |
| 7420 | 7420 |
| 7421 ASSERT(last_handle_before_deferred_block_ == NULL || | 7421 ASSERT(last_handle_before_deferred_block_ == NULL || |
| 7422 found_block_before_deferred); | 7422 found_block_before_deferred); |
| 7423 | 7423 |
| 7424 // Iterate over live handles in the last block (if any). | 7424 // Iterate over live handles in the last block (if any). |
| 7425 if (!blocks()->is_empty()) { | 7425 if (!blocks()->is_empty()) { |
| 7426 v->VisitPointers(blocks()->last(), handle_scope_data_.next); | 7426 v->VisitPointers(blocks()->last(), handle_scope_data_.next); |
| 7427 } | 7427 } |
| 7428 | 7428 |
| 7429 if (!saved_contexts_.is_empty()) { | 7429 List<Context*>* context_lists[2] = { &saved_contexts_, &entered_contexts_}; |
| 7430 Object** start = reinterpret_cast<Object**>(&saved_contexts_.first()); | 7430 for (unsigned i = 0; i < ARRAY_SIZE(context_lists); i++) { |
| 7431 v->VisitPointers(start, start + saved_contexts_.length()); | 7431 if (context_lists[i]->is_empty()) continue; |
| 7432 Object** start = reinterpret_cast<Object**>(&context_lists[i]->first()); | |
|
Michael Starzinger
2013/09/24 11:30:46
Better use context_lists[i]->ToVector().start() in
| |
| 7433 v->VisitPointers(start, start + context_lists[i]->length()); | |
| 7432 } | 7434 } |
| 7433 } | 7435 } |
| 7434 | 7436 |
| 7435 | 7437 |
| 7436 void HandleScopeImplementer::Iterate(ObjectVisitor* v) { | 7438 void HandleScopeImplementer::Iterate(ObjectVisitor* v) { |
| 7437 v8::ImplementationUtilities::HandleScopeData* current = | 7439 v8::ImplementationUtilities::HandleScopeData* current = |
| 7438 isolate_->handle_scope_data(); | 7440 isolate_->handle_scope_data(); |
| 7439 handle_scope_data_ = *current; | 7441 handle_scope_data_ = *current; |
| 7440 IterateThis(v); | 7442 IterateThis(v); |
| 7441 } | 7443 } |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 7528 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); | 7530 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); |
| 7529 Address callback_address = | 7531 Address callback_address = |
| 7530 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 7532 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); |
| 7531 VMState<EXTERNAL> state(isolate); | 7533 VMState<EXTERNAL> state(isolate); |
| 7532 ExternalCallbackScope call_scope(isolate, callback_address); | 7534 ExternalCallbackScope call_scope(isolate, callback_address); |
| 7533 callback(info); | 7535 callback(info); |
| 7534 } | 7536 } |
| 7535 | 7537 |
| 7536 | 7538 |
| 7537 } } // namespace v8::internal | 7539 } } // namespace v8::internal |
| OLD | NEW |