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

Side by Side Diff: src/bootstrapper.cc

Issue 1490783002: [bootstrapper] add checks for variable bindings in native scripts. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years 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
« no previous file with comments | « src/ast/scopes.cc ('k') | src/d8.cc » ('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/api-natives.h" 8 #include "src/api-natives.h"
9 #include "src/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/extensions/externalize-string-extension.h" 10 #include "src/extensions/externalize-string-extension.h"
(...skipping 3131 matching lines...) Expand 10 before | Expand all | Expand 10 after
3142 Handle<JSFunction> empty_function = CreateEmptyFunction(isolate); 3142 Handle<JSFunction> empty_function = CreateEmptyFunction(isolate);
3143 CreateStrictModeFunctionMaps(empty_function); 3143 CreateStrictModeFunctionMaps(empty_function);
3144 CreateStrongModeFunctionMaps(empty_function); 3144 CreateStrongModeFunctionMaps(empty_function);
3145 CreateIteratorMaps(); 3145 CreateIteratorMaps();
3146 Handle<JSGlobalObject> global_object = 3146 Handle<JSGlobalObject> global_object =
3147 CreateNewGlobals(global_proxy_template, global_proxy); 3147 CreateNewGlobals(global_proxy_template, global_proxy);
3148 HookUpGlobalProxy(global_object, global_proxy); 3148 HookUpGlobalProxy(global_object, global_proxy);
3149 InitializeGlobal(global_object, empty_function, context_type); 3149 InitializeGlobal(global_object, empty_function, context_type);
3150 InitializeNormalizedMapCaches(); 3150 InitializeNormalizedMapCaches();
3151 3151
3152 // TODO(yangguo): Find a way to prevent accidentially installing properties
3153 // on the global object.
3154 if (!InstallNatives(context_type)) return; 3152 if (!InstallNatives(context_type)) return;
3155 3153
3156 MakeFunctionInstancePrototypeWritable(); 3154 MakeFunctionInstancePrototypeWritable();
3157 3155
3158 if (context_type != THIN_CONTEXT) { 3156 if (context_type != THIN_CONTEXT) {
3159 if (!InstallExtraNatives()) return; 3157 if (!InstallExtraNatives()) return;
3160 if (!ConfigureGlobalObjects(global_proxy_template)) return; 3158 if (!ConfigureGlobalObjects(global_proxy_template)) return;
3161 } 3159 }
3162 isolate->counters()->contexts_created_from_scratch()->Increment(); 3160 isolate->counters()->contexts_created_from_scratch()->Increment();
3163 // Re-initialize the counter because it got incremented during snapshot 3161 // Re-initialize the counter because it got incremented during snapshot
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
3220 } 3218 }
3221 3219
3222 3220
3223 // Called when the top-level V8 mutex is destroyed. 3221 // Called when the top-level V8 mutex is destroyed.
3224 void Bootstrapper::FreeThreadResources() { 3222 void Bootstrapper::FreeThreadResources() {
3225 DCHECK(!IsActive()); 3223 DCHECK(!IsActive());
3226 } 3224 }
3227 3225
3228 } // namespace internal 3226 } // namespace internal
3229 } // namespace v8 3227 } // namespace v8
OLDNEW
« no previous file with comments | « src/ast/scopes.cc ('k') | src/d8.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698