Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(412)

Side by Side Diff: src/api-natives.cc

Issue 1590873002: Make generators non-constructable. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Adapt test262.status Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/bootstrapper.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 530 matching lines...) Expand 10 before | Expand all | Expand 10 after
541 if (!obj->named_property_handler()->IsUndefined()) { 541 if (!obj->named_property_handler()->IsUndefined()) {
542 map->set_has_named_interceptor(); 542 map->set_has_named_interceptor();
543 } 543 }
544 if (!obj->indexed_property_handler()->IsUndefined()) { 544 if (!obj->indexed_property_handler()->IsUndefined()) {
545 map->set_has_indexed_interceptor(); 545 map->set_has_indexed_interceptor();
546 } 546 }
547 547
548 // Mark instance as callable in the map. 548 // Mark instance as callable in the map.
549 if (!obj->instance_call_handler()->IsUndefined()) { 549 if (!obj->instance_call_handler()->IsUndefined()) {
550 map->set_is_callable(); 550 map->set_is_callable();
551 map->set_is_constructor(); 551 map->set_is_constructor(true);
552 } 552 }
553 553
554 // Recursively copy parent instance templates' accessors, 554 // Recursively copy parent instance templates' accessors,
555 // 'data' may be modified. 555 // 'data' may be modified.
556 int max_number_of_additional_properties = 0; 556 int max_number_of_additional_properties = 0;
557 int max_number_of_static_properties = 0; 557 int max_number_of_static_properties = 0;
558 FunctionTemplateInfo* info = *obj; 558 FunctionTemplateInfo* info = *obj;
559 while (true) { 559 while (true) {
560 if (!info->instance_template()->IsUndefined()) { 560 if (!info->instance_template()->IsUndefined()) {
561 Object* props = ObjectTemplateInfo::cast(info->instance_template()) 561 Object* props = ObjectTemplateInfo::cast(info->instance_template())
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
616 Handle<AccessorInfo> accessor(AccessorInfo::cast(array->get(i))); 616 Handle<AccessorInfo> accessor(AccessorInfo::cast(array->get(i)));
617 JSObject::SetAccessor(result, accessor).Assert(); 617 JSObject::SetAccessor(result, accessor).Assert();
618 } 618 }
619 619
620 DCHECK(result->shared()->IsApiFunction()); 620 DCHECK(result->shared()->IsApiFunction());
621 return result; 621 return result;
622 } 622 }
623 623
624 } // namespace internal 624 } // namespace internal
625 } // namespace v8 625 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/bootstrapper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698