| OLD | NEW |
| 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 900 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 911 return false; | 911 return false; |
| 912 } | 912 } |
| 913 } | 913 } |
| 914 if (isObserved) { | 914 if (isObserved) { |
| 915 var new_desc = GetOwnProperty(obj, "length"); | 915 var new_desc = GetOwnProperty(obj, "length"); |
| 916 var updated = length_desc.value_ !== new_desc.value_; | 916 var updated = length_desc.value_ !== new_desc.value_; |
| 917 var reconfigured = length_desc.writable_ !== new_desc.writable_ || | 917 var reconfigured = length_desc.writable_ !== new_desc.writable_ || |
| 918 length_desc.configurable_ !== new_desc.configurable_ || | 918 length_desc.configurable_ !== new_desc.configurable_ || |
| 919 length_desc.enumerable_ !== new_desc.configurable_; | 919 length_desc.enumerable_ !== new_desc.configurable_; |
| 920 if (updated || reconfigured) { | 920 if (updated || reconfigured) { |
| 921 NotifyChange(reconfigured ? "reconfigured" : "updated", | 921 %EnqueueChangeRecord(obj, reconfigured ? "reconfigured" : "updated", |
| 922 obj, "length", length_desc.value_); | 922 "length", length_desc.value_); |
| 923 } | 923 } |
| 924 } | 924 } |
| 925 return true; | 925 return true; |
| 926 } | 926 } |
| 927 | 927 |
| 928 // Step 4 - Special handling for array index. | 928 // Step 4 - Special handling for array index. |
| 929 var index = ToUint32(p); | 929 var index = ToUint32(p); |
| 930 if (index == ToNumber(p) && index != 4294967295) { | 930 if (index == ToNumber(p) && index != 4294967295) { |
| 931 var length = obj.length; | 931 var length = obj.length; |
| 932 var length_desc = GetOwnProperty(obj, "length"); | 932 var length_desc = GetOwnProperty(obj, "length"); |
| (...skipping 785 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1718 | 1718 |
| 1719 function SetUpFunction() { | 1719 function SetUpFunction() { |
| 1720 %CheckIsBootstrapping(); | 1720 %CheckIsBootstrapping(); |
| 1721 InstallFunctions($Function.prototype, DONT_ENUM, $Array( | 1721 InstallFunctions($Function.prototype, DONT_ENUM, $Array( |
| 1722 "bind", FunctionBind, | 1722 "bind", FunctionBind, |
| 1723 "toString", FunctionToString | 1723 "toString", FunctionToString |
| 1724 )); | 1724 )); |
| 1725 } | 1725 } |
| 1726 | 1726 |
| 1727 SetUpFunction(); | 1727 SetUpFunction(); |
| OLD | NEW |