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

Side by Side Diff: src/objects.cc

Issue 10535007: Put inherited readonliness behind a flag, (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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/flag-definitions.h ('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 2116 matching lines...) Expand 10 before | Expand all | Expand 10 after
2127 } 2127 }
2128 case MAP_TRANSITION: 2128 case MAP_TRANSITION:
2129 case CONSTANT_TRANSITION: 2129 case CONSTANT_TRANSITION:
2130 case NULL_DESCRIPTOR: 2130 case NULL_DESCRIPTOR:
2131 case ELEMENTS_TRANSITION: 2131 case ELEMENTS_TRANSITION:
2132 break; 2132 break;
2133 } 2133 }
2134 } 2134 }
2135 2135
2136 // If we get here with *done true, we have encountered a read-only property. 2136 // If we get here with *done true, we have encountered a read-only property.
2137 if (!FLAG_es5_readonly) *done = false;
2137 if (*done) { 2138 if (*done) {
2138 if (strict_mode == kNonStrictMode) return value; 2139 if (strict_mode == kNonStrictMode) return value;
2139 Handle<Object> args[] = { Handle<Object>(name), Handle<Object>(this)}; 2140 Handle<Object> args[] = { Handle<Object>(name), Handle<Object>(this)};
2140 return isolate->Throw(*isolate->factory()->NewTypeError( 2141 return isolate->Throw(*isolate->factory()->NewTypeError(
2141 "strict_read_only_property", HandleVector(args, ARRAY_SIZE(args)))); 2142 "strict_read_only_property", HandleVector(args, ARRAY_SIZE(args))));
2142 } 2143 }
2143 return heap->the_hole_value(); 2144 return heap->the_hole_value();
2144 } 2145 }
2145 2146
2146 2147
(...skipping 11085 matching lines...) Expand 10 before | Expand all | Expand 10 after
13232 set_year(Smi::FromInt(year), SKIP_WRITE_BARRIER); 13233 set_year(Smi::FromInt(year), SKIP_WRITE_BARRIER);
13233 set_month(Smi::FromInt(month), SKIP_WRITE_BARRIER); 13234 set_month(Smi::FromInt(month), SKIP_WRITE_BARRIER);
13234 set_day(Smi::FromInt(day), SKIP_WRITE_BARRIER); 13235 set_day(Smi::FromInt(day), SKIP_WRITE_BARRIER);
13235 set_weekday(Smi::FromInt(weekday), SKIP_WRITE_BARRIER); 13236 set_weekday(Smi::FromInt(weekday), SKIP_WRITE_BARRIER);
13236 set_hour(Smi::FromInt(hour), SKIP_WRITE_BARRIER); 13237 set_hour(Smi::FromInt(hour), SKIP_WRITE_BARRIER);
13237 set_min(Smi::FromInt(min), SKIP_WRITE_BARRIER); 13238 set_min(Smi::FromInt(min), SKIP_WRITE_BARRIER);
13238 set_sec(Smi::FromInt(sec), SKIP_WRITE_BARRIER); 13239 set_sec(Smi::FromInt(sec), SKIP_WRITE_BARRIER);
13239 } 13240 }
13240 13241
13241 } } // namespace v8::internal 13242 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/flag-definitions.h ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698