Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 1103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1114 Handle<JSFunction> object_is_sealed = SimpleInstallFunction( | 1114 Handle<JSFunction> object_is_sealed = SimpleInstallFunction( |
| 1115 object_function, "isSealed", Builtins::kObjectIsSealed, 1, false); | 1115 object_function, "isSealed", Builtins::kObjectIsSealed, 1, false); |
| 1116 native_context()->set_object_is_sealed(*object_is_sealed); | 1116 native_context()->set_object_is_sealed(*object_is_sealed); |
| 1117 Handle<JSFunction> object_keys = SimpleInstallFunction( | 1117 Handle<JSFunction> object_keys = SimpleInstallFunction( |
| 1118 object_function, "keys", Builtins::kObjectKeys, 1, false); | 1118 object_function, "keys", Builtins::kObjectKeys, 1, false); |
| 1119 native_context()->set_object_keys(*object_keys); | 1119 native_context()->set_object_keys(*object_keys); |
| 1120 SimpleInstallFunction(object_function, "preventExtensions", | 1120 SimpleInstallFunction(object_function, "preventExtensions", |
| 1121 Builtins::kObjectPreventExtensions, 1, false); | 1121 Builtins::kObjectPreventExtensions, 1, false); |
| 1122 SimpleInstallFunction(object_function, "seal", Builtins::kObjectSeal, 1, | 1122 SimpleInstallFunction(object_function, "seal", Builtins::kObjectSeal, 1, |
| 1123 false); | 1123 false); |
| 1124 | |
| 1125 SimpleInstallFunction(isolate->initial_object_prototype(), "hasOwnProperty", | |
| 1126 Builtins::kObjectHasOwnProperty, 1, false); | |
|
Benedikt Meurer
2016/02/29 08:46:42
Please install the function on the native context
| |
| 1124 } | 1127 } |
| 1125 | 1128 |
| 1126 Handle<JSObject> global(native_context()->global_object()); | 1129 Handle<JSObject> global(native_context()->global_object()); |
| 1127 | 1130 |
| 1128 { // --- F u n c t i o n --- | 1131 { // --- F u n c t i o n --- |
| 1129 Handle<JSFunction> prototype = empty_function; | 1132 Handle<JSFunction> prototype = empty_function; |
| 1130 Handle<JSFunction> function_fun = | 1133 Handle<JSFunction> function_fun = |
| 1131 InstallFunction(global, "Function", JS_FUNCTION_TYPE, JSFunction::kSize, | 1134 InstallFunction(global, "Function", JS_FUNCTION_TYPE, JSFunction::kSize, |
| 1132 prototype, Builtins::kFunctionConstructor); | 1135 prototype, Builtins::kFunctionConstructor); |
| 1133 function_fun->set_prototype_or_initial_map( | 1136 function_fun->set_prototype_or_initial_map( |
| (...skipping 2543 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3677 } | 3680 } |
| 3678 | 3681 |
| 3679 | 3682 |
| 3680 // Called when the top-level V8 mutex is destroyed. | 3683 // Called when the top-level V8 mutex is destroyed. |
| 3681 void Bootstrapper::FreeThreadResources() { | 3684 void Bootstrapper::FreeThreadResources() { |
| 3682 DCHECK(!IsActive()); | 3685 DCHECK(!IsActive()); |
| 3683 } | 3686 } |
| 3684 | 3687 |
| 3685 } // namespace internal | 3688 } // namespace internal |
| 3686 } // namespace v8 | 3689 } // namespace v8 |
| OLD | NEW |