Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 2388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2399 return value; | 2399 return value; |
| 2400 } | 2400 } |
| 2401 | 2401 |
| 2402 | 2402 |
| 2403 // Set a real local property, even if it is READ_ONLY. If the property is not | 2403 // Set a real local property, even if it is READ_ONLY. If the property is not |
| 2404 // present, add it with attributes NONE. This code is an exact clone of | 2404 // present, add it with attributes NONE. This code is an exact clone of |
| 2405 // SetProperty, with the check for IsReadOnly and the check for a | 2405 // SetProperty, with the check for IsReadOnly and the check for a |
| 2406 // callback setter removed. The two lines looking up the LookupResult | 2406 // callback setter removed. The two lines looking up the LookupResult |
| 2407 // result are also added. If one of the functions is changed, the other | 2407 // result are also added. If one of the functions is changed, the other |
| 2408 // should be. | 2408 // should be. |
| 2409 // Note that this method cannot be used to set the prototype of a function (it | |
|
Mads Ager (chromium)
2011/07/11 10:12:54
If you want a note here I think it should explain
| |
| 2410 // will silently fail). | |
| 2409 MaybeObject* JSObject::SetLocalPropertyIgnoreAttributes( | 2411 MaybeObject* JSObject::SetLocalPropertyIgnoreAttributes( |
| 2410 String* name, | 2412 String* name, |
| 2411 Object* value, | 2413 Object* value, |
| 2412 PropertyAttributes attributes) { | 2414 PropertyAttributes attributes) { |
| 2413 | 2415 |
| 2414 // Make sure that the top context does not change when doing callbacks or | 2416 // Make sure that the top context does not change when doing callbacks or |
| 2415 // interceptor calls. | 2417 // interceptor calls. |
| 2416 AssertNoContextChange ncc; | 2418 AssertNoContextChange ncc; |
| 2417 LookupResult result; | 2419 LookupResult result; |
| 2418 LocalLookup(name, &result); | 2420 LocalLookup(name, &result); |
| (...skipping 9239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 11658 if (break_point_objects()->IsUndefined()) return 0; | 11660 if (break_point_objects()->IsUndefined()) return 0; |
| 11659 // Single beak point. | 11661 // Single beak point. |
| 11660 if (!break_point_objects()->IsFixedArray()) return 1; | 11662 if (!break_point_objects()->IsFixedArray()) return 1; |
| 11661 // Multiple break points. | 11663 // Multiple break points. |
| 11662 return FixedArray::cast(break_point_objects())->length(); | 11664 return FixedArray::cast(break_point_objects())->length(); |
| 11663 } | 11665 } |
| 11664 #endif | 11666 #endif |
| 11665 | 11667 |
| 11666 | 11668 |
| 11667 } } // namespace v8::internal | 11669 } } // namespace v8::internal |
| OLD | NEW |