| Index: Source/bindings/core/v8/DictionaryHelperForCore.cpp
|
| diff --git a/Source/bindings/core/v8/DictionaryHelperForCore.cpp b/Source/bindings/core/v8/DictionaryHelperForCore.cpp
|
| index 1dd12c45b8b1104a2d2dae217388af9b990b2617..d23fa441df0c390865f278f6057bef3e9f003c13 100644
|
| --- a/Source/bindings/core/v8/DictionaryHelperForCore.cpp
|
| +++ b/Source/bindings/core/v8/DictionaryHelperForCore.cpp
|
| @@ -66,8 +66,9 @@ bool DictionaryHelper::get(const Dictionary& dictionary, const String& key, bool
|
| if (!dictionary.get(key, v8Value))
|
| return false;
|
|
|
| - v8::Local<v8::Boolean> v8Bool = v8Value->ToBoolean(dictionary.isolate());
|
| - if (v8Bool.IsEmpty())
|
| + v8::MaybeLocal<v8::Boolean> maybeBool = v8Value->ToBoolean(dictionary.context());
|
| + v8::Local<v8::Boolean> v8Bool;
|
| + if (!maybeBool.ToLocal(&v8Bool) || v8Bool.IsEmpty())
|
| return false;
|
| value = v8Bool->Value();
|
| return true;
|
| @@ -88,8 +89,9 @@ bool DictionaryHelper::get(const Dictionary& dictionary, const String& key, int3
|
| if (!dictionary.get(key, v8Value))
|
| return false;
|
|
|
| - v8::Local<v8::Int32> v8Int32 = v8Value->ToInt32(dictionary.isolate());
|
| - if (v8Int32.IsEmpty())
|
| + v8::MaybeLocal<v8::Int32> maybeInt32 = v8Value->ToInt32(dictionary.context());
|
| + v8::Local<v8::Int32> v8Int32;
|
| + if (!maybeInt32.ToLocal(&v8Int32) || v8Int32.IsEmpty())
|
| return false;
|
| value = v8Int32->Value();
|
| return true;
|
| @@ -204,8 +206,9 @@ bool getNumericType(const Dictionary& dictionary, const String& key, NumericType
|
| if (!dictionary.get(key, v8Value))
|
| return false;
|
|
|
| - v8::Local<v8::Int32> v8Int32 = v8Value->ToInt32(dictionary.isolate());
|
| - if (v8Int32.IsEmpty())
|
| + v8::MaybeLocal<v8::Int32> maybeInt32 = v8Value->ToInt32(dictionary.context());
|
| + v8::Local<v8::Int32> v8Int32;
|
| + if (!maybeInt32.ToLocal(&v8Int32) || v8Int32.IsEmpty())
|
| return false;
|
| value = static_cast<NumericType>(v8Int32->Value());
|
| return true;
|
| @@ -236,8 +239,9 @@ bool DictionaryHelper::get(const Dictionary& dictionary, const String& key, unsi
|
| if (!dictionary.get(key, v8Value))
|
| return false;
|
|
|
| - v8::Local<v8::Integer> v8Integer = v8Value->ToInteger(dictionary.isolate());
|
| - if (v8Integer.IsEmpty())
|
| + v8::MaybeLocal<v8::Integer> maybeInteger = v8Value->ToInteger(dictionary.context());
|
| + v8::Local<v8::Integer> v8Integer;
|
| + if (!maybeInteger.ToLocal(&v8Integer) || v8Integer.IsEmpty())
|
| return false;
|
| value = static_cast<unsigned long>(v8Integer->Value());
|
| return true;
|
|
|