[Webkit-unassigned] [Bug 155563] [JSC] correctly handle indexed properties in Object.getOwnPropertyDescriptors

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Mar 17 10:20:42 PDT 2016


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

--- Comment #10 from Caitlin Potter (:caitp) <caitp at igalia.com> ---
Comment on attachment 274287
  --> https://bugs.webkit.org/attachment.cgi?id=274287
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=274287&action=review

>>> Source/JavaScriptCore/runtime/ObjectConstructor.cpp:253
>>> +        JSObject::put(descriptors, exec, propertyName, fromDescriptor, slot);
>> 
>> You need an exception check here. 
>> An exception check is also needed above
>> after constructEmptyObject(). I suggest
>> caching the VM in a local variable and checking
>> VM.exception()
> 
> per spec, this should not cause an observable error (spec algorithm uses CreateDataProperty), which ignores accessors on the prototype. Is there a model for this behaviour in JSC that permits indexed properties?

I've added a model for `CreateDataProperty()` named `putOwnDataPropertyMayBeIndex` --- an unfortunate name, but does the right thing. Test has been added to verify this.

I've also added the cached reference to `vm()`.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20160317/e0153cae/attachment-0001.html>


More information about the webkit-unassigned mailing list