| 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 723 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 734 if (!ApiCheck(isolate->handle_scope_implementer()->LeaveLastContext(), | 734 if (!ApiCheck(isolate->handle_scope_implementer()->LeaveLastContext(), |
| 735 "v8::Context::Exit()", | 735 "v8::Context::Exit()", |
| 736 "Cannot exit non-entered context")) { | 736 "Cannot exit non-entered context")) { |
| 737 return; | 737 return; |
| 738 } | 738 } |
| 739 | 739 |
| 740 // Content of 'last_context' could be NULL. | 740 // Content of 'last_context' could be NULL. |
| 741 i::Context* last_context = | 741 i::Context* last_context = |
| 742 isolate->handle_scope_implementer()->RestoreContext(); | 742 isolate->handle_scope_implementer()->RestoreContext(); |
| 743 isolate->set_context(last_context); | 743 isolate->set_context(last_context); |
| 744 isolate->set_context_exit_happened(true); |
| 744 } | 745 } |
| 745 | 746 |
| 746 | 747 |
| 747 void Context::SetData(v8::Handle<String> data) { | 748 void Context::SetData(v8::Handle<String> data) { |
| 748 i::Handle<i::Context> env = Utils::OpenHandle(this); | 749 i::Handle<i::Context> env = Utils::OpenHandle(this); |
| 749 i::Isolate* isolate = env->GetIsolate(); | 750 i::Isolate* isolate = env->GetIsolate(); |
| 750 if (IsDeadCheck(isolate, "v8::Context::SetData()")) return; | 751 if (IsDeadCheck(isolate, "v8::Context::SetData()")) return; |
| 751 i::Handle<i::Object> raw_data = Utils::OpenHandle(*data); | 752 i::Handle<i::Object> raw_data = Utils::OpenHandle(*data); |
| 752 ASSERT(env->IsGlobalContext()); | 753 ASSERT(env->IsGlobalContext()); |
| 753 if (env->IsGlobalContext()) { | 754 if (env->IsGlobalContext()) { |
| (...skipping 5411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6165 | 6166 |
| 6166 | 6167 |
| 6167 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { | 6168 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { |
| 6168 HandleScopeImplementer* scope_implementer = | 6169 HandleScopeImplementer* scope_implementer = |
| 6169 reinterpret_cast<HandleScopeImplementer*>(storage); | 6170 reinterpret_cast<HandleScopeImplementer*>(storage); |
| 6170 scope_implementer->IterateThis(v); | 6171 scope_implementer->IterateThis(v); |
| 6171 return storage + ArchiveSpacePerThread(); | 6172 return storage + ArchiveSpacePerThread(); |
| 6172 } | 6173 } |
| 6173 | 6174 |
| 6174 } } // namespace v8::internal | 6175 } } // namespace v8::internal |
| OLD | NEW |