Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(23)

Unified Diff: src/api.cc

Issue 2085223002: Add HasOwnProperty with array indexes (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « include/v8.h ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/api.cc
diff --git a/src/api.cc b/src/api.cc
index e72abc87de14ecf523fe5d892b694287db3cbc26..4f72aa069d2e58bd602d96424c26b78ad5b8b88c 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -4185,6 +4185,11 @@ Maybe<bool> v8::Object::HasOwnProperty(Local<Context> context,
return result;
}
+Maybe<bool> v8::Object::HasOwnProperty(Local<Context> context, uint32_t index) {
+ i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate();
+ return HasOwnProperty(
+ context, Utils::ToLocal(isolate->factory()->Uint32ToString(index)));
Toon Verwaest 2016/06/22 09:41:31 You'll want to add a JSReceiver::HasOwnProperty wi
+}
bool v8::Object::HasOwnProperty(Local<String> key) {
auto context = ContextFromHeapObject(Utils::OpenHandle(this));
« no previous file with comments | « include/v8.h ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698