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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
97 Handle<JSFunction> constructor, | 97 Handle<JSFunction> constructor, |
98 int start_position, int end_position) { | 98 int start_position, int end_position) { |
99 Handle<Object> prototype_parent; | 99 Handle<Object> prototype_parent; |
100 Handle<Object> constructor_parent; | 100 Handle<Object> constructor_parent; |
101 | 101 |
102 if (super_class->IsTheHole()) { | 102 if (super_class->IsTheHole()) { |
103 prototype_parent = isolate->initial_object_prototype(); | 103 prototype_parent = isolate->initial_object_prototype(); |
104 } else { | 104 } else { |
105 if (super_class->IsNull()) { | 105 if (super_class->IsNull()) { |
106 prototype_parent = isolate->factory()->null_value(); | 106 prototype_parent = isolate->factory()->null_value(); |
107 } else if (super_class->IsSpecFunction()) { | 107 } else if (super_class->IsJSFunction()) { |
rossberg
2015/08/26 12:55:48
Shouldn't this be IsCallable as well? It's perfect
Benedikt Meurer
2015/08/27 05:18:23
Actually it should be IsConstructor, but we don't
| |
108 if (Handle<JSFunction>::cast(super_class)->shared()->is_generator()) { | 108 if (Handle<JSFunction>::cast(super_class)->shared()->is_generator()) { |
109 THROW_NEW_ERROR( | 109 THROW_NEW_ERROR( |
110 isolate, | 110 isolate, |
111 NewTypeError(MessageTemplate::kExtendsValueGenerator, super_class), | 111 NewTypeError(MessageTemplate::kExtendsValueGenerator, super_class), |
112 Object); | 112 Object); |
113 } | 113 } |
114 ASSIGN_RETURN_ON_EXCEPTION( | 114 ASSIGN_RETURN_ON_EXCEPTION( |
115 isolate, prototype_parent, | 115 isolate, prototype_parent, |
116 Runtime::GetObjectProperty(isolate, super_class, | 116 Runtime::GetObjectProperty(isolate, super_class, |
117 isolate->factory()->prototype_string(), | 117 isolate->factory()->prototype_string(), |
(...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
563 Handle<Object> result; | 563 Handle<Object> result; |
564 ASSIGN_RETURN_FAILURE_ON_EXCEPTION( | 564 ASSIGN_RETURN_FAILURE_ON_EXCEPTION( |
565 isolate, result, | 565 isolate, result, |
566 Execution::Call(isolate, reflect, isolate->factory()->undefined_value(), | 566 Execution::Call(isolate, reflect, isolate->factory()->undefined_value(), |
567 arraysize(argv), argv)); | 567 arraysize(argv), argv)); |
568 | 568 |
569 return *result; | 569 return *result; |
570 } | 570 } |
571 } // namespace internal | 571 } // namespace internal |
572 } // namespace v8 | 572 } // namespace v8 |
OLD | NEW |