https://bugs.webkit.org/show_bug.cgi?id=120139
PropertyDescriptor argument to define methods should be const

Rubber stamped by Sam Weinig.

This should never be modified, and this way we can use rvalues.

Source/JavaScriptCore: 

* debugger/DebuggerActivation.cpp:
(JSC::DebuggerActivation::defineOwnProperty):
* debugger/DebuggerActivation.h:
* runtime/Arguments.cpp:
(JSC::Arguments::defineOwnProperty):
* runtime/Arguments.h:
* runtime/ClassInfo.h:
* runtime/JSArray.cpp:
(JSC::JSArray::defineOwnProperty):
* runtime/JSArray.h:
* runtime/JSArrayBuffer.cpp:
(JSC::JSArrayBuffer::defineOwnProperty):
* runtime/JSArrayBuffer.h:
* runtime/JSArrayBufferView.cpp:
(JSC::JSArrayBufferView::defineOwnProperty):
* runtime/JSArrayBufferView.h:
* runtime/JSCell.cpp:
(JSC::JSCell::defineOwnProperty):
* runtime/JSCell.h:
* runtime/JSFunction.cpp:
(JSC::JSFunction::defineOwnProperty):
* runtime/JSFunction.h:
* runtime/JSGenericTypedArrayView.h:
* runtime/JSGenericTypedArrayViewInlines.h:
(JSC::::defineOwnProperty):
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::defineOwnProperty):
* runtime/JSGlobalObject.h:
* runtime/JSObject.cpp:
(JSC::JSObject::putIndexedDescriptor):
(JSC::JSObject::defineOwnIndexedProperty):
(JSC::putDescriptor):
(JSC::JSObject::defineOwnNonIndexProperty):
(JSC::JSObject::defineOwnProperty):
* runtime/JSObject.h:
* runtime/JSProxy.cpp:
(JSC::JSProxy::defineOwnProperty):
* runtime/JSProxy.h:
* runtime/RegExpMatchesArray.h:
(JSC::RegExpMatchesArray::defineOwnProperty):
* runtime/RegExpObject.cpp:
(JSC::RegExpObject::defineOwnProperty):
* runtime/RegExpObject.h:
* runtime/StringObject.cpp:
(JSC::StringObject::defineOwnProperty):
* runtime/StringObject.h:
    - make PropertyDescriptor const

Source/WebCore: 

* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::JSDOMWindow::defineOwnProperty):
* bindings/js/JSLocationCustom.cpp:
(WebCore::JSLocation::defineOwnProperty):
(WebCore::JSLocationPrototype::defineOwnProperty):
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader):
    - make PropertyDescriptor const



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154422 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/JavaScriptCore/runtime/JSArray.h b/Source/JavaScriptCore/runtime/JSArray.h
index d788fa9..f0847b1 100644
--- a/Source/JavaScriptCore/runtime/JSArray.h
+++ b/Source/JavaScriptCore/runtime/JSArray.h
@@ -59,7 +59,7 @@
     //   - call 'initializeIndex' for all properties in sequence, for 0 <= i < initialLength.
     static JSArray* tryCreateUninitialized(VM&, Structure*, unsigned initialLength);
 
-    JS_EXPORT_PRIVATE static bool defineOwnProperty(JSObject*, ExecState*, PropertyName, PropertyDescriptor&, bool throwException);
+    JS_EXPORT_PRIVATE static bool defineOwnProperty(JSObject*, ExecState*, PropertyName, const PropertyDescriptor&, bool throwException);
 
     static bool getOwnPropertySlot(JSObject*, ExecState*, PropertyName, PropertySlot&);