Bug 170753 - Implement Object.isFrozen() and Object.isSealed() per ECMA spec
Summary: Implement Object.isFrozen() and Object.isSealed() per ECMA spec
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Michael Saboff
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2017-04-11 15:43 PDT by Michael Saboff
Modified: 2017-04-12 10:36 PDT (History)
4 users (show)

See Also:


Attachments
Patch (46.17 KB, patch)
2017-04-11 15:59 PDT, Michael Saboff
mark.lam: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Saboff 2017-04-11 15:43:23 PDT
Our implementations for isFrozen() & isSealed() have special cases for JSFinalObjects that do not properly implement the semantics described in the ECMA standard.

The describes isFrozen() & isSealed() in terms of an abstract operation TestIntegrityLevel() <https://tc39.github.io/ecma262/#sec-testintegritylevel>.  We should implement TestIntegrityLevel() similar to how we implemented setIntegrityLevel() and use it for isFrozen() & isSealed().

<rdar://problem/31567008>
Comment 1 Michael Saboff 2017-04-11 15:59:09 PDT
Created attachment 306869 [details]
Patch
Comment 2 Mark Lam 2017-04-11 20:52:35 PDT
Comment on attachment 306869 [details]
Patch

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

r=me

> JSTests/ChangeLog:12
> +        roperties of an Object.  This is behanvior is considered undefined

typo: /roperties/properties/, /is behanvior/behavior/
Comment 3 Michael Saboff 2017-04-12 10:36:45 PDT
Fix landed in change set r215272 <https://trac.webkit.org/changeset/215272>