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/runtime/runtime-utils.h" | 5 #include "src/runtime/runtime-utils.h" |
6 | 6 |
7 #include <stdlib.h> | 7 #include <stdlib.h> |
8 #include <limits> | 8 #include <limits> |
9 | 9 |
10 #include "src/arguments.h" | 10 #include "src/arguments.h" |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 | 156 |
157 // TODO(arv): Only do this conditionally. | 157 // TODO(arv): Only do this conditionally. |
158 Handle<Symbol> home_object_symbol(isolate->heap()->home_object_symbol()); | 158 Handle<Symbol> home_object_symbol(isolate->heap()->home_object_symbol()); |
159 RETURN_ON_EXCEPTION( | 159 RETURN_ON_EXCEPTION( |
160 isolate, JSObject::SetOwnPropertyIgnoreAttributes( | 160 isolate, JSObject::SetOwnPropertyIgnoreAttributes( |
161 constructor, home_object_symbol, prototype, DONT_ENUM), | 161 constructor, home_object_symbol, prototype, DONT_ENUM), |
162 Object); | 162 Object); |
163 | 163 |
164 if (!constructor_parent.is_null()) { | 164 if (!constructor_parent.is_null()) { |
165 MAYBE_RETURN_NULL(JSObject::SetPrototype(constructor, constructor_parent, | 165 MAYBE_RETURN_NULL(JSObject::SetPrototype(constructor, constructor_parent, |
166 false, THROW_ON_ERROR)); | 166 false, Object::THROW_ON_ERROR)); |
167 } | 167 } |
168 | 168 |
169 JSObject::AddProperty(prototype, isolate->factory()->constructor_string(), | 169 JSObject::AddProperty(prototype, isolate->factory()->constructor_string(), |
170 constructor, DONT_ENUM); | 170 constructor, DONT_ENUM); |
171 | 171 |
172 // Install private properties that are used to construct the FunctionToString. | 172 // Install private properties that are used to construct the FunctionToString. |
173 RETURN_ON_EXCEPTION( | 173 RETURN_ON_EXCEPTION( |
174 isolate, | 174 isolate, |
175 Object::SetProperty( | 175 Object::SetProperty( |
176 constructor, isolate->factory()->class_start_position_symbol(), | 176 constructor, isolate->factory()->class_start_position_symbol(), |
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
513 ASSIGN_RETURN_FAILURE_ON_EXCEPTION( | 513 ASSIGN_RETURN_FAILURE_ON_EXCEPTION( |
514 isolate, result, | 514 isolate, result, |
515 Execution::New(isolate, super_constructor, original_constructor, | 515 Execution::New(isolate, super_constructor, original_constructor, |
516 argument_count, arguments.get())); | 516 argument_count, arguments.get())); |
517 | 517 |
518 return *result; | 518 return *result; |
519 } | 519 } |
520 | 520 |
521 } // namespace internal | 521 } // namespace internal |
522 } // namespace v8 | 522 } // namespace v8 |
OLD | NEW |