| OLD | NEW |
| 1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 2731 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2742 "length exceeds max acceptable value")) { | 2742 "length exceeds max acceptable value")) { |
| 2743 return; | 2743 return; |
| 2744 } | 2744 } |
| 2745 i::Handle<i::JSObject> self = Utils::OpenHandle(this); | 2745 i::Handle<i::JSObject> self = Utils::OpenHandle(this); |
| 2746 if (!ApiCheck(!self->IsJSArray(), | 2746 if (!ApiCheck(!self->IsJSArray(), |
| 2747 "v8::Object::SetIndexedPropertiesToPixelData()", | 2747 "v8::Object::SetIndexedPropertiesToPixelData()", |
| 2748 "JSArray is not supported")) { | 2748 "JSArray is not supported")) { |
| 2749 return; | 2749 return; |
| 2750 } | 2750 } |
| 2751 i::Handle<i::PixelArray> pixels = i::Factory::NewPixelArray(length, data); | 2751 i::Handle<i::PixelArray> pixels = i::Factory::NewPixelArray(length, data); |
| 2752 i::Handle<i::Map> slow_map = | 2752 i::Handle<i::Map> pixel_array_map = |
| 2753 i::Factory::GetSlowElementsMap(i::Handle<i::Map>(self->map())); | 2753 i::Factory::GetPixelArrayElementsMap(i::Handle<i::Map>(self->map())); |
| 2754 self->set_map(*slow_map); | 2754 self->set_map(*pixel_array_map); |
| 2755 self->set_elements(*pixels); | 2755 self->set_elements(*pixels); |
| 2756 } | 2756 } |
| 2757 | 2757 |
| 2758 | 2758 |
| 2759 bool v8::Object::HasIndexedPropertiesInPixelData() { | 2759 bool v8::Object::HasIndexedPropertiesInPixelData() { |
| 2760 ON_BAILOUT("v8::HasIndexedPropertiesInPixelData()", return false); | 2760 ON_BAILOUT("v8::HasIndexedPropertiesInPixelData()", return false); |
| 2761 i::Handle<i::JSObject> self = Utils::OpenHandle(this); | 2761 i::Handle<i::JSObject> self = Utils::OpenHandle(this); |
| 2762 return self->HasPixelElements(); | 2762 return self->HasPixelElements(); |
| 2763 } | 2763 } |
| 2764 | 2764 |
| (...skipping 2395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5160 | 5160 |
| 5161 | 5161 |
| 5162 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { | 5162 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { |
| 5163 HandleScopeImplementer* thread_local = | 5163 HandleScopeImplementer* thread_local = |
| 5164 reinterpret_cast<HandleScopeImplementer*>(storage); | 5164 reinterpret_cast<HandleScopeImplementer*>(storage); |
| 5165 thread_local->IterateThis(v); | 5165 thread_local->IterateThis(v); |
| 5166 return storage + ArchiveSpacePerThread(); | 5166 return storage + ArchiveSpacePerThread(); |
| 5167 } | 5167 } |
| 5168 | 5168 |
| 5169 } } // namespace v8::internal | 5169 } } // namespace v8::internal |
| OLD | NEW |