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

Unified Diff: Source/bindings/core/v8/ArrayValue.cpp

Issue 1067763002: bindings: Use Maybe version of Get in bindings/ (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 8 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 | « no previous file | Source/bindings/core/v8/NPV8Object.cpp » ('j') | Source/bindings/core/v8/NPV8Object.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/core/v8/ArrayValue.cpp
diff --git a/Source/bindings/core/v8/ArrayValue.cpp b/Source/bindings/core/v8/ArrayValue.cpp
index 8b5aaec3eac9ea87d03de927c0056d8d6bab0be8..4c9a4b979433dd4b772e449af3c17d70daf85f5a 100644
--- a/Source/bindings/core/v8/ArrayValue.cpp
+++ b/Source/bindings/core/v8/ArrayValue.cpp
@@ -62,8 +62,8 @@ bool ArrayValue::get(size_t index, Dictionary& value) const
ASSERT(m_isolate);
ASSERT(m_isolate == v8::Isolate::GetCurrent());
- v8::Local<v8::Value> indexedValue = m_array->Get(v8::Integer::NewFromUnsigned(m_isolate, index));
- if (indexedValue.IsEmpty() || !indexedValue->IsObject())
+ v8::Local<v8::Value> indexedValue;
+ if (!m_array->Get(m_isolate->GetCurrentContext(), index).ToLocal(&indexedValue) || !indexedValue->IsObject())
return false;
value = Dictionary(indexedValue, m_isolate, m_exceptionState);
« no previous file with comments | « no previous file | Source/bindings/core/v8/NPV8Object.cpp » ('j') | Source/bindings/core/v8/NPV8Object.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698