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

Side by Side Diff: src/objects.cc

Issue 19690008: Merged r15610 into 3.19 branch. (Closed) Base URL: https://v8.googlecode.com/svn/branches/3.19
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | src/version.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 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 3224 matching lines...) Expand 10 before | Expand all | Expand 10 after
3235 3235
3236 return AddMissingElementsTransitions(closest_map, kind); 3236 return AddMissingElementsTransitions(closest_map, kind);
3237 } 3237 }
3238 3238
3239 3239
3240 void JSObject::LocalLookupRealNamedProperty(Name* name, LookupResult* result) { 3240 void JSObject::LocalLookupRealNamedProperty(Name* name, LookupResult* result) {
3241 if (IsJSGlobalProxy()) { 3241 if (IsJSGlobalProxy()) {
3242 Object* proto = GetPrototype(); 3242 Object* proto = GetPrototype();
3243 if (proto->IsNull()) return result->NotFound(); 3243 if (proto->IsNull()) return result->NotFound();
3244 ASSERT(proto->IsJSGlobalObject()); 3244 ASSERT(proto->IsJSGlobalObject());
3245 // A GlobalProxy's prototype should always be a proper JSObject.
3246 return JSObject::cast(proto)->LocalLookupRealNamedProperty(name, result); 3245 return JSObject::cast(proto)->LocalLookupRealNamedProperty(name, result);
3247 } 3246 }
3248 3247
3249 if (HasFastProperties()) { 3248 if (HasFastProperties()) {
3250 map()->LookupDescriptor(this, name, result); 3249 map()->LookupDescriptor(this, name, result);
3251 // A property or a map transition was found. We return all of these result 3250 // A property or a map transition was found. We return all of these result
3252 // types because LocalLookupRealNamedProperty is used when setting 3251 // types because LocalLookupRealNamedProperty is used when setting
3253 // properties where map transitions are handled. 3252 // properties where map transitions are handled.
3254 ASSERT(!result->IsFound() || 3253 ASSERT(!result->IsFound() ||
3255 (result->holder() == this && result->IsFastPropertyType())); 3254 (result->holder() == this && result->IsFastPropertyType()));
(...skipping 9576 matching lines...) Expand 10 before | Expand all | Expand 10 after
12832 12831
12833 bool JSObject::HasRealElementProperty(Isolate* isolate, uint32_t index) { 12832 bool JSObject::HasRealElementProperty(Isolate* isolate, uint32_t index) {
12834 // Check access rights if needed. 12833 // Check access rights if needed.
12835 if (IsAccessCheckNeeded()) { 12834 if (IsAccessCheckNeeded()) {
12836 if (!isolate->MayIndexedAccess(this, index, v8::ACCESS_HAS)) { 12835 if (!isolate->MayIndexedAccess(this, index, v8::ACCESS_HAS)) {
12837 isolate->ReportFailedAccessCheck(this, v8::ACCESS_HAS); 12836 isolate->ReportFailedAccessCheck(this, v8::ACCESS_HAS);
12838 return false; 12837 return false;
12839 } 12838 }
12840 } 12839 }
12841 12840
12841 if (IsJSGlobalProxy()) {
12842 Object* proto = GetPrototype();
12843 if (proto->IsNull()) return false;
12844 ASSERT(proto->IsJSGlobalObject());
12845 return JSObject::cast(proto)->HasRealElementProperty(isolate, index);
12846 }
12847
12842 return GetElementAttributeWithoutInterceptor(this, index, false) != ABSENT; 12848 return GetElementAttributeWithoutInterceptor(this, index, false) != ABSENT;
12843 } 12849 }
12844 12850
12845 12851
12846 bool JSObject::HasRealNamedCallbackProperty(Isolate* isolate, Name* key) { 12852 bool JSObject::HasRealNamedCallbackProperty(Isolate* isolate, Name* key) {
12847 // Check access rights if needed. 12853 // Check access rights if needed.
12848 if (IsAccessCheckNeeded()) { 12854 if (IsAccessCheckNeeded()) {
12849 if (!isolate->MayNamedAccess(this, key, v8::ACCESS_HAS)) { 12855 if (!isolate->MayNamedAccess(this, key, v8::ACCESS_HAS)) {
12850 isolate->ReportFailedAccessCheck(this, v8::ACCESS_HAS); 12856 isolate->ReportFailedAccessCheck(this, v8::ACCESS_HAS);
12851 return false; 12857 return false;
(...skipping 2965 matching lines...) Expand 10 before | Expand all | Expand 10 after
15817 return static_cast<Type*>(type_raw()); 15823 return static_cast<Type*>(type_raw());
15818 } 15824 }
15819 15825
15820 15826
15821 void PropertyCell::set_type(Type* type, WriteBarrierMode ignored) { 15827 void PropertyCell::set_type(Type* type, WriteBarrierMode ignored) {
15822 set_type_raw(type, ignored); 15828 set_type_raw(type, ignored);
15823 } 15829 }
15824 15830
15825 15831
15826 } } // namespace v8::internal 15832 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/version.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698