Changeset 119484 in webkit
- Timestamp:
- Jun 5, 2012, 5:27:44 AM (14 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 5 edited
-
ChangeLog (modified) (1 diff)
-
bindings/js/Dictionary.cpp (modified) (1 diff)
-
bindings/js/Dictionary.h (modified) (1 diff)
-
bindings/js/JSDictionary.cpp (modified) (1 diff)
-
bindings/js/JSDictionary.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r119482 r119484 1 2012-06-05 Charles Wei <charles.wei@torchmobile.com.cn> 2 3 JSC:need to implement Dictionary::getWithUndefinedOrNullCheck for IDB 4 https://bugs.webkit.org/show_bug.cgi?id=88283 5 6 Reviewed by Kentaro Hara. 7 8 No new tests, idb not working for JSC yet. 9 10 * bindings/js/Dictionary.cpp: 11 (WebCore::Dictionary::getWithUndefinedOrNullCheck): 12 * bindings/js/Dictionary.h: 13 (Dictionary): 14 * bindings/js/JSDictionary.cpp: 15 (WebCore::JSDictionary::getWithUndefinedOrNullCheck): 16 (WebCore): 17 * bindings/js/JSDictionary.h: 18 (JSDictionary): 19 1 20 2012-06-05 Dongwoo Im <dw.im@samsung.com> 2 21 -
trunk/Source/WebCore/bindings/js/Dictionary.cpp
r116763 r119484 80 80 } 81 81 82 bool Dictionary::getWithUndefinedOrNullCheck(const String& propertyName, String& value) const 83 { 84 return m_dictionary.getWithUndefinedOrNullCheck(propertyName, value); 85 } 86 82 87 }; 83 -
trunk/Source/WebCore/bindings/js/Dictionary.h
r116763 r119484 62 62 bool isUndefinedOrNull() const { return !m_dictionary.isValid(); } 63 63 bool getOwnPropertiesAsStringHashMap(WTF::HashMap<String, String>&) const; 64 bool getWithUndefinedOrNullCheck(const String& , String&) const { notImplemented(); return false; }64 bool getWithUndefinedOrNullCheck(const String& propertyName, String& value) const; 65 65 66 66 private: -
trunk/Source/WebCore/bindings/js/JSDictionary.cpp
r117646 r119484 168 168 #endif 169 169 170 bool JSDictionary::getWithUndefinedOrNullCheck(const String& propertyName, String& result) const 171 { 172 JSValue value; 173 if (tryGetProperty(propertyName.utf8().data(), value) != PropertyFound || value.isUndefinedOrNull()) 174 return false; 175 176 result = ustringToString(value.toString(m_exec)->value(m_exec)); 177 return true; 178 } 179 170 180 } // namespace WebCore -
trunk/Source/WebCore/bindings/js/JSDictionary.h
r116763 r119484 59 59 template <typename Result> 60 60 bool get(const char* propertyName, Result&) const; 61 bool getWithUndefinedOrNullCheck(const String& propertyName, String& value) const; 61 62 62 63 JSC::ExecState* execState() const { return m_exec; }
Note:
See TracChangeset
for help on using the changeset viewer.