| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 712 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 723 if (!ApiCheck(isolate->handle_scope_implementer()->LeaveLastContext(), | 723 if (!ApiCheck(isolate->handle_scope_implementer()->LeaveLastContext(), |
| 724 "v8::Context::Exit()", | 724 "v8::Context::Exit()", |
| 725 "Cannot exit non-entered context")) { | 725 "Cannot exit non-entered context")) { |
| 726 return; | 726 return; |
| 727 } | 727 } |
| 728 | 728 |
| 729 // Content of 'last_context' could be NULL. | 729 // Content of 'last_context' could be NULL. |
| 730 i::Context* last_context = | 730 i::Context* last_context = |
| 731 isolate->handle_scope_implementer()->RestoreContext(); | 731 isolate->handle_scope_implementer()->RestoreContext(); |
| 732 isolate->set_context(last_context); | 732 isolate->set_context(last_context); |
| 733 isolate->set_context_exit_happened(true); |
| 733 } | 734 } |
| 734 | 735 |
| 735 | 736 |
| 736 void Context::SetData(v8::Handle<String> data) { | 737 void Context::SetData(v8::Handle<String> data) { |
| 737 i::Handle<i::Context> env = Utils::OpenHandle(this); | 738 i::Handle<i::Context> env = Utils::OpenHandle(this); |
| 738 i::Isolate* isolate = env->GetIsolate(); | 739 i::Isolate* isolate = env->GetIsolate(); |
| 739 if (IsDeadCheck(isolate, "v8::Context::SetData()")) return; | 740 if (IsDeadCheck(isolate, "v8::Context::SetData()")) return; |
| 740 i::Handle<i::Object> raw_data = Utils::OpenHandle(*data); | 741 i::Handle<i::Object> raw_data = Utils::OpenHandle(*data); |
| 741 ASSERT(env->IsGlobalContext()); | 742 ASSERT(env->IsGlobalContext()); |
| 742 if (env->IsGlobalContext()) { | 743 if (env->IsGlobalContext()) { |
| (...skipping 5371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6114 | 6115 |
| 6115 | 6116 |
| 6116 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { | 6117 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { |
| 6117 HandleScopeImplementer* scope_implementer = | 6118 HandleScopeImplementer* scope_implementer = |
| 6118 reinterpret_cast<HandleScopeImplementer*>(storage); | 6119 reinterpret_cast<HandleScopeImplementer*>(storage); |
| 6119 scope_implementer->IterateThis(v); | 6120 scope_implementer->IterateThis(v); |
| 6120 return storage + ArchiveSpacePerThread(); | 6121 return storage + ArchiveSpacePerThread(); |
| 6121 } | 6122 } |
| 6122 | 6123 |
| 6123 } } // namespace v8::internal | 6124 } } // namespace v8::internal |
| OLD | NEW |