| 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 787 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 798 } else if (!IS_UNDEFINED(current)) { | 798 } else if (!IS_UNDEFINED(current)) { |
| 799 flag |= current.isEnumerable() ? 0 : DONT_ENUM; | 799 flag |= current.isEnumerable() ? 0 : DONT_ENUM; |
| 800 } else { | 800 } else { |
| 801 flag |= DONT_ENUM; | 801 flag |= DONT_ENUM; |
| 802 } | 802 } |
| 803 | 803 |
| 804 if (desc.hasConfigurable()) { | 804 if (desc.hasConfigurable()) { |
| 805 flag |= desc.isConfigurable() ? 0 : DONT_DELETE; | 805 flag |= desc.isConfigurable() ? 0 : DONT_DELETE; |
| 806 } else if (!IS_UNDEFINED(current)) { | 806 } else if (!IS_UNDEFINED(current)) { |
| 807 flag |= current.isConfigurable() ? 0 : DONT_DELETE; | 807 flag |= current.isConfigurable() ? 0 : DONT_DELETE; |
| 808 } else | 808 } else { |
| 809 flag |= DONT_DELETE; | 809 flag |= DONT_DELETE; |
| 810 } |
| 810 | 811 |
| 811 if (IsDataDescriptor(desc) || | 812 if (IsDataDescriptor(desc) || |
| 812 (IsGenericDescriptor(desc) && | 813 (IsGenericDescriptor(desc) && |
| 813 (IS_UNDEFINED(current) || IsDataDescriptor(current)))) { | 814 (IS_UNDEFINED(current) || IsDataDescriptor(current)))) { |
| 814 // There are 3 cases that lead here: | 815 // There are 3 cases that lead here: |
| 815 // Step 4a - defining a new data property. | 816 // Step 4a - defining a new data property. |
| 816 // Steps 9b & 12 - replacing an existing accessor property with a data | 817 // Steps 9b & 12 - replacing an existing accessor property with a data |
| 817 // property. | 818 // property. |
| 818 // Step 12 - updating an existing data property with a data or generic | 819 // Step 12 - updating an existing data property with a data or generic |
| 819 // descriptor. | 820 // descriptor. |
| (...skipping 822 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1642 | 1643 |
| 1643 function SetUpFunction() { | 1644 function SetUpFunction() { |
| 1644 %CheckIsBootstrapping(); | 1645 %CheckIsBootstrapping(); |
| 1645 InstallFunctions($Function.prototype, DONT_ENUM, $Array( | 1646 InstallFunctions($Function.prototype, DONT_ENUM, $Array( |
| 1646 "bind", FunctionBind, | 1647 "bind", FunctionBind, |
| 1647 "toString", FunctionToString | 1648 "toString", FunctionToString |
| 1648 )); | 1649 )); |
| 1649 } | 1650 } |
| 1650 | 1651 |
| 1651 SetUpFunction(); | 1652 SetUpFunction(); |
| OLD | NEW |