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 4100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4111 } | 4111 } |
4112 | 4112 |
4113 | 4113 |
4114 bool Context::InContext() { | 4114 bool Context::InContext() { |
4115 return i::Isolate::Current()->context() != NULL; | 4115 return i::Isolate::Current()->context() != NULL; |
4116 } | 4116 } |
4117 | 4117 |
4118 | 4118 |
4119 v8::Local<v8::Context> Context::GetEntered() { | 4119 v8::Local<v8::Context> Context::GetEntered() { |
4120 i::Isolate* isolate = i::Isolate::Current(); | 4120 i::Isolate* isolate = i::Isolate::Current(); |
4121 if (IsDeadCheck(isolate, "v8::Context::GetEntered()")) { | 4121 if (!EnsureInitializedForIsolate(isolate, "v8::Context::GetEntered()")) { |
Vitaly Repeshko
2011/08/19 14:15:38
While this will work, we could be a bit fancier he
Sven Panne
2011/08/19 15:01:11
The underlying problem is that r8833 changed our e
Vitaly Repeshko
2011/08/19 15:17:38
Well, the real underlying issue here is that our o
| |
4122 return Local<Context>(); | 4122 return Local<Context>(); |
4123 } | 4123 } |
4124 i::Handle<i::Object> last = | 4124 i::Handle<i::Object> last = |
4125 isolate->handle_scope_implementer()->LastEnteredContext(); | 4125 isolate->handle_scope_implementer()->LastEnteredContext(); |
4126 if (last.is_null()) return Local<Context>(); | 4126 if (last.is_null()) return Local<Context>(); |
4127 i::Handle<i::Context> context = i::Handle<i::Context>::cast(last); | 4127 i::Handle<i::Context> context = i::Handle<i::Context>::cast(last); |
4128 return Utils::ToLocal(context); | 4128 return Utils::ToLocal(context); |
4129 } | 4129 } |
4130 | 4130 |
4131 | 4131 |
(...skipping 1904 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
6036 | 6036 |
6037 | 6037 |
6038 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { | 6038 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { |
6039 HandleScopeImplementer* scope_implementer = | 6039 HandleScopeImplementer* scope_implementer = |
6040 reinterpret_cast<HandleScopeImplementer*>(storage); | 6040 reinterpret_cast<HandleScopeImplementer*>(storage); |
6041 scope_implementer->IterateThis(v); | 6041 scope_implementer->IterateThis(v); |
6042 return storage + ArchiveSpacePerThread(); | 6042 return storage + ArchiveSpacePerThread(); |
6043 } | 6043 } |
6044 | 6044 |
6045 } } // namespace v8::internal | 6045 } } // namespace v8::internal |
OLD | NEW |