| OLD | NEW |
| 1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 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 3140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3151 proxy_constructor->set_access_check_info( | 3151 proxy_constructor->set_access_check_info( |
| 3152 global_constructor->access_check_info()); | 3152 global_constructor->access_check_info()); |
| 3153 proxy_constructor->set_needs_access_check( | 3153 proxy_constructor->set_needs_access_check( |
| 3154 global_constructor->needs_access_check()); | 3154 global_constructor->needs_access_check()); |
| 3155 global_constructor->set_needs_access_check(false); | 3155 global_constructor->set_needs_access_check(false); |
| 3156 global_constructor->set_access_check_info(HEAP->undefined_value()); | 3156 global_constructor->set_access_check_info(HEAP->undefined_value()); |
| 3157 } | 3157 } |
| 3158 } | 3158 } |
| 3159 | 3159 |
| 3160 // Create the environment. | 3160 // Create the environment. |
| 3161 env = i::Bootstrapper::CreateEnvironment( | 3161 env = i::Isolate::Current()->bootstrapper()->CreateEnvironment( |
| 3162 Utils::OpenHandle(*global_object), | 3162 Utils::OpenHandle(*global_object), |
| 3163 proxy_template, | 3163 proxy_template, |
| 3164 extensions); | 3164 extensions); |
| 3165 | 3165 |
| 3166 // Restore the access check info on the global template. | 3166 // Restore the access check info on the global template. |
| 3167 if (!global_template.IsEmpty()) { | 3167 if (!global_template.IsEmpty()) { |
| 3168 ASSERT(!global_constructor.is_null()); | 3168 ASSERT(!global_constructor.is_null()); |
| 3169 ASSERT(!proxy_constructor.is_null()); | 3169 ASSERT(!proxy_constructor.is_null()); |
| 3170 global_constructor->set_access_check_info( | 3170 global_constructor->set_access_check_info( |
| 3171 proxy_constructor->access_check_info()); | 3171 proxy_constructor->access_check_info()); |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3254 return Utils::ToLocal(i::Handle<i::JSObject>::cast(global)); | 3254 return Utils::ToLocal(i::Handle<i::JSObject>::cast(global)); |
| 3255 } | 3255 } |
| 3256 | 3256 |
| 3257 | 3257 |
| 3258 void Context::DetachGlobal() { | 3258 void Context::DetachGlobal() { |
| 3259 if (IsDeadCheck("v8::Context::DetachGlobal()")) return; | 3259 if (IsDeadCheck("v8::Context::DetachGlobal()")) return; |
| 3260 ENTER_V8; | 3260 ENTER_V8; |
| 3261 i::Object** ctx = reinterpret_cast<i::Object**>(this); | 3261 i::Object** ctx = reinterpret_cast<i::Object**>(this); |
| 3262 i::Handle<i::Context> context = | 3262 i::Handle<i::Context> context = |
| 3263 i::Handle<i::Context>::cast(i::Handle<i::Object>(ctx)); | 3263 i::Handle<i::Context>::cast(i::Handle<i::Object>(ctx)); |
| 3264 i::Bootstrapper::DetachGlobal(context); | 3264 i::Isolate::Current()->bootstrapper()->DetachGlobal(context); |
| 3265 } | 3265 } |
| 3266 | 3266 |
| 3267 | 3267 |
| 3268 void Context::ReattachGlobal(Handle<Object> global_object) { | 3268 void Context::ReattachGlobal(Handle<Object> global_object) { |
| 3269 if (IsDeadCheck("v8::Context::ReattachGlobal()")) return; | 3269 if (IsDeadCheck("v8::Context::ReattachGlobal()")) return; |
| 3270 ENTER_V8; | 3270 ENTER_V8; |
| 3271 i::Object** ctx = reinterpret_cast<i::Object**>(this); | 3271 i::Object** ctx = reinterpret_cast<i::Object**>(this); |
| 3272 i::Handle<i::Context> context = | 3272 i::Handle<i::Context> context = |
| 3273 i::Handle<i::Context>::cast(i::Handle<i::Object>(ctx)); | 3273 i::Handle<i::Context>::cast(i::Handle<i::Object>(ctx)); |
| 3274 i::Bootstrapper::ReattachGlobal(context, Utils::OpenHandle(*global_object)); | 3274 i::Isolate::Current()->bootstrapper()->ReattachGlobal( |
| 3275 context, |
| 3276 Utils::OpenHandle(*global_object)); |
| 3275 } | 3277 } |
| 3276 | 3278 |
| 3277 | 3279 |
| 3278 Local<v8::Object> ObjectTemplate::NewInstance() { | 3280 Local<v8::Object> ObjectTemplate::NewInstance() { |
| 3279 ON_BAILOUT("v8::ObjectTemplate::NewInstance()", return Local<v8::Object>()); | 3281 ON_BAILOUT("v8::ObjectTemplate::NewInstance()", return Local<v8::Object>()); |
| 3280 LOG_API("ObjectTemplate::NewInstance"); | 3282 LOG_API("ObjectTemplate::NewInstance"); |
| 3281 ENTER_V8; | 3283 ENTER_V8; |
| 3282 EXCEPTION_PREAMBLE(); | 3284 EXCEPTION_PREAMBLE(); |
| 3283 i::Handle<i::Object> obj = | 3285 i::Handle<i::Object> obj = |
| 3284 i::Execution::InstantiateObject(Utils::OpenHandle(this), | 3286 i::Execution::InstantiateObject(Utils::OpenHandle(this), |
| (...skipping 1150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4435 | 4437 |
| 4436 | 4438 |
| 4437 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { | 4439 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { |
| 4438 HandleScopeImplementer* thread_local = | 4440 HandleScopeImplementer* thread_local = |
| 4439 reinterpret_cast<HandleScopeImplementer*>(storage); | 4441 reinterpret_cast<HandleScopeImplementer*>(storage); |
| 4440 thread_local->IterateThis(v); | 4442 thread_local->IterateThis(v); |
| 4441 return storage + ArchiveSpacePerThread(); | 4443 return storage + ArchiveSpacePerThread(); |
| 4442 } | 4444 } |
| 4443 | 4445 |
| 4444 } } // namespace v8::internal | 4446 } } // namespace v8::internal |
| OLD | NEW |