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

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

Issue 1730853005: [interpreter] Make setting of function data more resilient. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@local_interpreter-test-enable-strong
Patch Set: Addressed comments. Created 4 years, 10 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') | src/objects-inl.h » ('J')
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 546 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « no previous file | src/bootstrapper.cc » ('j') | src/objects-inl.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698