Changeset 53706 in webkit
- Timestamp:
- Jan 22, 2010 11:09:47 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 5 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r53703 r53706 1 2010-01-22 Kent Hansen <kent.hansen@nokia.com> 2 3 Reviewed by Darin Adler. 4 5 Object.getOwnPropertyDescriptor(window) returns descriptors for properties in the prototype chain 6 https://bugs.webkit.org/show_bug.cgi?id=33948 7 8 Even though prototype properties are proxied by JSDOMWindow::getOwnPropertySlot(), 9 that proxying should not be performed by JSDOMWindow::getOwnPropertyDescriptor(). 10 11 This makes getOwnPropertyDescriptor() consistent with getOwnPropertyNames(). 12 13 Test: fast/dom/Window/window-property-descriptors.html 14 15 * bindings/js/JSDOMWindowCustom.cpp: 16 (WebCore::JSDOMWindow::getOwnPropertyDescriptor): 17 1 18 2010-01-22 Girish Ramakrishnan <girish@forwardbias.in> 2 19 -
trunk/WebCore/bindings/js/JSDOMWindowCustom.cpp
r53555 r53706 326 326 } 327 327 328 // We need this code here because otherwise JSDOMWindowBase will stop the search before we even get to the329 // prototype due to the blanket same origin (allowsAccessFrom) check at the end of getOwnPropertySlot.330 // Also, it's important to get the implementation straight out of the DOMWindow prototype regardless of331 // what prototype is actually set on this object.332 entry = JSDOMWindowPrototype::s_info.propHashTable(exec)->entry(exec, propertyName);333 if (entry) {334 if (entry->attributes() & Function) {335 if (entry->function() == jsDOMWindowPrototypeFunctionShowModalDialog) {336 if (!DOMWindow::canShowModalDialog(impl()->frame())) {337 descriptor.setUndefined();338 return true;339 }340 }341 }342 }343 344 328 entry = JSDOMWindow::s_info.propHashTable(exec)->entry(exec, propertyName); 345 329 if (entry) { … … 362 346 } 363 347 364 // Do prototype lookup early so that functions and attributes in the prototype can have365 // precedence over the index and name getters.366 JSValue proto = prototype();367 if (proto.isObject()) {368 if (asObject(proto)->getPropertyDescriptor(exec, propertyName, descriptor))369 return true;370 }371 372 348 bool ok; 373 349 unsigned i = propertyName.toArrayIndex(&ok);
Note: See TracChangeset
for help on using the changeset viewer.