mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-11 16:32:59 +00:00
map::find() works just fine on all platforms.
This commit is contained in:
parent
a2f5fc24f7
commit
7a09fcc4cd
@ -156,17 +156,9 @@ namespace JSTypes {
|
||||
|
||||
const JSValue& getProperty(const String& name)
|
||||
{
|
||||
#ifdef XP_MAC
|
||||
JSProperties::const_iterator i = mProperties.find(name);
|
||||
if (i != mProperties.end())
|
||||
return i->second;
|
||||
#else
|
||||
// XXX should use map.find() to do this efficiently, but
|
||||
// unfortunately, find() returns an iterator that is different
|
||||
// on different STL implementations.
|
||||
if (mProperties.count(name))
|
||||
return mProperties[name];
|
||||
#endif
|
||||
if (mPrototype)
|
||||
return mPrototype->getProperty(name);
|
||||
return kUndefinedValue;
|
||||
|
@ -156,17 +156,9 @@ namespace JSTypes {
|
||||
|
||||
const JSValue& getProperty(const String& name)
|
||||
{
|
||||
#ifdef XP_MAC
|
||||
JSProperties::const_iterator i = mProperties.find(name);
|
||||
if (i != mProperties.end())
|
||||
return i->second;
|
||||
#else
|
||||
// XXX should use map.find() to do this efficiently, but
|
||||
// unfortunately, find() returns an iterator that is different
|
||||
// on different STL implementations.
|
||||
if (mProperties.count(name))
|
||||
return mProperties[name];
|
||||
#endif
|
||||
if (mPrototype)
|
||||
return mPrototype->getProperty(name);
|
||||
return kUndefinedValue;
|
||||
|
Loading…
Reference in New Issue
Block a user