Changeset 127505 in webkit for trunk/Source/JavaScriptCore/runtime/JSObject.cpp
- Timestamp:
- Sep 4, 2012, 2:19:25 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/runtime/JSObject.cpp
r127191 r127505 183 183 if (prototype.isNull()) { 184 184 if (!thisObject->putDirectInternal<PutModePut>(globalData, propertyName, value, 0, slot, getCallableObject(value)) && slot.isStrictMode()) 185 throwTypeError(exec, StrictModeReadonlyPropertyWriteError);185 throwTypeError(exec, ASCIILiteral(StrictModeReadonlyPropertyWriteError)); 186 186 return; 187 187 } … … 196 196 if (attributes & ReadOnly) { 197 197 if (slot.isStrictMode()) 198 throwError(exec, createTypeError(exec, StrictModeReadonlyPropertyWriteError));198 throwError(exec, createTypeError(exec, ASCIILiteral(StrictModeReadonlyPropertyWriteError))); 199 199 return; 200 200 } … … 205 205 if (!setterFunc) { 206 206 if (slot.isStrictMode()) 207 throwError(exec, createTypeError(exec, "setting a property that has only a getter"));207 throwError(exec, createTypeError(exec, ASCIILiteral("setting a property that has only a getter"))); 208 208 return; 209 209 } … … 230 230 231 231 if (!thisObject->putDirectInternal<PutModePut>(globalData, propertyName, value, 0, slot, getCallableObject(value)) && slot.isStrictMode()) 232 throwTypeError(exec, StrictModeReadonlyPropertyWriteError);232 throwTypeError(exec, ASCIILiteral(StrictModeReadonlyPropertyWriteError)); 233 233 return; 234 234 } … … 390 390 ASSERT(!exec->hadException()); 391 391 392 return throwError(exec, createTypeError(exec, "No default value"));392 return throwError(exec, createTypeError(exec, ASCIILiteral("No default value"))); 393 393 } 394 394 … … 410 410 411 411 if (!proto.isObject()) { 412 throwError(exec, createTypeError(exec, "instanceof called on an object with an invalid prototype property."));412 throwError(exec, createTypeError(exec, ASCIILiteral("instanceof called on an object with an invalid prototype property."))); 413 413 return false; 414 414 } … … 719 719 if (!object->isExtensible()) { 720 720 if (throwException) 721 throwError(exec, createTypeError(exec, "Attempting to define property on object that is not extensible."));721 throwError(exec, createTypeError(exec, ASCIILiteral("Attempting to define property on object that is not extensible."))); 722 722 return false; 723 723 } … … 737 737 if (descriptor.configurable()) { 738 738 if (throwException) 739 throwError(exec, createTypeError(exec, "Attempting to configurable attribute of unconfigurable property."));739 throwError(exec, createTypeError(exec, ASCIILiteral("Attempting to configurable attribute of unconfigurable property."))); 740 740 return false; 741 741 } 742 742 if (descriptor.enumerablePresent() && descriptor.enumerable() != current.enumerable()) { 743 743 if (throwException) 744 throwError(exec, createTypeError(exec, "Attempting to change enumerable attribute of unconfigurable property."));744 throwError(exec, createTypeError(exec, ASCIILiteral("Attempting to change enumerable attribute of unconfigurable property."))); 745 745 return false; 746 746 } … … 760 760 if (!current.configurable()) { 761 761 if (throwException) 762 throwError(exec, createTypeError(exec, "Attempting to change access mechanism for an unconfigurable property."));762 throwError(exec, createTypeError(exec, ASCIILiteral("Attempting to change access mechanism for an unconfigurable property."))); 763 763 return false; 764 764 } … … 772 772 if (!current.writable() && descriptor.writable()) { 773 773 if (throwException) 774 throwError(exec, createTypeError(exec, "Attempting to change writable attribute of unconfigurable property."));774 throwError(exec, createTypeError(exec, ASCIILiteral("Attempting to change writable attribute of unconfigurable property."))); 775 775 return false; 776 776 } … … 778 778 if (descriptor.value() && !sameValue(exec, current.value(), descriptor.value())) { 779 779 if (throwException) 780 throwError(exec, createTypeError(exec, "Attempting to change value of a readonly property."));780 throwError(exec, createTypeError(exec, ASCIILiteral("Attempting to change value of a readonly property."))); 781 781 return false; 782 782 } … … 794 794 if (descriptor.setterPresent() && !(current.setterPresent() && JSValue::strictEqual(exec, current.setter(), descriptor.setter()))) { 795 795 if (throwException) 796 throwError(exec, createTypeError(exec, "Attempting to change the setter of an unconfigurable property."));796 throwError(exec, createTypeError(exec, ASCIILiteral("Attempting to change the setter of an unconfigurable property."))); 797 797 return false; 798 798 } 799 799 if (descriptor.getterPresent() && !(current.getterPresent() && JSValue::strictEqual(exec, current.getter(), descriptor.getter()))) { 800 800 if (throwException) 801 throwError(exec, createTypeError(exec, "Attempting to change the getter of an unconfigurable property."));801 throwError(exec, createTypeError(exec, ASCIILiteral("Attempting to change the getter of an unconfigurable property."))); 802 802 return false; 803 803 }
Note:
See TracChangeset
for help on using the changeset viewer.