Attempt at work-around for http://crbug.com/16276 by explicitly checking
for global objects in the assembly code for dictionary loads. Review URL: http://codereview.chromium.org/155418 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2435 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
e9f42cde46
commit
067b3af8b7
@ -75,6 +75,12 @@ static void GenerateDictionaryLoad(MacroAssembler* masm, Label* miss_label,
|
||||
__ cmp(r0, JS_GLOBAL_PROXY_TYPE);
|
||||
__ j(equal, miss_label, not_taken);
|
||||
|
||||
// Possible work-around for http://crbug.com/16276.
|
||||
__ cmp(r0, JS_GLOBAL_OBJECT_TYPE);
|
||||
__ j(equal, miss_label, not_taken);
|
||||
__ cmp(r0, JS_BUILTINS_OBJECT_TYPE);
|
||||
__ j(equal, miss_label, not_taken);
|
||||
|
||||
// Check that the properties array is a dictionary.
|
||||
__ mov(r0, FieldOperand(r1, JSObject::kPropertiesOffset));
|
||||
__ cmp(FieldOperand(r0, HeapObject::kMapOffset),
|
||||
|
@ -1069,6 +1069,7 @@ Object* JSGlobalPropertyCell::value() {
|
||||
|
||||
void JSGlobalPropertyCell::set_value(Object* val, WriteBarrierMode ignored) {
|
||||
// The write barrier is not used for global property cells.
|
||||
ASSERT(!val->IsJSGlobalPropertyCell());
|
||||
WRITE_FIELD(this, kValueOffset, val);
|
||||
}
|
||||
|
||||
|
@ -1632,6 +1632,7 @@ Object* JSObject::SetPropertyWithDefinedSetter(JSFunction* setter,
|
||||
return *value_handle;
|
||||
}
|
||||
|
||||
|
||||
void JSObject::LookupCallbackSetterInPrototypes(String* name,
|
||||
LookupResult* result) {
|
||||
for (Object* pt = GetPrototype();
|
||||
@ -1659,7 +1660,7 @@ Object* JSObject::LookupCallbackSetterInPrototypes(uint32_t index) {
|
||||
if (JSObject::cast(pt)->HasFastElements()) continue;
|
||||
NumberDictionary* dictionary = JSObject::cast(pt)->element_dictionary();
|
||||
int entry = dictionary->FindEntry(index);
|
||||
if (entry != StringDictionary::kNotFound) {
|
||||
if (entry != NumberDictionary::kNotFound) {
|
||||
Object* element = dictionary->ValueAt(entry);
|
||||
PropertyDetails details = dictionary->DetailsAt(entry);
|
||||
if (details.type() == CALLBACKS) {
|
||||
|
Loading…
Reference in New Issue
Block a user