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

Side by Side Diff: src/objects.cc

Issue 12212011: Make __proto__ a foreign callback on Object.prototype. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Added regression test for issue 2441. Created 7 years, 10 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/json-parser.h ('k') | src/property.h » ('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 4568 matching lines...) Expand 10 before | Expand all | Expand 10 after
4579 } 4579 }
4580 4580
4581 // Do not use inline caching if the object is a non-global object 4581 // Do not use inline caching if the object is a non-global object
4582 // that requires access checks. 4582 // that requires access checks.
4583 if (IsAccessCheckNeeded()) { 4583 if (IsAccessCheckNeeded()) {
4584 result->DisallowCaching(); 4584 result->DisallowCaching();
4585 } 4585 }
4586 4586
4587 JSObject* js_object = JSObject::cast(this); 4587 JSObject* js_object = JSObject::cast(this);
4588 4588
4589 // Check __proto__ before interceptor.
4590 if (name->Equals(heap->Proto_symbol()) && !IsJSContextExtensionObject()) {
4591 result->ConstantResult(js_object);
4592 return;
4593 }
4594
4595 // Check for lookup interceptor except when bootstrapping. 4589 // Check for lookup interceptor except when bootstrapping.
4596 if (js_object->HasNamedInterceptor() && 4590 if (js_object->HasNamedInterceptor() &&
4597 !heap->isolate()->bootstrapper()->IsActive()) { 4591 !heap->isolate()->bootstrapper()->IsActive()) {
4598 result->InterceptorResult(js_object); 4592 result->InterceptorResult(js_object);
4599 return; 4593 return;
4600 } 4594 }
4601 4595
4602 js_object->LocalLookupRealNamedProperty(name, result); 4596 js_object->LocalLookupRealNamedProperty(name, result);
4603 if (result->IsFound() || !search_hidden_prototypes) return; 4597 if (result->IsFound() || !search_hidden_prototypes) return;
4604 4598
(...skipping 9259 matching lines...) Expand 10 before | Expand all | Expand 10 after
13864 set_year(Smi::FromInt(year), SKIP_WRITE_BARRIER); 13858 set_year(Smi::FromInt(year), SKIP_WRITE_BARRIER);
13865 set_month(Smi::FromInt(month), SKIP_WRITE_BARRIER); 13859 set_month(Smi::FromInt(month), SKIP_WRITE_BARRIER);
13866 set_day(Smi::FromInt(day), SKIP_WRITE_BARRIER); 13860 set_day(Smi::FromInt(day), SKIP_WRITE_BARRIER);
13867 set_weekday(Smi::FromInt(weekday), SKIP_WRITE_BARRIER); 13861 set_weekday(Smi::FromInt(weekday), SKIP_WRITE_BARRIER);
13868 set_hour(Smi::FromInt(hour), SKIP_WRITE_BARRIER); 13862 set_hour(Smi::FromInt(hour), SKIP_WRITE_BARRIER);
13869 set_min(Smi::FromInt(min), SKIP_WRITE_BARRIER); 13863 set_min(Smi::FromInt(min), SKIP_WRITE_BARRIER);
13870 set_sec(Smi::FromInt(sec), SKIP_WRITE_BARRIER); 13864 set_sec(Smi::FromInt(sec), SKIP_WRITE_BARRIER);
13871 } 13865 }
13872 13866
13873 } } // namespace v8::internal 13867 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/json-parser.h ('k') | src/property.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698