⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 100247 in webkit


Ignore:
Timestamp:
Nov 15, 2011, 12:36:56 AM (15 years ago)
Author:
tkent@chromium.org
Message:

[V8] Fix incorrect handling of JavaScript properties in DOMStringMap
https://bugs.webkit.org/show_bug.cgi?id=53578

Reviewed by Adam Barth.

Source/WebCore:

Follows a JSC behavior change by r96893.

  • bindings/v8/custom/V8DOMStringMapCustom.cpp:

(WebCore::V8DOMStringMap::namedPropertyGetter):
Propagate to the JavaScript object if the DOMStringMap object
doesn't have the requested item.
(WebCore::V8DOMStringMap::namedPropertyDeleter): ditto.
(WebCore::V8DOMStringMap::namedPropertySetter):
Try to set a property to only a DOMStringMap object.

LayoutTests:

  • platform/chromium/test_expectations.txt:

Remove failure expectations of fast/dom/dataset.html and
fast/dom/dataset-xhtml.xhtml.

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r100246 r100247  
     12011-11-15  Kent Tamura  <tkent@chromium.org>
     2
     3        [V8] Fix incorrect handling of JavaScript properties in DOMStringMap
     4        https://bugs.webkit.org/show_bug.cgi?id=53578
     5
     6        Reviewed by Adam Barth.
     7
     8        * platform/chromium/test_expectations.txt:
     9        Remove failure expectations of fast/dom/dataset.html and
     10        fast/dom/dataset-xhtml.xhtml.
     11
    1122011-11-14  Pavel Feldman  <pfeldman@google.com>
    213
  • trunk/LayoutTests/platform/chromium/test_expectations.txt

    r100237 r100247  
    36743674BUGWK68982 : svg/custom/transformed-pattern-clamp-svg-root.svg = IMAGE PASS
    36753675
    3676 // Need to follow a JSC binding change. See webkit.org/b/53752.
    3677 BUGWK53578 : fast/dom/dataset.html = TEXT
    3678 BUGWK53578 : fast/dom/dataset-xhtml.xhtml = TEXT
    3679 
    36803676BUGWK69060 WIN LINUX : fast/repaint/selection-clear.html = IMAGE+TEXT
    36813677
  • trunk/Source/WebCore/ChangeLog

    r100246 r100247  
     12011-11-15  Kent Tamura  <tkent@chromium.org>
     2
     3        [V8] Fix incorrect handling of JavaScript properties in DOMStringMap
     4        https://bugs.webkit.org/show_bug.cgi?id=53578
     5
     6        Reviewed by Adam Barth.
     7
     8        Follows a JSC behavior change by r96893.
     9
     10        * bindings/v8/custom/V8DOMStringMapCustom.cpp:
     11        (WebCore::V8DOMStringMap::namedPropertyGetter):
     12        Propagate to the JavaScript object if the DOMStringMap object
     13        doesn't have the requested item.
     14        (WebCore::V8DOMStringMap::namedPropertyDeleter): ditto.
     15        (WebCore::V8DOMStringMap::namedPropertySetter):
     16        Try to set a property to only a DOMStringMap object.
     17
    1182011-11-14  Pavel Feldman  <pfeldman@google.com>
    219
  • trunk/Source/WebCore/bindings/v8/custom/V8DOMStringMapCustom.cpp

    r96166 r100247  
    5050{
    5151    INC_STATS("DOM.DOMStringMap.NamedPropertyGetter");
    52     return v8StringOrUndefined(V8DOMStringMap::toNative(info.Holder())->item(toWebCoreString(name)));
     52    String value = V8DOMStringMap::toNative(info.Holder())->item(toWebCoreString(name));
     53    if (value.isNull())
     54        return notHandledByInterceptor();
     55    return v8StringOrUndefined(value);
    5356}
    5457
     
    6770{
    6871    INC_STATS("DOM.DOMStringMap.NamedPropertyDeleter");
    69 
    70     if (!info.Holder()->GetRealNamedPropertyInPrototypeChain(name).IsEmpty())
    71         return v8::False();
    72     if (info.Holder()->HasRealNamedCallbackProperty(name))
    73         return v8::False();
    74 
    7572    ExceptionCode ec = 0;
    7673    V8DOMStringMap::toNative(info.Holder())->deleteItem(toWebCoreString(name), ec);
    77     if (ec)
    78         throwError(ec);
    79     return v8::True();
     74    return ec ? v8::False() : v8::True();
    8075}
    8176
     
    8378{
    8479    INC_STATS("DOM.DOMStringMap.NamedPropertySetter");
    85 
    86     if (!info.Holder()->GetRealNamedPropertyInPrototypeChain(name).IsEmpty())
    87         return value;
    88     if (info.Holder()->HasRealNamedCallbackProperty(name))
    89         return value;
    90 
    9180    ExceptionCode ec = 0;
    9281    V8DOMStringMap::toNative(info.Holder())->setItem(toWebCoreString(name), toWebCoreString(value), ec);
Note: See TracChangeset for help on using the changeset viewer.