}
hasValue = true;
- V8TRYCATCH_RETURN(v8::Local<v8::Number>, v8Number, v8Value->ToNumber(), false);
+ TONATIVE_DEFAULT(v8::Local<v8::Number>, v8Number, v8Value->ToNumber(), false);
if (v8Number.IsEmpty())
return false;
value = v8Number->Value();
if (!getKey(key, v8Value))
return false;
- V8TRYCATCH_FOR_V8STRINGRESOURCE_RETURN(V8StringResource<>, stringValue, v8Value, false);
+ TOSTRING_DEFAULT(V8StringResource<>, stringValue, v8Value, false);
value = stringValue;
return true;
}
if (!getKey(key, v8Value))
return true;
- V8TRYCATCH_FOR_V8STRINGRESOURCE_RETURN(V8StringResource<>, stringValue, v8Value, false);
+ TOSTRING_DEFAULT(V8StringResource<>, stringValue, v8Value, false);
value = stringValue;
return true;
}
if (!getKey(key, v8Value))
return false;
- value = ScriptValue(v8Value, m_isolate);
+ value = ScriptValue(ScriptState::current(m_isolate), v8Value);
return true;
}
if (!getKey(key, v8Value))
return false;
- V8TRYCATCH_RETURN(v8::Local<v8::Number>, v8Number, v8Value->ToNumber(), false);
+ TONATIVE_DEFAULT(v8::Local<v8::Number>, v8Number, v8Value->ToNumber(), false);
if (v8Number.IsEmpty())
return false;
double d = v8Number->Value();
v8::Local<v8::Array> v8Array = v8::Local<v8::Array>::Cast(v8Value);
for (size_t i = 0; i < v8Array->Length(); ++i) {
v8::Local<v8::Value> indexedValue = v8Array->Get(v8::Integer::New(m_isolate, i));
- V8TRYCATCH_FOR_V8STRINGRESOURCE_RETURN(V8StringResource<>, stringValue, indexedValue, false);
+ TOSTRING_DEFAULT(V8StringResource<>, stringValue, indexedValue, false);
value.add(stringValue);
}
if (!getKey(key, v8Value) || WebCore::isUndefinedOrNull(v8Value))
return false;
- V8TRYCATCH_FOR_V8STRINGRESOURCE_RETURN(V8StringResource<>, stringValue, v8Value, false);
+ TOSTRING_DEFAULT(V8StringResource<>, stringValue, v8Value, false);
value = stringValue;
return true;
}
return true;
}
-bool Dictionary::get(const String& key, RefPtr<TrackBase>& value) const
+bool Dictionary::get(const String& key, RefPtrWillBeMember<TrackBase>& value) const
{
v8::Local<v8::Value> v8Value;
if (!getKey(key, v8Value))
return true;
}
-bool Dictionary::get(const String& key, RefPtr<SpeechRecognitionError>& value) const
+bool Dictionary::get(const String& key, RefPtrWillBeMember<SpeechRecognitionError>& value) const
{
v8::Local<v8::Value> v8Value;
if (!getKey(key, v8Value))
return true;
}
-bool Dictionary::get(const String& key, RefPtrWillBeMember<Gamepad>& value) const
+bool Dictionary::get(const String& key, Member<Gamepad>& value) const
{
v8::Local<v8::Value> v8Value;
if (!getKey(key, v8Value))
v8::Local<v8::Array> v8Array = v8::Local<v8::Array>::Cast(v8Value);
for (size_t i = 0; i < v8Array->Length(); ++i) {
v8::Local<v8::Value> indexedValue = v8Array->Get(v8::Uint32::New(m_isolate, i));
- V8TRYCATCH_FOR_V8STRINGRESOURCE_RETURN(V8StringResource<>, stringValue, indexedValue, false);
+ TOSTRING_DEFAULT(V8StringResource<>, stringValue, indexedValue, false);
value.append(stringValue);
}
continue;
v8::Local<v8::Value> value = options->Get(key);
- V8TRYCATCH_FOR_V8STRINGRESOURCE_RETURN(V8StringResource<>, stringKey, key, false);
- V8TRYCATCH_FOR_V8STRINGRESOURCE_RETURN(V8StringResource<>, stringValue, value, false);
+ TOSTRING_DEFAULT(V8StringResource<>, stringKey, key, false);
+ TOSTRING_DEFAULT(V8StringResource<>, stringValue, value, false);
if (!static_cast<const String&>(stringKey).isEmpty())
hashMap.set(stringKey, stringValue);
}
v8::Local<v8::String> key = properties->Get(i)->ToString();
if (!options->Has(key))
continue;
- V8TRYCATCH_FOR_V8STRINGRESOURCE_RETURN(V8StringResource<>, stringKey, key, false);
+ TOSTRING_DEFAULT(V8StringResource<>, stringKey, key, false);
names.append(stringKey);
}