| OLD | NEW |
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 579 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 590 v8::Utils::OpenHandle(*global_template); | 590 v8::Utils::OpenHandle(*global_template); |
| 591 Handle<FunctionTemplateInfo> global_constructor( | 591 Handle<FunctionTemplateInfo> global_constructor( |
| 592 FunctionTemplateInfo::cast(data->constructor())); | 592 FunctionTemplateInfo::cast(data->constructor())); |
| 593 global_proxy_function = | 593 global_proxy_function = |
| 594 Factory::CreateApiFunction(global_constructor, | 594 Factory::CreateApiFunction(global_constructor, |
| 595 Factory::OuterGlobalObject); | 595 Factory::OuterGlobalObject); |
| 596 } | 596 } |
| 597 | 597 |
| 598 Handle<String> global_name = Factory::LookupAsciiSymbol("global"); | 598 Handle<String> global_name = Factory::LookupAsciiSymbol("global"); |
| 599 global_proxy_function->shared()->set_instance_class_name(*global_name); | 599 global_proxy_function->shared()->set_instance_class_name(*global_name); |
| 600 global_proxy_function->initial_map()->set_is_access_check_needed(); | 600 global_proxy_function->initial_map()->set_is_access_check_needed(true); |
| 601 | 601 |
| 602 // Set global_proxy.__proto__ to js_global after ConfigureGlobalObjects | 602 // Set global_proxy.__proto__ to js_global after ConfigureGlobalObjects |
| 603 | 603 |
| 604 if (global_object.location() != NULL) { | 604 if (global_object.location() != NULL) { |
| 605 ASSERT(global_object->IsJSGlobalProxy()); | 605 ASSERT(global_object->IsJSGlobalProxy()); |
| 606 global_proxy = | 606 global_proxy = |
| 607 ReinitializeJSGlobalProxy( | 607 ReinitializeJSGlobalProxy( |
| 608 global_proxy_function, | 608 global_proxy_function, |
| 609 Handle<JSGlobalProxy>::cast(global_object)); | 609 Handle<JSGlobalProxy>::cast(global_object)); |
| 610 } else { | 610 } else { |
| (...skipping 837 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1448 if (!ConfigureGlobalObjects(global_template)) return; | 1448 if (!ConfigureGlobalObjects(global_template)) return; |
| 1449 | 1449 |
| 1450 if (!InstallExtensions(extensions)) return; | 1450 if (!InstallExtensions(extensions)) return; |
| 1451 | 1451 |
| 1452 if (!InstallSpecialObjects()) return; | 1452 if (!InstallSpecialObjects()) return; |
| 1453 | 1453 |
| 1454 result_ = global_context_; | 1454 result_ = global_context_; |
| 1455 } | 1455 } |
| 1456 | 1456 |
| 1457 } } // namespace v8::internal | 1457 } } // namespace v8::internal |
| OLD | NEW |