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

Side by Side Diff: src/objects-debug.cc

Issue 2373013002: [typedarray] Really check that the JSTypedArray::length is always a Smi. (Closed)
Patch Set: Created 4 years, 2 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/runtime/runtime-typedarray.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 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/objects.h" 5 #include "src/objects.h"
6 6
7 #include "src/bootstrapper.h" 7 #include "src/bootstrapper.h"
8 #include "src/disasm.h" 8 #include "src/disasm.h"
9 #include "src/disassembler.h" 9 #include "src/disassembler.h"
10 #include "src/field-type.h" 10 #include "src/field-type.h"
(...skipping 870 matching lines...) Expand 10 before | Expand all | Expand 10 after
881 VerifyPointer(raw_byte_length()); 881 VerifyPointer(raw_byte_length());
882 CHECK(raw_byte_length()->IsSmi() || raw_byte_length()->IsHeapNumber() || 882 CHECK(raw_byte_length()->IsSmi() || raw_byte_length()->IsHeapNumber() ||
883 raw_byte_length()->IsUndefined(isolate)); 883 raw_byte_length()->IsUndefined(isolate));
884 } 884 }
885 885
886 886
887 void JSTypedArray::JSTypedArrayVerify() { 887 void JSTypedArray::JSTypedArrayVerify() {
888 CHECK(IsJSTypedArray()); 888 CHECK(IsJSTypedArray());
889 JSArrayBufferViewVerify(); 889 JSArrayBufferViewVerify();
890 VerifyPointer(raw_length()); 890 VerifyPointer(raw_length());
891 CHECK(raw_length()->IsSmi() || raw_length()->IsHeapNumber() || 891 CHECK(raw_length()->IsSmi() || raw_length()->IsUndefined(GetIsolate()));
892 raw_length()->IsUndefined(GetIsolate()));
893
894 VerifyPointer(elements()); 892 VerifyPointer(elements());
895 } 893 }
896 894
897 895
898 void JSDataView::JSDataViewVerify() { 896 void JSDataView::JSDataViewVerify() {
899 CHECK(IsJSDataView()); 897 CHECK(IsJSDataView());
900 JSArrayBufferViewVerify(); 898 JSArrayBufferViewVerify();
901 } 899 }
902 900
903 901
(...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after
1364 1362
1365 // Both are done at the same time. 1363 // Both are done at the same time.
1366 CHECK_EQ(new_it.done(), old_it.done()); 1364 CHECK_EQ(new_it.done(), old_it.done());
1367 } 1365 }
1368 1366
1369 1367
1370 #endif // DEBUG 1368 #endif // DEBUG
1371 1369
1372 } // namespace internal 1370 } // namespace internal
1373 } // namespace v8 1371 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/runtime/runtime-typedarray.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698