Index: third_party/WebKit/Source/bindings/core/v8/V8Binding.cpp |
diff --git a/third_party/WebKit/Source/bindings/core/v8/V8Binding.cpp b/third_party/WebKit/Source/bindings/core/v8/V8Binding.cpp |
index 0ccf6f2bea17d3dae699317ce7d50db252d5a6a6..d140278f9560be4fe6b5e8243c00a2c5c479f941 100644 |
--- a/third_party/WebKit/Source/bindings/core/v8/V8Binding.cpp |
+++ b/third_party/WebKit/Source/bindings/core/v8/V8Binding.cpp |
@@ -897,6 +897,30 @@ v8::Local<v8::Object> getEsIterator(v8::Isolate* isolate, |
return iterator.As<v8::Object>(); |
} |
+v8::MaybeLocal<v8::String> getStringValueInArray(v8::Local<v8::Context> context, |
+ v8::Local<v8::Array> array, |
+ uint32_t index) { |
+ v8::Local<v8::Value> value; |
+ if (!array->Get(context, index).ToLocal(&value)) |
+ return v8::MaybeLocal<v8::String>(); |
+ return value->ToString(context); |
+} |
+ |
+bool isPropertyEnumerable(v8::Isolate* isolate, |
+ v8::Local<v8::Value> descriptor, |
+ ExceptionState& exceptionState) { |
+ if (descriptor->IsUndefined()) |
+ return false; |
+ if (!descriptor->IsObject()) |
+ return false; |
+ v8::Local<v8::Value> enumerable; |
+ if (!v8::Local<v8::Object>::Cast(descriptor) |
+ ->Get(isolate->GetCurrentContext(), v8String(isolate, "enumerable")) |
+ .ToLocal(&enumerable)) |
+ return false; |
+ return toBoolean(isolate, enumerable, exceptionState); |
+} |
+ |
bool addHiddenValueToArray(v8::Isolate* isolate, |
v8::Local<v8::Object> object, |
v8::Local<v8::Value> value, |