| 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/base/utils/random-number-generator.h" | 9 #include "src/base/utils/random-number-generator.h" |
| 10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
| (...skipping 683 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 694 // %ThrowTypeError% must not have a name property. | 694 // %ThrowTypeError% must not have a name property. |
| 695 JSReceiver::DeleteProperty(function, factory()->name_string()).Assert(); | 695 JSReceiver::DeleteProperty(function, factory()->name_string()).Assert(); |
| 696 | 696 |
| 697 // length needs to be non configurable. | 697 // length needs to be non configurable. |
| 698 Handle<Object> value(Smi::FromInt(function->shared()->length()), isolate()); | 698 Handle<Object> value(Smi::FromInt(function->shared()->length()), isolate()); |
| 699 JSObject::SetOwnPropertyIgnoreAttributes( | 699 JSObject::SetOwnPropertyIgnoreAttributes( |
| 700 function, factory()->length_string(), value, | 700 function, factory()->length_string(), value, |
| 701 static_cast<PropertyAttributes>(DONT_ENUM | DONT_DELETE | READ_ONLY)) | 701 static_cast<PropertyAttributes>(DONT_ENUM | DONT_DELETE | READ_ONLY)) |
| 702 .Assert(); | 702 .Assert(); |
| 703 | 703 |
| 704 if (JSObject::PreventExtensions(function, THROW_ON_ERROR).IsNothing()) | 704 if (JSObject::PreventExtensions(function, Object::THROW_ON_ERROR).IsNothing()) |
| 705 DCHECK(false); | 705 DCHECK(false); |
| 706 | 706 |
| 707 return function; | 707 return function; |
| 708 } | 708 } |
| 709 | 709 |
| 710 | 710 |
| 711 // ECMAScript 5th Edition, 13.2.3 | 711 // ECMAScript 5th Edition, 13.2.3 |
| 712 Handle<JSFunction> Genesis::GetRestrictedFunctionPropertiesThrower() { | 712 Handle<JSFunction> Genesis::GetRestrictedFunctionPropertiesThrower() { |
| 713 if (restricted_function_properties_thrower_.is_null()) { | 713 if (restricted_function_properties_thrower_.is_null()) { |
| 714 restricted_function_properties_thrower_ = GetThrowTypeErrorIntrinsic( | 714 restricted_function_properties_thrower_ = GetThrowTypeErrorIntrinsic( |
| (...skipping 2607 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3322 } | 3322 } |
| 3323 | 3323 |
| 3324 | 3324 |
| 3325 // Called when the top-level V8 mutex is destroyed. | 3325 // Called when the top-level V8 mutex is destroyed. |
| 3326 void Bootstrapper::FreeThreadResources() { | 3326 void Bootstrapper::FreeThreadResources() { |
| 3327 DCHECK(!IsActive()); | 3327 DCHECK(!IsActive()); |
| 3328 } | 3328 } |
| 3329 | 3329 |
| 3330 } // namespace internal | 3330 } // namespace internal |
| 3331 } // namespace v8 | 3331 } // namespace v8 |
| OLD | NEW |