@SuppressWarnings("unused") private static void primitiveSetter(final ScriptObject wrappedSelf, final Object self, final Object key, final boolean strict, final Object value) { // See ES5.1 8.7.2 PutValue (V, W) final String name = JSType.toString(key); final FindProperty find = wrappedSelf.findProperty(name, true); if (find == null || !(find.getProperty() instanceof UserAccessorProperty) || !find.getProperty().isWritable()) { if (strict) { throw typeError("property.not.writable", name, ScriptRuntime.safeToString(self)); } return; } // property found and is a UserAccessorProperty find.setValue(value, strict); }