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

Side by Side Diff: src/code-stub-assembler.cc

Issue 2628863002: Do security checks in the promise constructor (Closed)
Patch Set: updates Created 3 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 | « src/code-stub-assembler.h ('k') | src/runtime/runtime.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 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 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 #include "src/code-stub-assembler.h" 4 #include "src/code-stub-assembler.h"
5 #include "src/code-factory.h" 5 #include "src/code-factory.h"
6 #include "src/frames-inl.h" 6 #include "src/frames-inl.h"
7 #include "src/frames.h" 7 #include "src/frames.h"
8 8
9 namespace v8 { 9 namespace v8 {
10 namespace internal { 10 namespace internal {
(...skipping 2825 matching lines...) Expand 10 before | Expand all | Expand 10 after
2836 Runtime::kThrowIncompatibleMethodReceiver, context, 2836 Runtime::kThrowIncompatibleMethodReceiver, context,
2837 HeapConstant(factory()->NewStringFromAsciiChecked(method_name, TENURED)), 2837 HeapConstant(factory()->NewStringFromAsciiChecked(method_name, TENURED)),
2838 value); 2838 value);
2839 var_value_map.Bind(UndefinedConstant()); 2839 var_value_map.Bind(UndefinedConstant());
2840 Goto(&out); // Never reached. 2840 Goto(&out); // Never reached.
2841 2841
2842 Bind(&out); 2842 Bind(&out);
2843 return var_value_map.value(); 2843 return var_value_map.value();
2844 } 2844 }
2845 2845
2846 Node* CodeStubAssembler::InstanceTypeEqual(Node* instance_type, int type) {
2847 return Word32Equal(instance_type, Int32Constant(type));
2848 }
2849
2846 Node* CodeStubAssembler::IsSpecialReceiverMap(Node* map) { 2850 Node* CodeStubAssembler::IsSpecialReceiverMap(Node* map) {
2847 Node* is_special = IsSpecialReceiverInstanceType(LoadMapInstanceType(map)); 2851 Node* is_special = IsSpecialReceiverInstanceType(LoadMapInstanceType(map));
2848 uint32_t mask = 2852 uint32_t mask =
2849 1 << Map::kHasNamedInterceptor | 1 << Map::kIsAccessCheckNeeded; 2853 1 << Map::kHasNamedInterceptor | 1 << Map::kIsAccessCheckNeeded;
2850 USE(mask); 2854 USE(mask);
2851 // Interceptors or access checks imply special receiver. 2855 // Interceptors or access checks imply special receiver.
2852 CSA_ASSERT(this, 2856 CSA_ASSERT(this,
2853 SelectConstant(IsSetWord32(LoadMapBitField(map), mask), is_special, 2857 SelectConstant(IsSetWord32(LoadMapBitField(map), mask), is_special,
2854 Int32Constant(1), MachineRepresentation::kWord32)); 2858 Int32Constant(1), MachineRepresentation::kWord32));
2855 return is_special; 2859 return is_special;
(...skipping 5479 matching lines...) Expand 10 before | Expand all | Expand 10 after
8335 StoreObjectFieldNoWriteBarrier(result, 8339 StoreObjectFieldNoWriteBarrier(result,
8336 PromiseReactionJobInfo::kDebugNameOffset, 8340 PromiseReactionJobInfo::kDebugNameOffset,
8337 SmiConstant(kDebugNotActive)); 8341 SmiConstant(kDebugNotActive));
8338 StoreObjectFieldNoWriteBarrier(result, PromiseReactionJobInfo::kContextOffset, 8342 StoreObjectFieldNoWriteBarrier(result, PromiseReactionJobInfo::kContextOffset,
8339 context); 8343 context);
8340 return result; 8344 return result;
8341 } 8345 }
8342 8346
8343 } // namespace internal 8347 } // namespace internal
8344 } // namespace v8 8348 } // namespace v8
OLDNEW
« no previous file with comments | « src/code-stub-assembler.h ('k') | src/runtime/runtime.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698