Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(157)

Side by Side Diff: src/bootstrapper.cc

Issue 705663004: harmony_scoping: Implement lexical bindings at top level (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebased patch for landing Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « include/v8.h ('k') | src/contexts.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/bootstrapper.h" 5 #include "src/bootstrapper.h"
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/code-stubs.h" 8 #include "src/code-stubs.h"
9 #include "src/extensions/externalize-string-extension.h" 9 #include "src/extensions/externalize-string-extension.h"
10 #include "src/extensions/free-buffer-extension.h" 10 #include "src/extensions/free-buffer-extension.h"
(...skipping 890 matching lines...) Expand 10 before | Expand all | Expand 10 after
901 native_context()->set_global_object(*global_object); 901 native_context()->set_global_object(*global_object);
902 // Security setup: Set the security token of the native context to the global 902 // Security setup: Set the security token of the native context to the global
903 // object. This makes the security check between two different contexts fail 903 // object. This makes the security check between two different contexts fail
904 // by default even in case of global object reinitialization. 904 // by default even in case of global object reinitialization.
905 native_context()->set_security_token(*global_object); 905 native_context()->set_security_token(*global_object);
906 906
907 Isolate* isolate = global_object->GetIsolate(); 907 Isolate* isolate = global_object->GetIsolate();
908 Factory* factory = isolate->factory(); 908 Factory* factory = isolate->factory();
909 Heap* heap = isolate->heap(); 909 Heap* heap = isolate->heap();
910 910
911 Handle<GlobalContextTable> global_context_table =
912 factory->NewGlobalContextTable();
913 native_context()->set_global_context_table(*global_context_table);
914
911 Handle<String> object_name = factory->Object_string(); 915 Handle<String> object_name = factory->Object_string();
912 JSObject::AddProperty( 916 JSObject::AddProperty(
913 global_object, object_name, isolate->object_function(), DONT_ENUM); 917 global_object, object_name, isolate->object_function(), DONT_ENUM);
914 918
915 Handle<JSObject> global(native_context()->global_object()); 919 Handle<JSObject> global(native_context()->global_object());
916 920
917 // Install global Function object 921 // Install global Function object
918 InstallFunction(global, "Function", JS_FUNCTION_TYPE, JSFunction::kSize, 922 InstallFunction(global, "Function", JS_FUNCTION_TYPE, JSFunction::kSize,
919 empty_function, Builtins::kIllegal); 923 empty_function, Builtins::kIllegal);
920 924
(...skipping 1889 matching lines...) Expand 10 before | Expand all | Expand 10 after
2810 return from + sizeof(NestingCounterType); 2814 return from + sizeof(NestingCounterType);
2811 } 2815 }
2812 2816
2813 2817
2814 // Called when the top-level V8 mutex is destroyed. 2818 // Called when the top-level V8 mutex is destroyed.
2815 void Bootstrapper::FreeThreadResources() { 2819 void Bootstrapper::FreeThreadResources() {
2816 DCHECK(!IsActive()); 2820 DCHECK(!IsActive());
2817 } 2821 }
2818 2822
2819 } } // namespace v8::internal 2823 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « include/v8.h ('k') | src/contexts.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698