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

Side by Side Diff: src/isolate.cc

Issue 2131383002: [builtins] take slow path in IsConcatSpreadable if proxy in prototype (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebased Created 4 years, 5 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 | « src/isolate.h ('k') | src/objects.h » ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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/isolate.h" 5 #include "src/isolate.h"
6 6
7 #include <stdlib.h> 7 #include <stdlib.h>
8 8
9 #include <fstream> // NOLINT(readability/streams) 9 #include <fstream> // NOLINT(readability/streams)
10 #include <sstream> 10 #include <sstream>
(...skipping 2667 matching lines...) Expand 10 before | Expand all | Expand 10 after
2678 // @@isConcatSpreadable property on Array.prototype or Object.prototype 2678 // @@isConcatSpreadable property on Array.prototype or Object.prototype
2679 // hence the reverse implication doesn't hold. 2679 // hence the reverse implication doesn't hold.
2680 DCHECK(is_is_concat_spreadable_set); 2680 DCHECK(is_is_concat_spreadable_set);
2681 return false; 2681 return false;
2682 } 2682 }
2683 #endif // DEBUG 2683 #endif // DEBUG
2684 2684
2685 return !is_is_concat_spreadable_set; 2685 return !is_is_concat_spreadable_set;
2686 } 2686 }
2687 2687
2688 bool Isolate::IsIsConcatSpreadableLookupChainIntact(JSReceiver* receiver) {
2689 if (!IsIsConcatSpreadableLookupChainIntact()) return false;
2690 return !receiver->HasProxyInPrototype(this);
2691 }
2692
2688 void Isolate::UpdateArrayProtectorOnSetElement(Handle<JSObject> object) { 2693 void Isolate::UpdateArrayProtectorOnSetElement(Handle<JSObject> object) {
2689 DisallowHeapAllocation no_gc; 2694 DisallowHeapAllocation no_gc;
2690 if (!object->map()->is_prototype_map()) return; 2695 if (!object->map()->is_prototype_map()) return;
2691 if (!IsFastArrayConstructorPrototypeChainIntact()) return; 2696 if (!IsFastArrayConstructorPrototypeChainIntact()) return;
2692 if (!IsArrayOrObjectPrototype(*object)) return; 2697 if (!IsArrayOrObjectPrototype(*object)) return;
2693 PropertyCell::SetValueWithInvalidation( 2698 PropertyCell::SetValueWithInvalidation(
2694 factory()->array_protector(), 2699 factory()->array_protector(),
2695 handle(Smi::FromInt(kArrayProtectorInvalid), this)); 2700 handle(Smi::FromInt(kArrayProtectorInvalid), this));
2696 } 2701 }
2697 2702
(...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after
3116 // Then check whether this scope intercepts. 3121 // Then check whether this scope intercepts.
3117 if ((flag & intercept_mask_)) { 3122 if ((flag & intercept_mask_)) {
3118 intercepted_flags_ |= flag; 3123 intercepted_flags_ |= flag;
3119 return true; 3124 return true;
3120 } 3125 }
3121 return false; 3126 return false;
3122 } 3127 }
3123 3128
3124 } // namespace internal 3129 } // namespace internal
3125 } // namespace v8 3130 } // namespace v8
OLDNEW
« no previous file with comments | « src/isolate.h ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698