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

Side by Side Diff: src/objects.cc

Issue 1925803005: [runtime] Don't crash when creating an instance of a class inherited from a Proxy. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 7 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 | test/mjsunit/regress/regress-v8-4972.js » ('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/objects.h" 5 #include "src/objects.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 #include <iomanip> 8 #include <iomanip>
9 #include <sstream> 9 #include <sstream>
10 10
(...skipping 13146 matching lines...) Expand 10 before | Expand all | Expand 10 after
13157 13157
13158 13158
13159 void JSFunction::CalculateInstanceSizeForDerivedClass( 13159 void JSFunction::CalculateInstanceSizeForDerivedClass(
13160 InstanceType instance_type, int requested_internal_fields, 13160 InstanceType instance_type, int requested_internal_fields,
13161 int* instance_size, int* in_object_properties) { 13161 int* instance_size, int* in_object_properties) {
13162 Isolate* isolate = GetIsolate(); 13162 Isolate* isolate = GetIsolate();
13163 int expected_nof_properties = 0; 13163 int expected_nof_properties = 0;
13164 for (PrototypeIterator iter(isolate, this, 13164 for (PrototypeIterator iter(isolate, this,
13165 PrototypeIterator::START_AT_RECEIVER); 13165 PrototypeIterator::START_AT_RECEIVER);
13166 !iter.IsAtEnd(); iter.Advance()) { 13166 !iter.IsAtEnd(); iter.Advance()) {
13167 JSFunction* func = iter.GetCurrent<JSFunction>(); 13167 JSReceiver* current = iter.GetCurrent<JSReceiver>();
13168 if (!current->IsJSFunction()) break;
13169 JSFunction* func = JSFunction::cast(current);
13168 SharedFunctionInfo* shared = func->shared(); 13170 SharedFunctionInfo* shared = func->shared();
13169 expected_nof_properties += shared->expected_nof_properties(); 13171 expected_nof_properties += shared->expected_nof_properties();
13170 if (!IsSubclassConstructor(shared->kind())) { 13172 if (!IsSubclassConstructor(shared->kind())) {
13171 break; 13173 break;
13172 } 13174 }
13173 } 13175 }
13174 CalculateInstanceSizeHelper(instance_type, requested_internal_fields, 13176 CalculateInstanceSizeHelper(instance_type, requested_internal_fields,
13175 expected_nof_properties, instance_size, 13177 expected_nof_properties, instance_size,
13176 in_object_properties); 13178 in_object_properties);
13177 } 13179 }
(...skipping 5709 matching lines...) Expand 10 before | Expand all | Expand 10 after
18887 if (cell->value() != *new_value) { 18889 if (cell->value() != *new_value) {
18888 cell->set_value(*new_value); 18890 cell->set_value(*new_value);
18889 Isolate* isolate = cell->GetIsolate(); 18891 Isolate* isolate = cell->GetIsolate();
18890 cell->dependent_code()->DeoptimizeDependentCodeGroup( 18892 cell->dependent_code()->DeoptimizeDependentCodeGroup(
18891 isolate, DependentCode::kPropertyCellChangedGroup); 18893 isolate, DependentCode::kPropertyCellChangedGroup);
18892 } 18894 }
18893 } 18895 }
18894 18896
18895 } // namespace internal 18897 } // namespace internal
18896 } // namespace v8 18898 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-v8-4972.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698