Commit e0a661fc authored by jochen's avatar jochen Committed by Commit bot

Deprecate non-standard Array methods and clarify Object::isArray

BUG=none
R=neis@chromium.org
LOG=y

Review URL: https://codereview.chromium.org/1493053004

Cr-Commit-Position: refs/heads/master@{#32551}
parent eaa0e596
......@@ -1736,7 +1736,8 @@ class V8_EXPORT Value : public Data {
bool IsFunction() const;
/**
* Returns true if this value is an array.
* Returns true if this value is an array. Note that it will return false for
* an Proxy for an array.
*/
bool IsArray() const;
......@@ -2995,10 +2996,11 @@ class V8_EXPORT Array : public Object {
* Clones an element at index |index|. Returns an empty
* handle if cloning fails (for any reason).
*/
V8_DEPRECATE_SOON("Use maybe version",
Local<Object> CloneElementAt(uint32_t index));
V8_WARN_UNUSED_RESULT MaybeLocal<Object> CloneElementAt(
Local<Context> context, uint32_t index);
V8_DEPRECATED("Cloning is not supported.",
Local<Object> CloneElementAt(uint32_t index));
V8_DEPRECATED("Cloning is not supported.",
MaybeLocal<Object> CloneElementAt(Local<Context> context,
uint32_t index));
/**
* Creates a JavaScript array with the given length. If the length
......
......@@ -6204,10 +6204,7 @@ MaybeLocal<Object> Array::CloneElementAt(Local<Context> context,
}
Local<Object> Array::CloneElementAt(uint32_t index) {
auto context = ContextFromHeapObject(Utils::OpenHandle(this));
RETURN_TO_LOCAL_UNCHECKED(CloneElementAt(context, index), Object);
}
Local<Object> Array::CloneElementAt(uint32_t index) { return Local<Object>(); }
Local<v8::Map> v8::Map::New(Isolate* isolate) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment