Commit 6da0da9a authored by bashi@chromium.org's avatar bashi@chromium.org

Remove Dictionary::getWithUndefinedOrNullCheck()

We have three specialized getWithUndefinedOrNullCheck(), but we don't
need them, as DictionaryHelper::getWithUndefinedOrNullCheck() template
does the job.

Review URL: https://codereview.chromium.org/725023002

git-svn-id: svn://svn.chromium.org/blink/trunk@185344 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 59bd1cdf
...@@ -125,37 +125,6 @@ bool Dictionary::get(const String& key, v8::Local<v8::Value>& value) const ...@@ -125,37 +125,6 @@ bool Dictionary::get(const String& key, v8::Local<v8::Value>& value) const
return getKey(key, value); return getKey(key, value);
} }
bool Dictionary::getWithUndefinedOrNullCheck(const String& key, String& value) const
{
v8::Local<v8::Value> v8Value;
if (!getKey(key, v8Value) || blink::isUndefinedOrNull(v8Value))
return false;
TOSTRING_DEFAULT(V8StringResource<>, stringValue, v8Value, false);
value = stringValue;
return true;
}
bool Dictionary::getWithUndefinedOrNullCheck(const String& key, RefPtrWillBeMember<Element>& value) const
{
v8::Local<v8::Value> v8Value;
if (!getKey(key, v8Value) || blink::isUndefinedOrNull(v8Value))
return false;
value = V8Element::toImplWithTypeCheck(m_isolate, v8Value);
return true;
}
bool Dictionary::getWithUndefinedOrNullCheck(const String& key, RefPtrWillBeMember<Path2D>& value) const
{
v8::Local<v8::Value> v8Value;
if (!getKey(key, v8Value) || blink::isUndefinedOrNull(v8Value))
return false;
value = V8Path2D::toImplWithTypeCheck(m_isolate, v8Value);
return true;
}
bool Dictionary::get(const String& key, Dictionary& value) const bool Dictionary::get(const String& key, Dictionary& value) const
{ {
v8::Local<v8::Value> v8Value; v8::Local<v8::Value> v8Value;
......
...@@ -126,10 +126,6 @@ public: ...@@ -126,10 +126,6 @@ public:
bool getOwnPropertiesAsStringHashMap(HashMap<String, String>&) const; bool getOwnPropertiesAsStringHashMap(HashMap<String, String>&) const;
bool getPropertyNames(Vector<String>&) const; bool getPropertyNames(Vector<String>&) const;
bool getWithUndefinedOrNullCheck(const String&, String&) const;
bool getWithUndefinedOrNullCheck(const String&, RefPtrWillBeMember<Element>&) const;
bool getWithUndefinedOrNullCheck(const String&, RefPtrWillBeMember<Path2D>&) const;
bool hasProperty(const String&) const; bool hasProperty(const String&) const;
v8::Isolate* isolate() const { return m_isolate; } v8::Isolate* isolate() const { return m_isolate; }
......
...@@ -204,7 +204,7 @@ IDBObjectStore* IDBDatabase::createObjectStore(const String& name, const Diction ...@@ -204,7 +204,7 @@ IDBObjectStore* IDBDatabase::createObjectStore(const String& name, const Diction
Vector<String> keyPathArray; Vector<String> keyPathArray;
if (DictionaryHelper::get(options, "keyPath", keyPathArray)) if (DictionaryHelper::get(options, "keyPath", keyPathArray))
keyPath = IDBKeyPath(keyPathArray); keyPath = IDBKeyPath(keyPathArray);
else if (options.getWithUndefinedOrNullCheck("keyPath", keyPathString)) else if (DictionaryHelper::getWithUndefinedOrNullCheck(options, "keyPath", keyPathString))
keyPath = IDBKeyPath(keyPathString); keyPath = IDBKeyPath(keyPathString);
DictionaryHelper::get(options, "autoIncrement", autoIncrement); DictionaryHelper::get(options, "autoIncrement", autoIncrement);
......
...@@ -40,6 +40,7 @@ enum IDBTransactionMode { ...@@ -40,6 +40,7 @@ enum IDBTransactionMode {
readonly attribute DOMString name; readonly attribute DOMString name;
[CallWith=ScriptState] readonly attribute any version; [CallWith=ScriptState] readonly attribute any version;
readonly attribute DOMStringList objectStoreNames; readonly attribute DOMStringList objectStoreNames;
// FIXME: |options| should be an IDL dictionary (IDBObjectStoreParameters)
[RaisesException] IDBObjectStore createObjectStore(DOMString name, optional Dictionary options); [RaisesException] IDBObjectStore createObjectStore(DOMString name, optional Dictionary options);
[RaisesException] void deleteObjectStore(DOMString name); [RaisesException] void deleteObjectStore(DOMString name);
// FIXME: should be union type http://crbug.com/240176 // FIXME: should be union type http://crbug.com/240176
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment