[Webkit-unassigned] [Bug 38636] Object.defineProperty doesn't respect attributes when applied to the Global Object

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Nov 3 12:07:45 PDT 2010


https://bugs.webkit.org/show_bug.cgi?id=38636





--- Comment #7 from Xan Lopez <xan.lopez at gmail.com>  2010-11-03 12:07:45 PST ---
(In reply to comment #6)
> (From update of attachment 72562 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=72562&action=review
> 
> > JavaScriptCore/runtime/JSGlobalObject.cpp:-174
> > -    JSValue valueBefore = getDirect(propertyName);
> > -    PutPropertySlot slot;
> > -    JSVariableObject::put(exec, propertyName, value, slot);
> > -    if (!valueBefore) {
> > -        JSValue valueAfter = getDirect(propertyName);
> > -        if (valueAfter)
> > -            JSObject::putWithAttributes(exec, propertyName, valueAfter, attributes);
> > -    }
> 
> This old code was somewhat convoluted and I'm not sure why -- before we remove it I think we should really understand why the current code behaves as it does.

Totally agree (and thanks Kent for the extended reply!). The patch was more meant as a "Hey, this seems to fix it and pass all tests, what's the deal here". I've been using the patch for many days now and I haven't seen any obvious bug, so if the code achieves something it must be very subtle and I think at the very least it should a comment and some test checking that we do what we intend to do there.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list