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.cc

Issue 10535011: Remove one more case behind --es5_readonly flag. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed Michael's comment. Created 8 years, 6 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 | « src/hydrogen.cc ('k') | test/cctest/test-api.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 // 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 2099 matching lines...) Expand 10 before | Expand all | Expand 10 after
2110 *done = result.IsReadOnly(); 2110 *done = result.IsReadOnly();
2111 break; 2111 break;
2112 case INTERCEPTOR: { 2112 case INTERCEPTOR: {
2113 PropertyAttributes attr = 2113 PropertyAttributes attr =
2114 result.holder()->GetPropertyAttributeWithInterceptor( 2114 result.holder()->GetPropertyAttributeWithInterceptor(
2115 this, name, true); 2115 this, name, true);
2116 *done = !!(attr & READ_ONLY); 2116 *done = !!(attr & READ_ONLY);
2117 break; 2117 break;
2118 } 2118 }
2119 case CALLBACKS: { 2119 case CALLBACKS: {
2120 if (!FLAG_es5_readonly && result.IsReadOnly()) break;
2120 *done = true; 2121 *done = true;
2121 return SetPropertyWithCallback(result.GetCallbackObject(), 2122 return SetPropertyWithCallback(result.GetCallbackObject(),
2122 name, value, result.holder(), strict_mode); 2123 name, value, result.holder(), strict_mode);
2123 } 2124 }
2124 case HANDLER: { 2125 case HANDLER: {
2125 return result.proxy()->SetPropertyViaPrototypesWithHandler( 2126 return result.proxy()->SetPropertyViaPrototypesWithHandler(
2126 this, name, value, attributes, strict_mode, done); 2127 this, name, value, attributes, strict_mode, done);
2127 } 2128 }
2128 case MAP_TRANSITION: 2129 case MAP_TRANSITION:
2129 case CONSTANT_TRANSITION: 2130 case CONSTANT_TRANSITION:
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after
2543 void JSObject::LookupRealNamedPropertyInPrototypes(String* name, 2544 void JSObject::LookupRealNamedPropertyInPrototypes(String* name,
2544 LookupResult* result) { 2545 LookupResult* result) {
2545 Heap* heap = GetHeap(); 2546 Heap* heap = GetHeap();
2546 for (Object* pt = GetPrototype(); 2547 for (Object* pt = GetPrototype();
2547 pt != heap->null_value(); 2548 pt != heap->null_value();
2548 pt = pt->GetPrototype()) { 2549 pt = pt->GetPrototype()) {
2549 if (pt->IsJSProxy()) { 2550 if (pt->IsJSProxy()) {
2550 return result->HandlerResult(JSProxy::cast(pt)); 2551 return result->HandlerResult(JSProxy::cast(pt));
2551 } 2552 }
2552 JSObject::cast(pt)->LocalLookupRealNamedProperty(name, result); 2553 JSObject::cast(pt)->LocalLookupRealNamedProperty(name, result);
2554 ASSERT(!(result->IsProperty() && result->type() == INTERCEPTOR));
2553 if (result->IsProperty()) return; 2555 if (result->IsProperty()) return;
2554 } 2556 }
2555 result->NotFound(); 2557 result->NotFound();
2556 } 2558 }
2557 2559
2558 2560
2559 // We only need to deal with CALLBACKS and INTERCEPTORS 2561 // We only need to deal with CALLBACKS and INTERCEPTORS
2560 MaybeObject* JSObject::SetPropertyWithFailedAccessCheck( 2562 MaybeObject* JSObject::SetPropertyWithFailedAccessCheck(
2561 LookupResult* result, 2563 LookupResult* result,
2562 String* name, 2564 String* name,
(...skipping 10670 matching lines...) Expand 10 before | Expand all | Expand 10 after
13233 set_year(Smi::FromInt(year), SKIP_WRITE_BARRIER); 13235 set_year(Smi::FromInt(year), SKIP_WRITE_BARRIER);
13234 set_month(Smi::FromInt(month), SKIP_WRITE_BARRIER); 13236 set_month(Smi::FromInt(month), SKIP_WRITE_BARRIER);
13235 set_day(Smi::FromInt(day), SKIP_WRITE_BARRIER); 13237 set_day(Smi::FromInt(day), SKIP_WRITE_BARRIER);
13236 set_weekday(Smi::FromInt(weekday), SKIP_WRITE_BARRIER); 13238 set_weekday(Smi::FromInt(weekday), SKIP_WRITE_BARRIER);
13237 set_hour(Smi::FromInt(hour), SKIP_WRITE_BARRIER); 13239 set_hour(Smi::FromInt(hour), SKIP_WRITE_BARRIER);
13238 set_min(Smi::FromInt(min), SKIP_WRITE_BARRIER); 13240 set_min(Smi::FromInt(min), SKIP_WRITE_BARRIER);
13239 set_sec(Smi::FromInt(sec), SKIP_WRITE_BARRIER); 13241 set_sec(Smi::FromInt(sec), SKIP_WRITE_BARRIER);
13240 } 13242 }
13241 13243
13242 } } // namespace v8::internal 13244 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/hydrogen.cc ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698