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

Side by Side Diff: src/objects.cc

Issue 195163002: fix bad access check check (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-crbug-351262.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 5896 matching lines...) Expand 10 before | Expand all | Expand 10 after
5907 // - No prototype has enumerable properties/elements. 5907 // - No prototype has enumerable properties/elements.
5908 bool JSReceiver::IsSimpleEnum() { 5908 bool JSReceiver::IsSimpleEnum() {
5909 Heap* heap = GetHeap(); 5909 Heap* heap = GetHeap();
5910 for (Object* o = this; 5910 for (Object* o = this;
5911 o != heap->null_value(); 5911 o != heap->null_value();
5912 o = JSObject::cast(o)->GetPrototype()) { 5912 o = JSObject::cast(o)->GetPrototype()) {
5913 if (!o->IsJSObject()) return false; 5913 if (!o->IsJSObject()) return false;
5914 JSObject* curr = JSObject::cast(o); 5914 JSObject* curr = JSObject::cast(o);
5915 int enum_length = curr->map()->EnumLength(); 5915 int enum_length = curr->map()->EnumLength();
5916 if (enum_length == kInvalidEnumCacheSentinel) return false; 5916 if (enum_length == kInvalidEnumCacheSentinel) return false;
5917 if (curr->IsAccessCheckNeeded()) return false;
5917 ASSERT(!curr->HasNamedInterceptor()); 5918 ASSERT(!curr->HasNamedInterceptor());
5918 ASSERT(!curr->HasIndexedInterceptor()); 5919 ASSERT(!curr->HasIndexedInterceptor());
5919 ASSERT(!curr->IsAccessCheckNeeded());
5920 if (curr->NumberOfEnumElements() > 0) return false; 5920 if (curr->NumberOfEnumElements() > 0) return false;
5921 if (curr != this && enum_length != 0) return false; 5921 if (curr != this && enum_length != 0) return false;
5922 } 5922 }
5923 return true; 5923 return true;
5924 } 5924 }
5925 5925
5926 5926
5927 static bool FilterKey(Object* key, PropertyAttributes filter) { 5927 static bool FilterKey(Object* key, PropertyAttributes filter) {
5928 if ((filter & SYMBOLIC) && key->IsSymbol()) { 5928 if ((filter & SYMBOLIC) && key->IsSymbol()) {
5929 return true; 5929 return true;
(...skipping 10568 matching lines...) Expand 10 before | Expand all | Expand 10 after
16498 #define ERROR_MESSAGES_TEXTS(C, T) T, 16498 #define ERROR_MESSAGES_TEXTS(C, T) T,
16499 static const char* error_messages_[] = { 16499 static const char* error_messages_[] = {
16500 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) 16500 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS)
16501 }; 16501 };
16502 #undef ERROR_MESSAGES_TEXTS 16502 #undef ERROR_MESSAGES_TEXTS
16503 return error_messages_[reason]; 16503 return error_messages_[reason];
16504 } 16504 }
16505 16505
16506 16506
16507 } } // namespace v8::internal 16507 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-crbug-351262.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698