| OLD | NEW |
| 1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 3761 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3772 } | 3772 } |
| 3773 | 3773 |
| 3774 | 3774 |
| 3775 bool Context::InContext() { | 3775 bool Context::InContext() { |
| 3776 return i::Isolate::Current()->context() != NULL; | 3776 return i::Isolate::Current()->context() != NULL; |
| 3777 } | 3777 } |
| 3778 | 3778 |
| 3779 | 3779 |
| 3780 v8::Local<v8::Context> Context::GetEntered() { | 3780 v8::Local<v8::Context> Context::GetEntered() { |
| 3781 i::Isolate* isolate = i::Isolate::Current(); | 3781 i::Isolate* isolate = i::Isolate::Current(); |
| 3782 if (IsDeadCheck(isolate, "v8::Context::GetEntered()")) { | 3782 if (!EnsureInitializedForIsolate(isolate, "v8::Context::GetEntered()")) { |
| 3783 return Local<Context>(); | 3783 return Local<Context>(); |
| 3784 } | 3784 } |
| 3785 i::Handle<i::Object> last = | 3785 i::Handle<i::Object> last = |
| 3786 isolate->handle_scope_implementer()->LastEnteredContext(); | 3786 isolate->handle_scope_implementer()->LastEnteredContext(); |
| 3787 if (last.is_null()) return Local<Context>(); | 3787 if (last.is_null()) return Local<Context>(); |
| 3788 i::Handle<i::Context> context = i::Handle<i::Context>::cast(last); | 3788 i::Handle<i::Context> context = i::Handle<i::Context>::cast(last); |
| 3789 return Utils::ToLocal(context); | 3789 return Utils::ToLocal(context); |
| 3790 } | 3790 } |
| 3791 | 3791 |
| 3792 | 3792 |
| (...skipping 1879 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5672 | 5672 |
| 5673 | 5673 |
| 5674 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { | 5674 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { |
| 5675 HandleScopeImplementer* scope_implementer = | 5675 HandleScopeImplementer* scope_implementer = |
| 5676 reinterpret_cast<HandleScopeImplementer*>(storage); | 5676 reinterpret_cast<HandleScopeImplementer*>(storage); |
| 5677 scope_implementer->IterateThis(v); | 5677 scope_implementer->IterateThis(v); |
| 5678 return storage + ArchiveSpacePerThread(); | 5678 return storage + ArchiveSpacePerThread(); |
| 5679 } | 5679 } |
| 5680 | 5680 |
| 5681 } } // namespace v8::internal | 5681 } } // namespace v8::internal |
| OLD | NEW |