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

Side by Side Diff: src/bootstrapper.cc

Issue 1642223003: [api] Make ObjectTemplate::SetNativeDataProperty() work even if the ObjectTemplate does not have a … (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Removed asserts preventing JSReceiver properties in ObjectTemplate Created 4 years, 10 months 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/arm64/builtins-arm64.cc ('k') | src/builtins.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 2651 matching lines...) Expand 10 before | Expand all | Expand 10 after
2662 InstallInternalArray(utils, "InternalPackedArray", FAST_ELEMENTS); 2662 InstallInternalArray(utils, "InternalPackedArray", FAST_ELEMENTS);
2663 } 2663 }
2664 2664
2665 // Run the rest of the native scripts. 2665 // Run the rest of the native scripts.
2666 while (builtin_index < Natives::GetBuiltinsCount()) { 2666 while (builtin_index < Natives::GetBuiltinsCount()) {
2667 if (!Bootstrapper::CompileBuiltin(isolate(), builtin_index++)) return false; 2667 if (!Bootstrapper::CompileBuiltin(isolate(), builtin_index++)) return false;
2668 } 2668 }
2669 2669
2670 if (!CallUtilsFunction(isolate(), "PostNatives")) return false; 2670 if (!CallUtilsFunction(isolate(), "PostNatives")) return false;
2671 2671
2672 auto function_cache = 2672 auto template_instantiations_cache =
2673 ObjectHashTable::New(isolate(), ApiNatives::kInitialFunctionCacheSize, 2673 ObjectHashTable::New(isolate(), ApiNatives::kInitialFunctionCacheSize,
2674 USE_CUSTOM_MINIMUM_CAPACITY); 2674 USE_CUSTOM_MINIMUM_CAPACITY);
2675 native_context()->set_function_cache(*function_cache); 2675 native_context()->set_template_instantiations_cache(
2676 *template_instantiations_cache);
2676 2677
2677 // Store the map for the %ObjectPrototype% after the natives has been compiled 2678 // Store the map for the %ObjectPrototype% after the natives has been compiled
2678 // and the Object function has been set up. 2679 // and the Object function has been set up.
2679 Handle<JSFunction> object_function(native_context()->object_function()); 2680 Handle<JSFunction> object_function(native_context()->object_function());
2680 DCHECK(JSObject::cast(object_function->initial_map()->prototype()) 2681 DCHECK(JSObject::cast(object_function->initial_map()->prototype())
2681 ->HasFastProperties()); 2682 ->HasFastProperties());
2682 native_context()->set_object_function_prototype_map( 2683 native_context()->set_object_function_prototype_map(
2683 HeapObject::cast(object_function->initial_map()->prototype())->map()); 2684 HeapObject::cast(object_function->initial_map()->prototype())->map());
2684 2685
2685 // Store the map for the %StringPrototype% after the natives has been compiled 2686 // Store the map for the %StringPrototype% after the natives has been compiled
(...skipping 944 matching lines...) Expand 10 before | Expand all | Expand 10 after
3630 } 3631 }
3631 3632
3632 3633
3633 // Called when the top-level V8 mutex is destroyed. 3634 // Called when the top-level V8 mutex is destroyed.
3634 void Bootstrapper::FreeThreadResources() { 3635 void Bootstrapper::FreeThreadResources() {
3635 DCHECK(!IsActive()); 3636 DCHECK(!IsActive());
3636 } 3637 }
3637 3638
3638 } // namespace internal 3639 } // namespace internal
3639 } // namespace v8 3640 } // namespace v8
OLDNEW
« no previous file with comments | « src/arm64/builtins-arm64.cc ('k') | src/builtins.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698