OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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/api-natives.h" | 5 #include "src/api-natives.h" |
6 | 6 |
7 #include "src/api.h" | 7 #include "src/api.h" |
8 #include "src/isolate-inl.h" | 8 #include "src/isolate-inl.h" |
9 #include "src/lookup.h" | 9 #include "src/lookup.h" |
10 #include "src/messages.h" | 10 #include "src/messages.h" |
(...skipping 546 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
557 isolate->factory()->empty_string(), code, prototype, type, | 557 isolate->factory()->empty_string(), code, prototype, type, |
558 instance_size, obj->read_only_prototype(), true); | 558 instance_size, obj->read_only_prototype(), true); |
559 } | 559 } |
560 | 560 |
561 result->shared()->set_length(obj->length()); | 561 result->shared()->set_length(obj->length()); |
562 Handle<Object> class_name(obj->class_name(), isolate); | 562 Handle<Object> class_name(obj->class_name(), isolate); |
563 if (class_name->IsString()) { | 563 if (class_name->IsString()) { |
564 result->shared()->set_instance_class_name(*class_name); | 564 result->shared()->set_instance_class_name(*class_name); |
565 result->shared()->set_name(*class_name); | 565 result->shared()->set_name(*class_name); |
566 } | 566 } |
567 result->shared()->set_function_data(*obj); | 567 result->shared()->set_api_func_data(*obj); |
568 result->shared()->set_construct_stub(*construct_stub); | 568 result->shared()->set_construct_stub(*construct_stub); |
569 result->shared()->DontAdaptArguments(); | 569 result->shared()->DontAdaptArguments(); |
570 | 570 |
571 if (obj->remove_prototype()) { | 571 if (obj->remove_prototype()) { |
572 DCHECK(result->shared()->IsApiFunction()); | 572 DCHECK(result->shared()->IsApiFunction()); |
573 DCHECK(!result->has_initial_map()); | 573 DCHECK(!result->has_initial_map()); |
574 DCHECK(!result->has_prototype()); | 574 DCHECK(!result->has_prototype()); |
575 return result; | 575 return result; |
576 } | 576 } |
577 | 577 |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
612 map->set_is_callable(); | 612 map->set_is_callable(); |
613 map->set_is_constructor(true); | 613 map->set_is_constructor(true); |
614 } | 614 } |
615 | 615 |
616 DCHECK(result->shared()->IsApiFunction()); | 616 DCHECK(result->shared()->IsApiFunction()); |
617 return result; | 617 return result; |
618 } | 618 } |
619 | 619 |
620 } // namespace internal | 620 } // namespace internal |
621 } // namespace v8 | 621 } // namespace v8 |
OLD | NEW |