[Webkit-unassigned] [Bug 104242] New: Attribute ReadOnly is not applied to global object's properties set via JSObjectSetProperty

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Dec 6 01:51:41 PST 2012


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

           Summary: Attribute ReadOnly is not applied to global object's
                    properties set via JSObjectSetProperty
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Other
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: hojong.han at samsung.com


Source/JavaScriptCore/API/JSObjectRef.cpp
void JSObjectSetProperty(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef value, JSPropertyAttributes attributes, JSValueRef* exception)
{
    ... skip ...
        jsObject->methodTable()->putDirectVirtual(jsObject, exec, name, jsValue, attributes);
    ... skip ...
}

Source/JavaScriptCore/runtime/JSGlobalObject.cpp
void JSGlobalObject::putDirectVirtual(JSObject* object, ExecState* exec, PropertyName propertyName, JSValue value, unsigned attributes)
{
    ... skip ...
    JSValue valueBefore = thisObject->getDirect(exec->globalData(), propertyName);
    PutPropertySlot slot;
    Base::put(thisObject, exec, propertyName, value, slot);
    if (!valueBefore) {
        JSValue valueAfter = thisObject->getDirect(exec->globalData(), propertyName);
        if (valueAfter)
            JSObject::putDirectVirtual(thisObject, exec, propertyName, valueAfter, attributes);
    }
}

putDirectVirtual called in JSObjectSetProperty calls put and then putDirectVirtual.
Property is put without any attribute in function "put", but stil attribute is not updated in function "putDirectVirtual".
Isn't it a bug?

Plz somebody let me know the reason why the routine is written like above.

-- 
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