Changeset 9455 in webkit for trunk/JavaScriptCore/kjs/object.cpp


Ignore:
Timestamp:
Jun 21, 2005, 5:48:49 PM (20 years ago)
Author:
adele
Message:

JavaScriptCore:

rolling out fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=3293, since it caused layout test failures.
fast/forms/element-by-name
fast/loader/loadInProgress

  • ChangeLog:
  • bindings/objc/objc_runtime.h:
  • bindings/objc/objc_runtime.mm: (ObjcFallbackObjectImp::hasProperty):
  • bindings/runtime_array.cpp: (RuntimeArrayImp::hasProperty):
  • bindings/runtime_array.h:
  • bindings/runtime_object.cpp: (RuntimeObjectImp::hasProperty):
  • bindings/runtime_object.h:
  • kjs/array_instance.h:
  • kjs/array_object.cpp: (ArrayInstanceImp::hasProperty):
  • kjs/function.cpp: (KJS::FunctionImp::hasProperty): (KJS::ActivationImp::hasProperty):
  • kjs/function.h:
  • kjs/object.cpp: (KJS::ObjectImp::hasProperty):
  • kjs/object.h:
  • kjs/object_object.cpp: (ObjectPrototypeImp::ObjectPrototypeImp): (ObjectProtoFuncImp::call):
  • kjs/object_object.h: (KJS::ObjectProtoFuncImp::):
  • kjs/string_object.cpp: (StringInstanceImp::hasProperty):
  • kjs/string_object.h:
  • tests/mozilla/expected.html:

WebCore:

rolling out fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=3293, since it caused layout test failures.
fast/forms/element-by-name
fast/loader/loadInProgress

  • ChangeLog:
  • khtml/ecma/kjs_binding.h:
  • khtml/ecma/kjs_css.cpp: (KJS::DOMCSSStyleDeclaration::hasProperty):
  • khtml/ecma/kjs_css.h:
  • khtml/ecma/kjs_dom.cpp: (KJS::DOMNodeList::hasProperty): (KJS::DOMNamedNodeMap::hasProperty):
  • khtml/ecma/kjs_dom.h:
  • khtml/ecma/kjs_html.cpp: (KJS::HTMLDocument::hasProperty): (KJS::KJS::HTMLElement::hasProperty): (KJS::KJS::HTMLCollection::hasProperty):
  • khtml/ecma/kjs_html.h:
  • khtml/ecma/kjs_window.cpp: (KJS::Window::hasProperty): (KJS::Konqueror::hasProperty):
  • khtml/ecma/kjs_window.h:
  • layout-tests/fast/js/eval-var-decl-expected.txt: Removed. This test used hasOwnProperty
  • layout-tests/fast/js/eval-var-decl.html: Removed. This test used hasOwnProperty
  • layout-tests/fast/js/hasOwnProperty-expected.txt: Removed.
  • layout-tests/fast/js/hasOwnProperty.html: Removed.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/kjs/object.cpp

    r9441 r9455  
    283283bool ObjectImp::hasProperty(ExecState *exec, const Identifier &propertyName) const
    284284{
    285   if (hasOwnProperty(exec, propertyName))
    286     return true;
    287 
    288   if (_proto->dispatchType() != ObjectType) {
    289     return false;
    290   }
    291 
    292   // Look in the prototype
    293   return static_cast<ObjectImp *>(_proto)->hasProperty(exec, propertyName);
    294 }
    295 
    296 bool ObjectImp::hasProperty(ExecState *exec, unsigned propertyName) const
    297 {
    298     if (hasOwnProperty(exec, propertyName))
    299       return true;
    300 
    301     if (_proto->dispatchType() != ObjectType) {
    302       return false;
    303     }
    304 
    305     // Look in the prototype
    306     return static_cast<ObjectImp *>(_proto)->hasProperty(exec, propertyName);
    307 }
    308 
    309 bool ObjectImp::hasOwnProperty(ExecState *exec, const Identifier &propertyName) const
    310 {
    311285  if (_prop.get(propertyName))
    312286    return true;
     
    314288  // Look in the static hashtable of properties
    315289  if (findPropertyHashEntry(propertyName))
    316     return true;
     290      return true;
    317291
    318292  // non-standard netscape extension
     
    320294    return true;
    321295
    322   return false;
    323 }
    324 
    325 bool ObjectImp::hasOwnProperty(ExecState *exec, unsigned propertyName) const
    326 {
    327   return hasOwnProperty(exec, Identifier::from(propertyName));
    328 }
    329 
     296  if (_proto->dispatchType() != ObjectType) {
     297    return false;
     298  }
     299
     300  // Look in the prototype
     301  return static_cast<ObjectImp *>(_proto)->hasProperty(exec, propertyName);
     302}
     303
     304bool ObjectImp::hasProperty(ExecState *exec, unsigned propertyName) const
     305{
     306  return hasProperty(exec, Identifier::from(propertyName));
     307}
    330308
    331309// ECMA 8.6.2.5
Note: See TracChangeset for help on using the changeset viewer.