Title: [207023] trunk/Source/_javascript_Core
Revision
207023
Author
mark....@apple.com
Date
2016-10-10 14:13:26 -0700 (Mon, 10 Oct 2016)

Log Message

Rename the StrictModeReadonlyPropertyWriteError string to ReadonlyPropertyWriteError.
https://bugs.webkit.org/show_bug.cgi?id=163239

Reviewed by Filip Pizlo.

This string is also used for reporting the same error in cases which have nothing
to do with strict mode.

* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::emitReadOnlyExceptionIfNeeded):
* runtime/CommonSlowPaths.cpp:
(JSC::SLOW_PATH_DECL):
* runtime/GetterSetter.cpp:
(JSC::callSetter):
* runtime/JSArray.cpp:
(JSC::JSArray::setLengthWithArrayStorage):
(JSC::JSArray::pop):
* runtime/JSCJSValue.cpp:
(JSC::JSValue::putToPrimitive):
(JSC::JSValue::putToPrimitiveByIndex):
* runtime/JSFunction.cpp:
(JSC::JSFunction::put):
* runtime/JSModuleEnvironment.cpp:
(JSC::JSModuleEnvironment::put):
* runtime/JSModuleNamespaceObject.cpp:
(JSC::JSModuleNamespaceObject::put):
(JSC::JSModuleNamespaceObject::putByIndex):
* runtime/JSObject.cpp:
(JSC::ordinarySetSlow):
(JSC::JSObject::putInlineSlow):
(JSC::JSObject::setPrototypeWithCycleCheck):
(JSC::JSObject::putByIndexBeyondVectorLengthWithArrayStorage):
(JSC::JSObject::putDirectIndexBeyondVectorLengthWithArrayStorage):
* runtime/JSObject.h:
* runtime/JSObjectInlines.h:
(JSC::JSObject::putInline):
* runtime/JSSymbolTableObject.h:
(JSC::symbolTablePut):
* runtime/Lookup.h:
(JSC::putEntry):
* runtime/RegExpObject.h:
(JSC::RegExpObject::setLastIndex):
* runtime/SparseArrayValueMap.cpp:
(JSC::SparseArrayValueMap::putEntry):
(JSC::SparseArrayEntry::put):
* runtime/StringObject.cpp:
(JSC::StringObject::put):
(JSC::StringObject::putByIndex):

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (207022 => 207023)


--- trunk/Source/_javascript_Core/ChangeLog	2016-10-10 21:07:33 UTC (rev 207022)
+++ trunk/Source/_javascript_Core/ChangeLog	2016-10-10 21:13:26 UTC (rev 207023)
@@ -1,3 +1,54 @@
+2016-10-10  Mark Lam  <mark....@apple.com>
+
+        Rename the StrictModeReadonlyPropertyWriteError string to ReadonlyPropertyWriteError.
+        https://bugs.webkit.org/show_bug.cgi?id=163239
+
+        Reviewed by Filip Pizlo.
+
+        This string is also used for reporting the same error in cases which have nothing
+        to do with strict mode.
+
+        * bytecompiler/BytecodeGenerator.cpp:
+        (JSC::BytecodeGenerator::emitReadOnlyExceptionIfNeeded):
+        * runtime/CommonSlowPaths.cpp:
+        (JSC::SLOW_PATH_DECL):
+        * runtime/GetterSetter.cpp:
+        (JSC::callSetter):
+        * runtime/JSArray.cpp:
+        (JSC::JSArray::setLengthWithArrayStorage):
+        (JSC::JSArray::pop):
+        * runtime/JSCJSValue.cpp:
+        (JSC::JSValue::putToPrimitive):
+        (JSC::JSValue::putToPrimitiveByIndex):
+        * runtime/JSFunction.cpp:
+        (JSC::JSFunction::put):
+        * runtime/JSModuleEnvironment.cpp:
+        (JSC::JSModuleEnvironment::put):
+        * runtime/JSModuleNamespaceObject.cpp:
+        (JSC::JSModuleNamespaceObject::put):
+        (JSC::JSModuleNamespaceObject::putByIndex):
+        * runtime/JSObject.cpp:
+        (JSC::ordinarySetSlow):
+        (JSC::JSObject::putInlineSlow):
+        (JSC::JSObject::setPrototypeWithCycleCheck):
+        (JSC::JSObject::putByIndexBeyondVectorLengthWithArrayStorage):
+        (JSC::JSObject::putDirectIndexBeyondVectorLengthWithArrayStorage):
+        * runtime/JSObject.h:
+        * runtime/JSObjectInlines.h:
+        (JSC::JSObject::putInline):
+        * runtime/JSSymbolTableObject.h:
+        (JSC::symbolTablePut):
+        * runtime/Lookup.h:
+        (JSC::putEntry):
+        * runtime/RegExpObject.h:
+        (JSC::RegExpObject::setLastIndex):
+        * runtime/SparseArrayValueMap.cpp:
+        (JSC::SparseArrayValueMap::putEntry):
+        (JSC::SparseArrayEntry::put):
+        * runtime/StringObject.cpp:
+        (JSC::StringObject::put):
+        (JSC::StringObject::putByIndex):
+
 2016-10-10  Saam Barati  <sbar...@apple.com>
 
         compileCheckStringIdent in the FTL is wrong

Modified: trunk/Source/_javascript_Core/bytecompiler/BytecodeGenerator.cpp (207022 => 207023)


--- trunk/Source/_javascript_Core/bytecompiler/BytecodeGenerator.cpp	2016-10-10 21:07:33 UTC (rev 207022)
+++ trunk/Source/_javascript_Core/bytecompiler/BytecodeGenerator.cpp	2016-10-10 21:13:26 UTC (rev 207023)
@@ -4131,7 +4131,7 @@
     // If we're in strict mode, we always throw.
     // If we're not in strict mode, we throw for "const" variables but not the function callee.
     if (isStrictMode() || variable.isConst()) {
-        emitThrowTypeError(Identifier::fromString(m_vm, StrictModeReadonlyPropertyWriteError));
+        emitThrowTypeError(Identifier::fromString(m_vm, ReadonlyPropertyWriteError));
         return true;
     }
     return false;

Modified: trunk/Source/_javascript_Core/runtime/CommonSlowPaths.cpp (207022 => 207023)


--- trunk/Source/_javascript_Core/runtime/CommonSlowPaths.cpp	2016-10-10 21:07:33 UTC (rev 207022)
+++ trunk/Source/_javascript_Core/runtime/CommonSlowPaths.cpp	2016-10-10 21:13:26 UTC (rev 207023)
@@ -276,7 +276,7 @@
 SLOW_PATH_DECL(slow_path_throw_strict_mode_readonly_property_write_error)
 {
     BEGIN();
-    THROW(createTypeError(exec, ASCIILiteral(StrictModeReadonlyPropertyWriteError)));
+    THROW(createTypeError(exec, ASCIILiteral(ReadonlyPropertyWriteError)));
 }
 
 SLOW_PATH_DECL(slow_path_not)

Modified: trunk/Source/_javascript_Core/runtime/GetterSetter.cpp (207022 => 207023)


--- trunk/Source/_javascript_Core/runtime/GetterSetter.cpp	2016-10-10 21:07:33 UTC (rev 207022)
+++ trunk/Source/_javascript_Core/runtime/GetterSetter.cpp	2016-10-10 21:13:26 UTC (rev 207023)
@@ -95,7 +95,7 @@
 
     if (getterSetterObj->isSetterNull()) {
         if (ecmaMode == StrictMode)
-            throwTypeError(exec, scope, StrictModeReadonlyPropertyWriteError);
+            throwTypeError(exec, scope, ReadonlyPropertyWriteError);
         return false;
     }
 

Modified: trunk/Source/_javascript_Core/runtime/JSArray.cpp (207022 => 207023)


--- trunk/Source/_javascript_Core/runtime/JSArray.cpp	2016-10-10 21:07:33 UTC (rev 207022)
+++ trunk/Source/_javascript_Core/runtime/JSArray.cpp	2016-10-10 21:13:26 UTC (rev 207023)
@@ -406,7 +406,7 @@
     if (SparseArrayValueMap* map = storage->m_sparseMap.get()) {
         // Fail if the length is not writable.
         if (map->lengthIsReadOnly())
-            return reject(exec, throwException, StrictModeReadonlyPropertyWriteError);
+            return reject(exec, throwException, ReadonlyPropertyWriteError);
 
         if (newLength < length) {
             // Copy any keys we might be interested in into a vector.
@@ -625,7 +625,7 @@
         unsigned length = storage->length();
         if (!length) {
             if (!isLengthWritable())
-                throwTypeError(exec, scope, StrictModeReadonlyPropertyWriteError);
+                throwTypeError(exec, scope, ReadonlyPropertyWriteError);
             return jsUndefined();
         }
 

Modified: trunk/Source/_javascript_Core/runtime/JSCJSValue.cpp (207022 => 207023)


--- trunk/Source/_javascript_Core/runtime/JSCJSValue.cpp	2016-10-10 21:07:33 UTC (rev 207022)
+++ trunk/Source/_javascript_Core/runtime/JSCJSValue.cpp	2016-10-10 21:13:26 UTC (rev 207023)
@@ -163,7 +163,7 @@
             prototype = obj->getPrototypeDirect();
             if (prototype.isNull()) {
                 if (slot.isStrictMode())
-                    throwTypeError(exec, scope, StrictModeReadonlyPropertyWriteError);
+                    throwTypeError(exec, scope, ReadonlyPropertyWriteError);
                 return false;
             }
         }
@@ -175,7 +175,7 @@
         if (offset != invalidOffset) {
             if (attributes & ReadOnly) {
                 if (slot.isStrictMode())
-                    throwTypeError(exec, scope, StrictModeReadonlyPropertyWriteError);
+                    throwTypeError(exec, scope, ReadonlyPropertyWriteError);
                 return false;
             }
 
@@ -198,7 +198,7 @@
     }
     
     if (slot.isStrictMode())
-        throwTypeError(exec, scope, StrictModeReadonlyPropertyWriteError);
+        throwTypeError(exec, scope, ReadonlyPropertyWriteError);
     return false;
 }
 
@@ -222,7 +222,7 @@
         return putResult;
     
     if (shouldThrow)
-        throwTypeError(exec, scope, StrictModeReadonlyPropertyWriteError);
+        throwTypeError(exec, scope, ReadonlyPropertyWriteError);
     return false;
 }
 

Modified: trunk/Source/_javascript_Core/runtime/JSFunction.cpp (207022 => 207023)


--- trunk/Source/_javascript_Core/runtime/JSFunction.cpp	2016-10-10 21:07:33 UTC (rev 207022)
+++ trunk/Source/_javascript_Core/runtime/JSFunction.cpp	2016-10-10 21:13:26 UTC (rev 207023)
@@ -455,7 +455,7 @@
     }
     if (propertyName == vm.propertyNames->arguments || propertyName == vm.propertyNames->caller) {
         if (slot.isStrictMode())
-            throwTypeError(exec, scope, StrictModeReadonlyPropertyWriteError);
+            throwTypeError(exec, scope, ReadonlyPropertyWriteError);
         return false;
     }
     thisObject->reifyLazyPropertyIfNeeded(vm, exec, propertyName);

Modified: trunk/Source/_javascript_Core/runtime/JSModuleEnvironment.cpp (207022 => 207023)


--- trunk/Source/_javascript_Core/runtime/JSModuleEnvironment.cpp	2016-10-10 21:07:33 UTC (rev 207022)
+++ trunk/Source/_javascript_Core/runtime/JSModuleEnvironment.cpp	2016-10-10 21:13:26 UTC (rev 207023)
@@ -119,7 +119,7 @@
     // All imported bindings are immutable.
     JSModuleRecord::Resolution resolution = thisObject->moduleRecord()->resolveImport(exec, Identifier::fromUid(exec, propertyName.uid()));
     if (resolution.type == JSModuleRecord::Resolution::Type::Resolved) {
-        throwTypeError(exec, scope, ASCIILiteral(StrictModeReadonlyPropertyWriteError));
+        throwTypeError(exec, scope, ASCIILiteral(ReadonlyPropertyWriteError));
         return false;
     }
     return Base::put(thisObject, exec, propertyName, value, slot);

Modified: trunk/Source/_javascript_Core/runtime/JSModuleNamespaceObject.cpp (207022 => 207023)


--- trunk/Source/_javascript_Core/runtime/JSModuleNamespaceObject.cpp	2016-10-10 21:07:33 UTC (rev 207022)
+++ trunk/Source/_javascript_Core/runtime/JSModuleNamespaceObject.cpp	2016-10-10 21:13:26 UTC (rev 207023)
@@ -167,7 +167,7 @@
 
     // http://www.ecma-international.org/ecma-262/6.0/#sec-module-namespace-exotic-objects-set-p-v-receiver
     if (slot.isStrictMode())
-        throwTypeError(exec, scope, ASCIILiteral(StrictModeReadonlyPropertyWriteError));
+        throwTypeError(exec, scope, ASCIILiteral(ReadonlyPropertyWriteError));
     return false;
 }
 
@@ -177,7 +177,7 @@
     auto scope = DECLARE_THROW_SCOPE(vm);
 
     if (shouldThrow)
-        throwTypeError(exec, scope, ASCIILiteral(StrictModeReadonlyPropertyWriteError));
+        throwTypeError(exec, scope, ASCIILiteral(ReadonlyPropertyWriteError));
     return false;
 }
 

Modified: trunk/Source/_javascript_Core/runtime/JSObject.cpp (207022 => 207023)


--- trunk/Source/_javascript_Core/runtime/JSObject.cpp	2016-10-10 21:07:33 UTC (rev 207022)
+++ trunk/Source/_javascript_Core/runtime/JSObject.cpp	2016-10-10 21:13:26 UTC (rev 207023)
@@ -61,7 +61,7 @@
 STATIC_ASSERT_IS_TRIVIALLY_DESTRUCTIBLE(JSObject);
 STATIC_ASSERT_IS_TRIVIALLY_DESTRUCTIBLE(JSFinalObject);
 
-const char* StrictModeReadonlyPropertyWriteError = "Attempted to assign to readonly property.";
+const char* ReadonlyPropertyWriteError = "Attempted to assign to readonly property.";
 const char* UnconfigurablePropertyChangeAccessMechanismError = "Attempting to change access mechanism for an unconfigurable property.";
 
 const ClassInfo JSObject::s_info = { "Object", 0, 0, CREATE_METHOD_TABLE(JSObject) };
@@ -389,11 +389,11 @@
     if (ownDescriptor.isDataDescriptor()) {
         // 9.1.9.1-4-a If ownDesc.[[Writable]] is false, return false.
         if (!ownDescriptor.writable())
-            return reject(exec, shouldThrow, StrictModeReadonlyPropertyWriteError);
+            return reject(exec, shouldThrow, ReadonlyPropertyWriteError);
 
         // 9.1.9.1-4-b If Type(Receiver) is not Object, return false.
         if (!receiver.isObject())
-            return reject(exec, shouldThrow, StrictModeReadonlyPropertyWriteError);
+            return reject(exec, shouldThrow, ReadonlyPropertyWriteError);
 
         // In OrdinarySet, the receiver may not be the same to the object.
         // So, we perform [[GetOwnProperty]] onto the receiver while we already perform [[GetOwnProperty]] onto the object.
@@ -408,11 +408,11 @@
         if (existingDescriptorFound) {
             // 9.1.9.1-4-d-i If IsAccessorDescriptor(existingDescriptor) is true, return false.
             if (existingDescriptor.isAccessorDescriptor())
-                return reject(exec, shouldThrow, StrictModeReadonlyPropertyWriteError);
+                return reject(exec, shouldThrow, ReadonlyPropertyWriteError);
 
             // 9.1.9.1-4-d-ii If existingDescriptor.[[Writable]] is false, return false.
             if (!existingDescriptor.writable())
-                return reject(exec, shouldThrow, StrictModeReadonlyPropertyWriteError);
+                return reject(exec, shouldThrow, ReadonlyPropertyWriteError);
 
             // 9.1.9.1-4-d-iii Let valueDesc be the PropertyDescriptor{[[Value]]: V}.
             PropertyDescriptor valueDescriptor;
@@ -434,7 +434,7 @@
     // 9.1.9.1-7 If setter is undefined, return false.
     JSValue setter = ownDescriptor.setter();
     if (!setter.isObject())
-        return reject(exec, shouldThrow, StrictModeReadonlyPropertyWriteError);
+        return reject(exec, shouldThrow, ReadonlyPropertyWriteError);
 
     // 9.1.9.1-8 Perform ? Call(setter, Receiver, << V >>).
     JSObject* setterObject = asObject(setter);
@@ -468,7 +468,7 @@
         if (isValidOffset(offset)) {
             if (attributes & ReadOnly) {
                 ASSERT(structure(vm)->prototypeChainMayInterceptStoreTo(exec->vm(), propertyName) || obj == this);
-                return reject(exec, slot.isStrictMode(), StrictModeReadonlyPropertyWriteError);
+                return reject(exec, slot.isStrictMode(), ReadonlyPropertyWriteError);
             }
 
             JSValue gs = obj->getDirect(offset);
@@ -513,7 +513,7 @@
 
     ASSERT(!structure(vm)->prototypeChainMayInterceptStoreTo(exec->vm(), propertyName) || obj == this);
     if (!putDirectInternal<PutModePut>(vm, propertyName, value, 0, slot))
-        return reject(exec, slot.isStrictMode(), StrictModeReadonlyPropertyWriteError);
+        return reject(exec, slot.isStrictMode(), ReadonlyPropertyWriteError);
     return true;
 }
 
@@ -1297,7 +1297,7 @@
 
     if (!isExtensible) {
         if (shouldThrowIfCantSet)
-            throwTypeError(exec, scope, StrictModeReadonlyPropertyWriteError);
+            throwTypeError(exec, scope, ReadonlyPropertyWriteError);
         return false;
     }
 
@@ -2264,7 +2264,7 @@
         // Prohibit growing the array if length is not writable.
         if (map->lengthIsReadOnly() || !isStructureExtensible()) {
             if (shouldThrow)
-                throwTypeError(exec, scope, StrictModeReadonlyPropertyWriteError);
+                throwTypeError(exec, scope, ReadonlyPropertyWriteError);
             return false;
         }
         length = i + 1;
@@ -2402,7 +2402,7 @@
         if (mode != PutDirectIndexLikePutDirect) {
             // Prohibit growing the array if length is not writable.
             if (map->lengthIsReadOnly())
-                return reject(exec, mode == PutDirectIndexShouldThrow, StrictModeReadonlyPropertyWriteError);
+                return reject(exec, mode == PutDirectIndexShouldThrow, ReadonlyPropertyWriteError);
             if (!isStructureExtensible())
                 return reject(exec, mode == PutDirectIndexShouldThrow, "Attempting to define property on object that is not extensible.");
         }

Modified: trunk/Source/_javascript_Core/runtime/JSObject.h (207022 => 207023)


--- trunk/Source/_javascript_Core/runtime/JSObject.h	2016-10-10 21:07:33 UTC (rev 207022)
+++ trunk/Source/_javascript_Core/runtime/JSObject.h	2016-10-10 21:13:26 UTC (rev 207023)
@@ -68,7 +68,7 @@
 struct HashTableValue;
 
 JS_EXPORT_PRIVATE JSObject* throwTypeError(ExecState*, ThrowScope&, const String&);
-extern JS_EXPORTDATA const char* StrictModeReadonlyPropertyWriteError;
+extern JS_EXPORTDATA const char* ReadonlyPropertyWriteError;
 extern JS_EXPORTDATA const char* UnconfigurablePropertyChangeAccessMechanismError;
 
 COMPILE_ASSERT(None < FirstInternalAttribute, None_is_below_FirstInternalAttribute);

Modified: trunk/Source/_javascript_Core/runtime/JSObjectInlines.h (207022 => 207023)


--- trunk/Source/_javascript_Core/runtime/JSObjectInlines.h	2016-10-10 21:07:33 UTC (rev 207022)
+++ trunk/Source/_javascript_Core/runtime/JSObjectInlines.h	2016-10-10 21:13:26 UTC (rev 207023)
@@ -179,7 +179,7 @@
         ASSERT(!thisObject->structure(vm)->prototypeChainMayInterceptStoreTo(vm, propertyName));
         if (!thisObject->putDirectInternal<PutModePut>(vm, propertyName, value, 0, slot)) {
             if (slot.isStrictMode())
-                throwTypeError(exec, scope, ASCIILiteral(StrictModeReadonlyPropertyWriteError));
+                throwTypeError(exec, scope, ASCIILiteral(ReadonlyPropertyWriteError));
             return false;
         }
         return true;

Modified: trunk/Source/_javascript_Core/runtime/JSSymbolTableObject.h (207022 => 207023)


--- trunk/Source/_javascript_Core/runtime/JSSymbolTableObject.h	2016-10-10 21:07:33 UTC (rev 207022)
+++ trunk/Source/_javascript_Core/runtime/JSSymbolTableObject.h	2016-10-10 21:13:26 UTC (rev 207023)
@@ -183,7 +183,7 @@
         ASSERT(!fastEntry.isNull());
         if (fastEntry.isReadOnly() && !ignoreReadOnlyErrors) {
             if (shouldThrowReadOnlyError)
-                throwTypeError(exec, scope, StrictModeReadonlyPropertyWriteError);
+                throwTypeError(exec, scope, ReadonlyPropertyWriteError);
             putResult = false;
             return true;
         }

Modified: trunk/Source/_javascript_Core/runtime/Lookup.h (207022 => 207023)


--- trunk/Source/_javascript_Core/runtime/Lookup.h	2016-10-10 21:07:33 UTC (rev 207022)
+++ trunk/Source/_javascript_Core/runtime/Lookup.h	2016-10-10 21:13:26 UTC (rev 207023)
@@ -262,11 +262,11 @@
                 thisObject->putDirect(exec->vm(), propertyName, value);
             return true;
         }
-        return reject(exec, slot.isStrictMode(), StrictModeReadonlyPropertyWriteError);
+        return reject(exec, slot.isStrictMode(), ReadonlyPropertyWriteError);
     }
 
     if (entry->attributes() & Accessor)
-        return reject(exec, slot.isStrictMode(), StrictModeReadonlyPropertyWriteError);
+        return reject(exec, slot.isStrictMode(), ReadonlyPropertyWriteError);
 
     if (!(entry->attributes() & ReadOnly)) {
         ASSERT_WITH_MESSAGE(!(entry->attributes() & DOMJITAttribute), "DOMJITAttribute supports readonly attributes currently.");
@@ -280,7 +280,7 @@
         return result;
     }
 
-    return reject(exec, slot.isStrictMode(), StrictModeReadonlyPropertyWriteError);
+    return reject(exec, slot.isStrictMode(), ReadonlyPropertyWriteError);
 }
 
 /**

Modified: trunk/Source/_javascript_Core/runtime/RegExpObject.h (207022 => 207023)


--- trunk/Source/_javascript_Core/runtime/RegExpObject.h	2016-10-10 21:07:33 UTC (rev 207022)
+++ trunk/Source/_javascript_Core/runtime/RegExpObject.h	2016-10-10 21:13:26 UTC (rev 207023)
@@ -50,7 +50,7 @@
             m_lastIndex.setWithoutWriteBarrier(jsNumber(lastIndex));
             return true;
         }
-        throwTypeError(exec, scope, StrictModeReadonlyPropertyWriteError);
+        throwTypeError(exec, scope, ReadonlyPropertyWriteError);
         return false;
     }
     bool setLastIndex(ExecState* exec, JSValue lastIndex, bool shouldThrow)
@@ -64,7 +64,7 @@
         }
 
         if (shouldThrow)
-            throwTypeError(exec, scope, StrictModeReadonlyPropertyWriteError);
+            throwTypeError(exec, scope, ReadonlyPropertyWriteError);
         return false;
     }
     JSValue getLastIndex() const

Modified: trunk/Source/_javascript_Core/runtime/SparseArrayValueMap.cpp (207022 => 207023)


--- trunk/Source/_javascript_Core/runtime/SparseArrayValueMap.cpp	2016-10-10 21:07:33 UTC (rev 207022)
+++ trunk/Source/_javascript_Core/runtime/SparseArrayValueMap.cpp	2016-10-10 21:13:26 UTC (rev 207023)
@@ -103,7 +103,7 @@
     if (result.isNewEntry && !array->isStructureExtensible()) {
         remove(result.iterator);
         if (shouldThrow)
-            throwTypeError(exec, scope, StrictModeReadonlyPropertyWriteError);
+            throwTypeError(exec, scope, ReadonlyPropertyWriteError);
         return false;
     }
     
@@ -156,7 +156,7 @@
     if (!(attributes & Accessor)) {
         if (attributes & ReadOnly) {
             if (shouldThrow)
-                throwTypeError(exec, scope, StrictModeReadonlyPropertyWriteError);
+                throwTypeError(exec, scope, ReadonlyPropertyWriteError);
             return false;
         }
 

Modified: trunk/Source/_javascript_Core/runtime/StringObject.cpp (207022 => 207023)


--- trunk/Source/_javascript_Core/runtime/StringObject.cpp	2016-10-10 21:07:33 UTC (rev 207022)
+++ trunk/Source/_javascript_Core/runtime/StringObject.cpp	2016-10-10 21:13:26 UTC (rev 207023)
@@ -72,7 +72,7 @@
 
     if (propertyName == exec->propertyNames().length) {
         if (slot.isStrictMode())
-            throwTypeError(exec, scope, StrictModeReadonlyPropertyWriteError);
+            throwTypeError(exec, scope, ReadonlyPropertyWriteError);
         return false;
     }
     if (Optional<uint32_t> index = parseIndex(propertyName))
@@ -88,7 +88,7 @@
     StringObject* thisObject = jsCast<StringObject*>(cell);
     if (thisObject->internalValue()->canGetIndex(propertyName)) {
         if (shouldThrow)
-            throwTypeError(exec, scope, StrictModeReadonlyPropertyWriteError);
+            throwTypeError(exec, scope, ReadonlyPropertyWriteError);
         return false;
     }
     return JSObject::putByIndex(cell, exec, propertyName, value, shouldThrow);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to