<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[215272] trunk</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/215272">215272</a></dd>
<dt>Author</dt> <dd>msaboff@apple.com</dd>
<dt>Date</dt> <dd>2017-04-12 10:35:31 -0700 (Wed, 12 Apr 2017)</dd>
</dl>
<h3>Log Message</h3>
<pre>Implement Object.isFrozen() and Object.isSealed() per ECMA spec
https://bugs.webkit.org/show_bug.cgi?id=170753
Reviewed by Mark Lam.
JSTests:
Added JSC baseline and enabled defineIndexProperty test.
Note that JSC differs from Chakra in that a JSC doesn't use indexed
properties placed on the Array prototype when sorting the indexed
properties of an Object. This is behavior is considered undefined
in the standard.
* ChakraCore.yaml:
* ChakraCore/test/es5/defineIndexProperty.baseline-jsc: Added.
Source/JavaScriptCore:
* runtime/ObjectConstructor.cpp:
(JSC::testIntegrityLevel): Added local helper as described in the ECMA standard.
(JSC::objectConstructorSeal):
(JSC::objectConstructorFreeze):
Eliminated incomplete special handling of JSFinalObjects.
(JSC::objectConstructorIsSealed):
(JSC::objectConstructorIsFrozen):
Refactored to use the new testIntegrityLevel() helper.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkJSTestsChakraCoreyaml">trunk/JSTests/ChakraCore.yaml</a></li>
<li><a href="#trunkJSTestsChangeLog">trunk/JSTests/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCoreChangeLog">trunk/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeObjectConstructorcpp">trunk/Source/JavaScriptCore/runtime/ObjectConstructor.cpp</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkJSTestsChakraCoretestes5defineIndexPropertybaselinejsc">trunk/JSTests/ChakraCore/test/es5/defineIndexProperty.baseline-jsc</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkJSTestsChakraCoretestes5defineIndexPropertybaselinejsc"></a>
<div class="addfile"><h4>Added: trunk/JSTests/ChakraCore/test/es5/defineIndexProperty.baseline-jsc (0 => 215272)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/JSTests/ChakraCore/test/es5/defineIndexProperty.baseline-jsc         (rev 0)
+++ trunk/JSTests/ChakraCore/test/es5/defineIndexProperty.baseline-jsc        2017-04-12 17:35:31 UTC (rev 215272)
</span><span class="lines">@@ -0,0 +1,538 @@
</span><ins>+*** obj (test01): 8.12.9.4.a (variation 1): define generic property, check default attrbitues
+PASSED
+*** obj (test02): 8.12.9.4.a (variation 2): define data property, check default attrbitues
+PASSED
+*** obj (test03): 8.12.9.4.a (variation 3): define generic property by specifying some attributes, check attrbitues
+PASSED
+*** obj (test04): 8.12.9.4.b: define accessor property, check default attrbitues
+PASSED
+*** obj (test05): 8.12.9.5: re-define property: use descriptor with all fields absent, check that nothing happens to previous descriptor
+PASSED
+*** obj (test06): 8.12.9.6: re-define property: use equal descriptor with data field, check that nothing happens to previous descriptor
+PASSED
+*** obj (test07): 8.12.9.7.a: re-define property: current descriptor is not configurable and descriptor is configurable, check that it throws TypeError
+PASSED
+*** obj (test08): 8.12.9.7.b (variation 1): re-define property: current descriptor is not configurable and descriptor enumerable is specified and it's negation of current enumerable, check that it throws TypeError
+PASSED
+*** obj (test09): 8.12.9.7.b (variation 2): re-define property: current descriptor is not configurable and descriptor enumerable is not specified, check that it does not throw
+PASSED
+*** obj (test10): 8.12.9.7.b (variation 3): re-define property: current descriptor is not configurable and descriptor enumerable is same as current enumerable, check that it does not throw
+PASSED
+*** obj (test11): 8.12.9.8: re-define property: descriptor is not empty, generic and is different from current
+PASSED
+*** obj (test12): 8.12.9.9.a: re-define property: descriptor.IsData != current.IsData and current is not configurable, check that it throws TypeError
+PASSED
+*** obj (test13): 8.12.9.9.b (variation 1): re-define property: convert from data to accessor descriptor, check that configurable/enumerable (true) are preserved
+PASSED
+*** obj (test14): 8.12.9.9.b (variation 2): re-define property: convert from data to accessor descriptor, check that enumerable (false) is preserved
+PASSED
+*** obj (test15): 8.12.9.9.b (variation 3): re-define property: convert from data to accessor descriptor, check that configurable/enumerable not preserved when specified by descriptor
+PASSED
+*** obj (test16): 8.12.9.9.c (variation 1): re-define property: convert from accessor to data descriptor, check that configurable/enumerable (true) are preserved
+PASSED
+*** obj (test17): 8.12.9.9.c (variation 2): re-define property: convert from accessor to data descriptor, check that enumerable (false) is preserved
+PASSED
+*** obj (test18): 8.12.9.9.c (variation 3): re-define property: convert from accessor to data descriptor, check that configurable/enumerable (true/false) not preserved when specified by descriptor (false/absent)
+PASSED
+*** obj (test19): 8.12.9.9.c (variation 4): re-define property: convert from accessor to data descriptor, check that configurable/enumerable (true/true) not preserved when specified by descriptor (absent/false)
+PASSED
+*** obj (test20): 8.12.9.10.a (variation 1): re-define data property: current is not configurable/not writable and descriptor writable is absent/value is same
+PASSED
+*** obj (test21): 8.12.9.10.a.i: re-define data property: current is not configurable/not writable and descriptor is writable, check that it throws TypeError
+PASSED
+*** obj (test22): 8.12.9.10.a.ii: re-define data property: current is not configurable/not writable and descriptor writable is false and value is different, check that it throws TypeError
+PASSED
+*** obj (test23): 8.12.9.10.a (variation 2): re-define data property: current is configurable
+PASSED
+*** obj (test24): Test: 8.12.9.11 (variation 1): re-define accessor property: current configurable is true: valid case
+PASSED
+*** obj (test25): 8.12.9.11.a.i: re-define accessor property: current configurable is false, descriptor specifies setter as different, expect TypeError
+PASSED
+*** obj (test26): 8.12.9.11.a.ii: re-define accessor property: current configurable is false, descriptor specifies getter as different, expect TypeError
+PASSED
+*** obj (test27): 8.12.9.11 (variation 2): re-define accessor property: current configurable is true and no getter, descriptor specifies getter as undefined, setter as same
+PASSED
+*** obj (test28): Re-define property from data to accessor property. Make sure that setter is called when setting the value.
+PASSED
+*** obj (test29): Define property 'length' as accessor property on array: check that it throws TypeError.
+PASSED
+*** obj (test30): Define property with getter specified as undefined, then access the property (WOOB bug 1123281)
+PASSED
+*** obj (test31): Define property with setter specified as undefined, then set the property (WOOB bug 1123281)
+PASSED
+*** obj (test32): Convert data to accessor property with getter specified as undefined, then access the property (WOOB bug 1123281)
+PASSED
+*** obj (test33): Convert data to accessor property with setter specified as undefined, then set the property (WOOB bug 1123281)
+PASSED
+*** obj (test34): 8.12.9.3: define property for non-extensible object, check that it throws TypeError
+PASSED
+*** obj (test_101): 8.12.9.4.a (variation 1): define generic property, check default attrbitues
+PASSED
+*** obj (test_102): 8.12.9.4.a (variation 2): define data property, check default attrbitues
+PASSED
+*** obj (test_103): 8.12.9.4.a (variation 3): define generic property by specifying some attributes, check attrbitues
+PASSED
+*** obj (test_104): 8.12.9.4.b: define accessor property, check default attrbitues
+PASSED
+*** obj (test_105): 8.12.9.5: re-define property: use descriptor with all fields absent, check that nothing happens to previous descriptor
+PASSED
+*** obj (test_106): 8.12.9.6: re-define property: use equal descriptor with data field, check that nothing happens to previous descriptor
+PASSED
+*** obj (test_107): 8.12.9.7.a: re-define property: current descriptor is not configurable and descriptor is configurable, check that it throws TypeError
+PASSED
+*** obj (test_108): 8.12.9.7.b (variation 1): re-define property: current descriptor is not configurable and descriptor enumerable is specified and it's negation of current enumerable, check that it throws TypeError
+PASSED
+*** obj (test_109): 8.12.9.7.b (variation 2): re-define property: current descriptor is not configurable and descriptor enumerable is not specified, check that it does not throw
+PASSED
+*** obj (test_110): 8.12.9.7.b (variation 3): re-define property: current descriptor is not configurable and descriptor enumerable is same as current enumerable, check that it does not throw
+PASSED
+*** obj (test_111): 8.12.9.8: re-define property: descriptor is not empty, generic and is different from current
+PASSED
+*** obj (test_112): 8.12.9.9.a: re-define property: descriptor.IsData != current.IsData and current is not configurable, check that it throws TypeError
+PASSED
+*** obj (test_113): 8.12.9.9.b (variation 1): re-define property: convert from data to accessor descriptor, check that configurable/enumerable (true) are preserved
+PASSED
+*** obj (test_114): 8.12.9.9.b (variation 2): re-define property: convert from data to accessor descriptor, check that enumerable (false) is preserved
+PASSED
+*** obj (test_115): 8.12.9.9.b (variation 3): re-define property: convert from data to accessor descriptor, check that configurable/enumerable not preserved when specified by descriptor
+PASSED
+*** obj (test_116): 8.12.9.9.c (variation 1): re-define property: convert from accessor to data descriptor, check that configurable/enumerable (true) are preserved
+PASSED
+*** obj (test_117): 8.12.9.9.c (variation 2): re-define property: convert from accessor to data descriptor, check that enumerable (false) is preserved
+PASSED
+*** obj (test_118): 8.12.9.9.c (variation 3): re-define property: convert from accessor to data descriptor, check that configurable/enumerable (true/false) not preserved when specified by descriptor (false/absent)
+PASSED
+*** obj (test_119): 8.12.9.9.c (variation 4): re-define property: convert from accessor to data descriptor, check that configurable/enumerable (true/true) not preserved when specified by descriptor (absent/false)
+PASSED
+*** obj (test_120): 8.12.9.10.a (variation 1): re-define data property: current is not configurable/not writable and descriptor writable is absent/value is same
+PASSED
+*** obj (test_121): 8.12.9.10.a.i: re-define data property: current is not configurable/not writable and descriptor is writable, check that it throws TypeError
+PASSED
+*** obj (test_122): 8.12.9.10.a.ii: re-define data property: current is not configurable/not writable and descriptor writable is false and value is different, check that it throws TypeError
+PASSED
+*** obj (test_123): 8.12.9.10.a (variation 2): re-define data property: current is configurable
+PASSED
+*** obj (test_124): Test: 8.12.9.11 (variation 1): re-define accessor property: current configurable is true: valid case
+PASSED
+*** obj (test_125): 8.12.9.11.a.i: re-define accessor property: current configurable is false, descriptor specifies setter as different, expect TypeError
+PASSED
+*** obj (test_126): 8.12.9.11.a.ii: re-define accessor property: current configurable is false, descriptor specifies getter as different, expect TypeError
+PASSED
+*** obj (test_127): 8.12.9.11 (variation 2): re-define accessor property: current configurable is true and no getter, descriptor specifies getter as undefined, setter as same
+PASSED
+*** obj (test_128): Re-define property from data to accessor property. Make sure that setter is called when setting the value.
+PASSED
+*** obj (test_129): Define property 'length' as accessor property on array: check that it throws TypeError.
+PASSED
+*** obj (test_130): Define property with getter specified as undefined, then access the property (WOOB bug 1123281)
+PASSED
+*** obj (test_131): Define property with setter specified as undefined, then set the property (WOOB bug 1123281)
+PASSED
+*** obj (test_132): Convert data to accessor property with getter specified as undefined, then access the property (WOOB bug 1123281)
+PASSED
+*** obj (test_133): Convert data to accessor property with setter specified as undefined, then set the property (WOOB bug 1123281)
+PASSED
+*** obj (test_134): 8.12.9.3: define property for non-extensible object, check that it throws TypeError
+PASSED
+*** obj (test_301): set property whose writable is false
+PASSED
+*** obj (test_302): delete index property
+PASSED
+*** obj (test_303): delete a data property then set
+PASSED
+*** obj (test_304): delete a getter property then set
+PASSED
+*** obj (test_305): delete a setter property then set
+PASSED
+*** obj (test_306): Set a property while prototype has a getter
+PASSED
+*** obj (test_306_i): Set a property while prototype has a getter
+PASSED
+*** obj (test_307): Define a property while prototype has a getter
+PASSED
+*** obj (test_307_i): Define a property while prototype has a getter
+PASSED
+*** obj (test_312_i): Test getter/setter on prototype receives the right this arg
+PASSED
+*** obj (test_312a_i): Test getter on prototype receives the right this arg
+PASSED
+*** obj (test_313_i): preventExtensions with index property
+PASSED
+*** obj (test_314_i): seal with index property
+PASSED
+*** obj (test_315_i): freeze with index property
+PASSED
+*** obj (test_316_i): preventExtensions on empty object -> isSealed and isFrozen
+PASSED
+*** obj (test_317_i): preventExtensions on object with an accessor -> isSealed and isFrozen
+PASSED
+*** obj (test_318_i): preventExtensions on object with data -> isSealed and isFrozen
+PASSED
+*** obj (test_319_i): preventExtensions on object with data -> isSealed and isFrozen
+PASSED
+*** obj (test_320_i): preventExtensions on object with data -> isSealed and isFrozen
+PASSED
+*** obj (test_321_i): Test prototype value is used in sort
+Test threw exception: assert.areEqual failed: expected: 10,321, actual: 10,,: sort result mismatch?
+FAILED
+*** obj (test_322_i): Convert accessor to a data property for non-extensible object (WIN8 bug 463559) but for numeric property
+PASSED
+*** arr (test01): 8.12.9.4.a (variation 1): define generic property, check default attrbitues
+PASSED
+*** arr (test02): 8.12.9.4.a (variation 2): define data property, check default attrbitues
+PASSED
+*** arr (test03): 8.12.9.4.a (variation 3): define generic property by specifying some attributes, check attrbitues
+PASSED
+*** arr (test04): 8.12.9.4.b: define accessor property, check default attrbitues
+PASSED
+*** arr (test05): 8.12.9.5: re-define property: use descriptor with all fields absent, check that nothing happens to previous descriptor
+PASSED
+*** arr (test06): 8.12.9.6: re-define property: use equal descriptor with data field, check that nothing happens to previous descriptor
+PASSED
+*** arr (test07): 8.12.9.7.a: re-define property: current descriptor is not configurable and descriptor is configurable, check that it throws TypeError
+PASSED
+*** arr (test08): 8.12.9.7.b (variation 1): re-define property: current descriptor is not configurable and descriptor enumerable is specified and it's negation of current enumerable, check that it throws TypeError
+PASSED
+*** arr (test09): 8.12.9.7.b (variation 2): re-define property: current descriptor is not configurable and descriptor enumerable is not specified, check that it does not throw
+PASSED
+*** arr (test10): 8.12.9.7.b (variation 3): re-define property: current descriptor is not configurable and descriptor enumerable is same as current enumerable, check that it does not throw
+PASSED
+*** arr (test11): 8.12.9.8: re-define property: descriptor is not empty, generic and is different from current
+PASSED
+*** arr (test12): 8.12.9.9.a: re-define property: descriptor.IsData != current.IsData and current is not configurable, check that it throws TypeError
+PASSED
+*** arr (test13): 8.12.9.9.b (variation 1): re-define property: convert from data to accessor descriptor, check that configurable/enumerable (true) are preserved
+PASSED
+*** arr (test14): 8.12.9.9.b (variation 2): re-define property: convert from data to accessor descriptor, check that enumerable (false) is preserved
+PASSED
+*** arr (test15): 8.12.9.9.b (variation 3): re-define property: convert from data to accessor descriptor, check that configurable/enumerable not preserved when specified by descriptor
+PASSED
+*** arr (test16): 8.12.9.9.c (variation 1): re-define property: convert from accessor to data descriptor, check that configurable/enumerable (true) are preserved
+PASSED
+*** arr (test17): 8.12.9.9.c (variation 2): re-define property: convert from accessor to data descriptor, check that enumerable (false) is preserved
+PASSED
+*** arr (test18): 8.12.9.9.c (variation 3): re-define property: convert from accessor to data descriptor, check that configurable/enumerable (true/false) not preserved when specified by descriptor (false/absent)
+PASSED
+*** arr (test19): 8.12.9.9.c (variation 4): re-define property: convert from accessor to data descriptor, check that configurable/enumerable (true/true) not preserved when specified by descriptor (absent/false)
+PASSED
+*** arr (test20): 8.12.9.10.a (variation 1): re-define data property: current is not configurable/not writable and descriptor writable is absent/value is same
+PASSED
+*** arr (test21): 8.12.9.10.a.i: re-define data property: current is not configurable/not writable and descriptor is writable, check that it throws TypeError
+PASSED
+*** arr (test22): 8.12.9.10.a.ii: re-define data property: current is not configurable/not writable and descriptor writable is false and value is different, check that it throws TypeError
+PASSED
+*** arr (test23): 8.12.9.10.a (variation 2): re-define data property: current is configurable
+PASSED
+*** arr (test24): Test: 8.12.9.11 (variation 1): re-define accessor property: current configurable is true: valid case
+PASSED
+*** arr (test25): 8.12.9.11.a.i: re-define accessor property: current configurable is false, descriptor specifies setter as different, expect TypeError
+PASSED
+*** arr (test26): 8.12.9.11.a.ii: re-define accessor property: current configurable is false, descriptor specifies getter as different, expect TypeError
+PASSED
+*** arr (test27): 8.12.9.11 (variation 2): re-define accessor property: current configurable is true and no getter, descriptor specifies getter as undefined, setter as same
+PASSED
+*** arr (test28): Re-define property from data to accessor property. Make sure that setter is called when setting the value.
+PASSED
+*** arr (test29): Define property 'length' as accessor property on array: check that it throws TypeError.
+PASSED
+*** arr (test30): Define property with getter specified as undefined, then access the property (WOOB bug 1123281)
+PASSED
+*** arr (test31): Define property with setter specified as undefined, then set the property (WOOB bug 1123281)
+PASSED
+*** arr (test32): Convert data to accessor property with getter specified as undefined, then access the property (WOOB bug 1123281)
+PASSED
+*** arr (test33): Convert data to accessor property with setter specified as undefined, then set the property (WOOB bug 1123281)
+PASSED
+*** arr (test34): 8.12.9.3: define property for non-extensible object, check that it throws TypeError
+PASSED
+*** arr (test_101): 8.12.9.4.a (variation 1): define generic property, check default attrbitues
+PASSED
+*** arr (test_102): 8.12.9.4.a (variation 2): define data property, check default attrbitues
+PASSED
+*** arr (test_103): 8.12.9.4.a (variation 3): define generic property by specifying some attributes, check attrbitues
+PASSED
+*** arr (test_104): 8.12.9.4.b: define accessor property, check default attrbitues
+PASSED
+*** arr (test_105): 8.12.9.5: re-define property: use descriptor with all fields absent, check that nothing happens to previous descriptor
+PASSED
+*** arr (test_106): 8.12.9.6: re-define property: use equal descriptor with data field, check that nothing happens to previous descriptor
+PASSED
+*** arr (test_107): 8.12.9.7.a: re-define property: current descriptor is not configurable and descriptor is configurable, check that it throws TypeError
+PASSED
+*** arr (test_108): 8.12.9.7.b (variation 1): re-define property: current descriptor is not configurable and descriptor enumerable is specified and it's negation of current enumerable, check that it throws TypeError
+PASSED
+*** arr (test_109): 8.12.9.7.b (variation 2): re-define property: current descriptor is not configurable and descriptor enumerable is not specified, check that it does not throw
+PASSED
+*** arr (test_110): 8.12.9.7.b (variation 3): re-define property: current descriptor is not configurable and descriptor enumerable is same as current enumerable, check that it does not throw
+PASSED
+*** arr (test_111): 8.12.9.8: re-define property: descriptor is not empty, generic and is different from current
+PASSED
+*** arr (test_112): 8.12.9.9.a: re-define property: descriptor.IsData != current.IsData and current is not configurable, check that it throws TypeError
+PASSED
+*** arr (test_113): 8.12.9.9.b (variation 1): re-define property: convert from data to accessor descriptor, check that configurable/enumerable (true) are preserved
+PASSED
+*** arr (test_114): 8.12.9.9.b (variation 2): re-define property: convert from data to accessor descriptor, check that enumerable (false) is preserved
+PASSED
+*** arr (test_115): 8.12.9.9.b (variation 3): re-define property: convert from data to accessor descriptor, check that configurable/enumerable not preserved when specified by descriptor
+PASSED
+*** arr (test_116): 8.12.9.9.c (variation 1): re-define property: convert from accessor to data descriptor, check that configurable/enumerable (true) are preserved
+PASSED
+*** arr (test_117): 8.12.9.9.c (variation 2): re-define property: convert from accessor to data descriptor, check that enumerable (false) is preserved
+PASSED
+*** arr (test_118): 8.12.9.9.c (variation 3): re-define property: convert from accessor to data descriptor, check that configurable/enumerable (true/false) not preserved when specified by descriptor (false/absent)
+PASSED
+*** arr (test_119): 8.12.9.9.c (variation 4): re-define property: convert from accessor to data descriptor, check that configurable/enumerable (true/true) not preserved when specified by descriptor (absent/false)
+PASSED
+*** arr (test_120): 8.12.9.10.a (variation 1): re-define data property: current is not configurable/not writable and descriptor writable is absent/value is same
+PASSED
+*** arr (test_121): 8.12.9.10.a.i: re-define data property: current is not configurable/not writable and descriptor is writable, check that it throws TypeError
+PASSED
+*** arr (test_122): 8.12.9.10.a.ii: re-define data property: current is not configurable/not writable and descriptor writable is false and value is different, check that it throws TypeError
+PASSED
+*** arr (test_123): 8.12.9.10.a (variation 2): re-define data property: current is configurable
+PASSED
+*** arr (test_124): Test: 8.12.9.11 (variation 1): re-define accessor property: current configurable is true: valid case
+PASSED
+*** arr (test_125): 8.12.9.11.a.i: re-define accessor property: current configurable is false, descriptor specifies setter as different, expect TypeError
+PASSED
+*** arr (test_126): 8.12.9.11.a.ii: re-define accessor property: current configurable is false, descriptor specifies getter as different, expect TypeError
+PASSED
+*** arr (test_127): 8.12.9.11 (variation 2): re-define accessor property: current configurable is true and no getter, descriptor specifies getter as undefined, setter as same
+PASSED
+*** arr (test_128): Re-define property from data to accessor property. Make sure that setter is called when setting the value.
+PASSED
+*** arr (test_129): Define property 'length' as accessor property on array: check that it throws TypeError.
+PASSED
+*** arr (test_130): Define property with getter specified as undefined, then access the property (WOOB bug 1123281)
+PASSED
+*** arr (test_131): Define property with setter specified as undefined, then set the property (WOOB bug 1123281)
+PASSED
+*** arr (test_132): Convert data to accessor property with getter specified as undefined, then access the property (WOOB bug 1123281)
+PASSED
+*** arr (test_133): Convert data to accessor property with setter specified as undefined, then set the property (WOOB bug 1123281)
+PASSED
+*** arr (test_134): 8.12.9.3: define property for non-extensible object, check that it throws TypeError
+PASSED
+*** arr (test_301): set property whose writable is false
+PASSED
+*** arr (test_302): delete index property
+PASSED
+*** arr (test_303): delete a data property then set
+PASSED
+*** arr (test_304): delete a getter property then set
+PASSED
+*** arr (test_305): delete a setter property then set
+PASSED
+*** arr (test_306): Set a property while prototype has a getter
+PASSED
+*** arr (test_306_i): Set a property while prototype has a getter
+PASSED
+*** arr (test_307): Define a property while prototype has a getter
+PASSED
+*** arr (test_307_i): Define a property while prototype has a getter
+PASSED
+*** arr (test_312_i): Test getter/setter on prototype receives the right this arg
+PASSED
+*** arr (test_312a_i): Test getter on prototype receives the right this arg
+PASSED
+*** arr (test_313_i): preventExtensions with index property
+PASSED
+*** arr (test_314_i): seal with index property
+PASSED
+*** arr (test_315_i): freeze with index property
+PASSED
+*** arr (test_316_i): preventExtensions on empty object -> isSealed and isFrozen
+PASSED
+*** arr (test_317_i): preventExtensions on object with an accessor -> isSealed and isFrozen
+PASSED
+*** arr (test_318_i): preventExtensions on object with data -> isSealed and isFrozen
+PASSED
+*** arr (test_319_i): preventExtensions on object with data -> isSealed and isFrozen
+PASSED
+*** arr (test_320_i): preventExtensions on object with data -> isSealed and isFrozen
+PASSED
+*** arr (test_321_i): Test prototype value is used in sort
+PASSED
+*** arr (test_322_i): Convert accessor to a data property for non-extensible object (WIN8 bug 463559) but for numeric property
+PASSED
+*** es5arr (test01): 8.12.9.4.a (variation 1): define generic property, check default attrbitues
+PASSED
+*** es5arr (test02): 8.12.9.4.a (variation 2): define data property, check default attrbitues
+PASSED
+*** es5arr (test03): 8.12.9.4.a (variation 3): define generic property by specifying some attributes, check attrbitues
+PASSED
+*** es5arr (test04): 8.12.9.4.b: define accessor property, check default attrbitues
+PASSED
+*** es5arr (test05): 8.12.9.5: re-define property: use descriptor with all fields absent, check that nothing happens to previous descriptor
+PASSED
+*** es5arr (test06): 8.12.9.6: re-define property: use equal descriptor with data field, check that nothing happens to previous descriptor
+PASSED
+*** es5arr (test07): 8.12.9.7.a: re-define property: current descriptor is not configurable and descriptor is configurable, check that it throws TypeError
+PASSED
+*** es5arr (test08): 8.12.9.7.b (variation 1): re-define property: current descriptor is not configurable and descriptor enumerable is specified and it's negation of current enumerable, check that it throws TypeError
+PASSED
+*** es5arr (test09): 8.12.9.7.b (variation 2): re-define property: current descriptor is not configurable and descriptor enumerable is not specified, check that it does not throw
+PASSED
+*** es5arr (test10): 8.12.9.7.b (variation 3): re-define property: current descriptor is not configurable and descriptor enumerable is same as current enumerable, check that it does not throw
+PASSED
+*** es5arr (test11): 8.12.9.8: re-define property: descriptor is not empty, generic and is different from current
+PASSED
+*** es5arr (test12): 8.12.9.9.a: re-define property: descriptor.IsData != current.IsData and current is not configurable, check that it throws TypeError
+PASSED
+*** es5arr (test13): 8.12.9.9.b (variation 1): re-define property: convert from data to accessor descriptor, check that configurable/enumerable (true) are preserved
+PASSED
+*** es5arr (test14): 8.12.9.9.b (variation 2): re-define property: convert from data to accessor descriptor, check that enumerable (false) is preserved
+PASSED
+*** es5arr (test15): 8.12.9.9.b (variation 3): re-define property: convert from data to accessor descriptor, check that configurable/enumerable not preserved when specified by descriptor
+PASSED
+*** es5arr (test16): 8.12.9.9.c (variation 1): re-define property: convert from accessor to data descriptor, check that configurable/enumerable (true) are preserved
+PASSED
+*** es5arr (test17): 8.12.9.9.c (variation 2): re-define property: convert from accessor to data descriptor, check that enumerable (false) is preserved
+PASSED
+*** es5arr (test18): 8.12.9.9.c (variation 3): re-define property: convert from accessor to data descriptor, check that configurable/enumerable (true/false) not preserved when specified by descriptor (false/absent)
+PASSED
+*** es5arr (test19): 8.12.9.9.c (variation 4): re-define property: convert from accessor to data descriptor, check that configurable/enumerable (true/true) not preserved when specified by descriptor (absent/false)
+PASSED
+*** es5arr (test20): 8.12.9.10.a (variation 1): re-define data property: current is not configurable/not writable and descriptor writable is absent/value is same
+PASSED
+*** es5arr (test21): 8.12.9.10.a.i: re-define data property: current is not configurable/not writable and descriptor is writable, check that it throws TypeError
+PASSED
+*** es5arr (test22): 8.12.9.10.a.ii: re-define data property: current is not configurable/not writable and descriptor writable is false and value is different, check that it throws TypeError
+PASSED
+*** es5arr (test23): 8.12.9.10.a (variation 2): re-define data property: current is configurable
+PASSED
+*** es5arr (test24): Test: 8.12.9.11 (variation 1): re-define accessor property: current configurable is true: valid case
+PASSED
+*** es5arr (test25): 8.12.9.11.a.i: re-define accessor property: current configurable is false, descriptor specifies setter as different, expect TypeError
+PASSED
+*** es5arr (test26): 8.12.9.11.a.ii: re-define accessor property: current configurable is false, descriptor specifies getter as different, expect TypeError
+PASSED
+*** es5arr (test27): 8.12.9.11 (variation 2): re-define accessor property: current configurable is true and no getter, descriptor specifies getter as undefined, setter as same
+PASSED
+*** es5arr (test28): Re-define property from data to accessor property. Make sure that setter is called when setting the value.
+PASSED
+*** es5arr (test29): Define property 'length' as accessor property on array: check that it throws TypeError.
+PASSED
+*** es5arr (test30): Define property with getter specified as undefined, then access the property (WOOB bug 1123281)
+PASSED
+*** es5arr (test31): Define property with setter specified as undefined, then set the property (WOOB bug 1123281)
+PASSED
+*** es5arr (test32): Convert data to accessor property with getter specified as undefined, then access the property (WOOB bug 1123281)
+PASSED
+*** es5arr (test33): Convert data to accessor property with setter specified as undefined, then set the property (WOOB bug 1123281)
+PASSED
+*** es5arr (test34): 8.12.9.3: define property for non-extensible object, check that it throws TypeError
+PASSED
+*** es5arr (test_101): 8.12.9.4.a (variation 1): define generic property, check default attrbitues
+PASSED
+*** es5arr (test_102): 8.12.9.4.a (variation 2): define data property, check default attrbitues
+PASSED
+*** es5arr (test_103): 8.12.9.4.a (variation 3): define generic property by specifying some attributes, check attrbitues
+PASSED
+*** es5arr (test_104): 8.12.9.4.b: define accessor property, check default attrbitues
+PASSED
+*** es5arr (test_105): 8.12.9.5: re-define property: use descriptor with all fields absent, check that nothing happens to previous descriptor
+PASSED
+*** es5arr (test_106): 8.12.9.6: re-define property: use equal descriptor with data field, check that nothing happens to previous descriptor
+PASSED
+*** es5arr (test_107): 8.12.9.7.a: re-define property: current descriptor is not configurable and descriptor is configurable, check that it throws TypeError
+PASSED
+*** es5arr (test_108): 8.12.9.7.b (variation 1): re-define property: current descriptor is not configurable and descriptor enumerable is specified and it's negation of current enumerable, check that it throws TypeError
+PASSED
+*** es5arr (test_109): 8.12.9.7.b (variation 2): re-define property: current descriptor is not configurable and descriptor enumerable is not specified, check that it does not throw
+PASSED
+*** es5arr (test_110): 8.12.9.7.b (variation 3): re-define property: current descriptor is not configurable and descriptor enumerable is same as current enumerable, check that it does not throw
+PASSED
+*** es5arr (test_111): 8.12.9.8: re-define property: descriptor is not empty, generic and is different from current
+PASSED
+*** es5arr (test_112): 8.12.9.9.a: re-define property: descriptor.IsData != current.IsData and current is not configurable, check that it throws TypeError
+PASSED
+*** es5arr (test_113): 8.12.9.9.b (variation 1): re-define property: convert from data to accessor descriptor, check that configurable/enumerable (true) are preserved
+PASSED
+*** es5arr (test_114): 8.12.9.9.b (variation 2): re-define property: convert from data to accessor descriptor, check that enumerable (false) is preserved
+PASSED
+*** es5arr (test_115): 8.12.9.9.b (variation 3): re-define property: convert from data to accessor descriptor, check that configurable/enumerable not preserved when specified by descriptor
+PASSED
+*** es5arr (test_116): 8.12.9.9.c (variation 1): re-define property: convert from accessor to data descriptor, check that configurable/enumerable (true) are preserved
+PASSED
+*** es5arr (test_117): 8.12.9.9.c (variation 2): re-define property: convert from accessor to data descriptor, check that enumerable (false) is preserved
+PASSED
+*** es5arr (test_118): 8.12.9.9.c (variation 3): re-define property: convert from accessor to data descriptor, check that configurable/enumerable (true/false) not preserved when specified by descriptor (false/absent)
+PASSED
+*** es5arr (test_119): 8.12.9.9.c (variation 4): re-define property: convert from accessor to data descriptor, check that configurable/enumerable (true/true) not preserved when specified by descriptor (absent/false)
+PASSED
+*** es5arr (test_120): 8.12.9.10.a (variation 1): re-define data property: current is not configurable/not writable and descriptor writable is absent/value is same
+PASSED
+*** es5arr (test_121): 8.12.9.10.a.i: re-define data property: current is not configurable/not writable and descriptor is writable, check that it throws TypeError
+PASSED
+*** es5arr (test_122): 8.12.9.10.a.ii: re-define data property: current is not configurable/not writable and descriptor writable is false and value is different, check that it throws TypeError
+PASSED
+*** es5arr (test_123): 8.12.9.10.a (variation 2): re-define data property: current is configurable
+PASSED
+*** es5arr (test_124): Test: 8.12.9.11 (variation 1): re-define accessor property: current configurable is true: valid case
+PASSED
+*** es5arr (test_125): 8.12.9.11.a.i: re-define accessor property: current configurable is false, descriptor specifies setter as different, expect TypeError
+PASSED
+*** es5arr (test_126): 8.12.9.11.a.ii: re-define accessor property: current configurable is false, descriptor specifies getter as different, expect TypeError
+PASSED
+*** es5arr (test_127): 8.12.9.11 (variation 2): re-define accessor property: current configurable is true and no getter, descriptor specifies getter as undefined, setter as same
+PASSED
+*** es5arr (test_128): Re-define property from data to accessor property. Make sure that setter is called when setting the value.
+PASSED
+*** es5arr (test_129): Define property 'length' as accessor property on array: check that it throws TypeError.
+PASSED
+*** es5arr (test_130): Define property with getter specified as undefined, then access the property (WOOB bug 1123281)
+PASSED
+*** es5arr (test_131): Define property with setter specified as undefined, then set the property (WOOB bug 1123281)
+PASSED
+*** es5arr (test_132): Convert data to accessor property with getter specified as undefined, then access the property (WOOB bug 1123281)
+PASSED
+*** es5arr (test_133): Convert data to accessor property with setter specified as undefined, then set the property (WOOB bug 1123281)
+PASSED
+*** es5arr (test_134): 8.12.9.3: define property for non-extensible object, check that it throws TypeError
+PASSED
+*** es5arr (test_301): set property whose writable is false
+PASSED
+*** es5arr (test_302): delete index property
+PASSED
+*** es5arr (test_303): delete a data property then set
+PASSED
+*** es5arr (test_304): delete a getter property then set
+PASSED
+*** es5arr (test_305): delete a setter property then set
+PASSED
+*** es5arr (test_306): Set a property while prototype has a getter
+PASSED
+*** es5arr (test_306_i): Set a property while prototype has a getter
+PASSED
+*** es5arr (test_307): Define a property while prototype has a getter
+PASSED
+*** es5arr (test_307_i): Define a property while prototype has a getter
+PASSED
+*** es5arr (test_312_i): Test getter/setter on prototype receives the right this arg
+PASSED
+*** es5arr (test_312a_i): Test getter on prototype receives the right this arg
+PASSED
+*** es5arr (test_313_i): preventExtensions with index property
+PASSED
+*** es5arr (test_314_i): seal with index property
+PASSED
+*** es5arr (test_315_i): freeze with index property
+PASSED
+*** es5arr (test_316_i): preventExtensions on empty object -> isSealed and isFrozen
+PASSED
+*** es5arr (test_317_i): preventExtensions on object with an accessor -> isSealed and isFrozen
+PASSED
+*** es5arr (test_318_i): preventExtensions on object with data -> isSealed and isFrozen
+PASSED
+*** es5arr (test_319_i): preventExtensions on object with data -> isSealed and isFrozen
+PASSED
+*** es5arr (test_320_i): preventExtensions on object with data -> isSealed and isFrozen
+PASSED
+*** es5arr (test_321_i): Test prototype value is used in sort
+PASSED
+*** es5arr (test_322_i): Convert accessor to a data property for non-extensible object (WIN8 bug 463559) but for numeric property
+PASSED
+*** misc (test_308_i): Set a property via object literal while prototype has a getter
+PASSED
+Summary of tests: total executed: 268; passed: 267; failed: 1
</ins></span></pre></div>
<a id="trunkJSTestsChakraCoreyaml"></a>
<div class="modfile"><h4>Modified: trunk/JSTests/ChakraCore.yaml (215271 => 215272)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/JSTests/ChakraCore.yaml        2017-04-12 17:23:09 UTC (rev 215271)
+++ trunk/JSTests/ChakraCore.yaml        2017-04-12 17:35:31 UTC (rev 215272)
</span><span class="lines">@@ -1442,8 +1442,7 @@
</span><span class="cx"> - path: ChakraCore/test/es5/defineProperty.js
</span><span class="cx"> cmd: runChakra :baseline, "NoException", "defineProperty.baseline", ["../UnitTestFramework/UnitTestFramework.js"]
</span><span class="cx"> - path: ChakraCore/test/es5/defineIndexProperty.js
</span><del>- # Differences in Obj.seal, Obj.frozen and sort.
- cmd: runChakra :skip, "NoException", "defineIndexProperty.baseline", []
</del><ins>+ cmd: runChakra :baseline, "NoException", "defineIndexProperty.baseline-jsc", []
</ins><span class="cx"> - path: ChakraCore/test/es5/enumerable.js
</span><span class="cx"> cmd: runChakra :baseline, "NoException", "enumerable.baseline-jsc", []
</span><span class="cx"> - path: ChakraCore/test/es5/hasItem.js
</span></span></pre></div>
<a id="trunkJSTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/JSTests/ChangeLog (215271 => 215272)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/JSTests/ChangeLog        2017-04-12 17:23:09 UTC (rev 215271)
+++ trunk/JSTests/ChangeLog        2017-04-12 17:35:31 UTC (rev 215272)
</span><span class="lines">@@ -1,3 +1,20 @@
</span><ins>+2017-04-11 Michael Saboff <msaboff@apple.com>
+
+ Implement Object.isFrozen() and Object.isSealed() per ECMA spec
+ https://bugs.webkit.org/show_bug.cgi?id=170753
+
+ Reviewed by Mark Lam.
+
+ Added JSC baseline and enabled defineIndexProperty test.
+
+ Note that JSC differs from Chakra in that a JSC doesn't use indexed
+ properties placed on the Array prototype when sorting the indexed
+ properties of an Object. This is behavior is considered undefined
+ in the standard.
+
+ * ChakraCore.yaml:
+ * ChakraCore/test/es5/defineIndexProperty.baseline-jsc: Added.
+
</ins><span class="cx"> 2017-04-11 Joseph Pecoraro <pecoraro@apple.com>
</span><span class="cx">
</span><span class="cx"> test262: test262/test/annexB/language/comments/multi-line-html-close.js
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (215271 => 215272)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog        2017-04-12 17:23:09 UTC (rev 215271)
+++ trunk/Source/JavaScriptCore/ChangeLog        2017-04-12 17:35:31 UTC (rev 215272)
</span><span class="lines">@@ -1,3 +1,21 @@
</span><ins>+2017-04-12 Michael Saboff <msaboff@apple.com>
+
+ Implement Object.isFrozen() and Object.isSealed() per ECMA spec
+ https://bugs.webkit.org/show_bug.cgi?id=170753
+
+ Reviewed by Mark Lam.
+
+ * runtime/ObjectConstructor.cpp:
+ (JSC::testIntegrityLevel): Added local helper as described in the ECMA standard.
+
+ (JSC::objectConstructorSeal):
+ (JSC::objectConstructorFreeze):
+ Eliminated incomplete special handling of JSFinalObjects.
+
+ (JSC::objectConstructorIsSealed):
+ (JSC::objectConstructorIsFrozen):
+ Refactored to use the new testIntegrityLevel() helper.
+
</ins><span class="cx"> 2017-04-12 Yusuke Suzuki <utatane.tea@gmail.com>
</span><span class="cx">
</span><span class="cx"> Use HAVE(MACHINE_CONTEXT) instead of USE(MACHINE_CONTEXT)
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeObjectConstructorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/ObjectConstructor.cpp (215271 => 215272)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/ObjectConstructor.cpp        2017-04-12 17:23:09 UTC (rev 215271)
+++ trunk/Source/JavaScriptCore/runtime/ObjectConstructor.cpp        2017-04-12 17:35:31 UTC (rev 215272)
</span><span class="lines">@@ -546,7 +546,57 @@
</span><span class="cx"> }
</span><span class="cx"> return true;
</span><span class="cx"> }
</span><del>-
</del><ins>+
+template<IntegrityLevel level>
+bool testIntegrityLevel(ExecState* exec, VM& vm, JSObject* object)
+{
+ auto scope = DECLARE_THROW_SCOPE(vm);
+
+ // 1. Assert: Type(O) is Object.
+ // 2. Assert: level is either "sealed" or "frozen".
+
+ // 3. Let status be ?IsExtensible(O).
+ bool status = object->isExtensible(exec);
+ RETURN_IF_EXCEPTION(scope, { });
+
+ // 4. If status is true, return false.
+ if (status)
+ return false;
+
+ // 6. Let keys be ? O.[[OwnPropertyKeys]]().
+ PropertyNameArray keys(exec, PropertyNameMode::StringsAndSymbols);
+ object->methodTable(vm)->getOwnPropertyNames(object, exec, keys, EnumerationMode(DontEnumPropertiesMode::Include));
+ RETURN_IF_EXCEPTION(scope, { });
+
+ // 7. For each element k of keys, do
+ PropertyNameArray::const_iterator end = keys.end();
+ for (PropertyNameArray::const_iterator iter = keys.begin(); iter != end; ++iter) {
+ Identifier propertyName = *iter;
+ if (vm.propertyNames->isPrivateName(propertyName))
+ continue;
+
+ // a. Let currentDesc be ? O.[[GetOwnProperty]](k)
+ PropertyDescriptor desc;
+ bool didGetDescriptor = object->getOwnPropertyDescriptor(exec, propertyName, desc);
+ RETURN_IF_EXCEPTION(scope, { });
+
+ // b. If currentDesc is not undefined, then
+ if (!didGetDescriptor)
+ continue;
+
+ // i. If currentDesc.[[Configurable]] is true, return false.
+ if (desc.configurable())
+ return false;
+
+ // ii. If level is "frozen" and IsDataDescriptor(currentDesc) is true, then
+ // 1. If currentDesc.[[Writable]] is true, return false.
+ if (level == IntegrityLevel::Frozen && desc.isDataDescriptor() && desc.writable())
+ return false;
+ }
+
+ return true;
+}
+
</ins><span class="cx"> EncodedJSValue JSC_HOST_CALL objectConstructorSeal(ExecState* exec)
</span><span class="cx"> {
</span><span class="cx"> VM& vm = exec->vm();
</span><span class="lines">@@ -558,11 +608,6 @@
</span><span class="cx"> return JSValue::encode(obj);
</span><span class="cx"> JSObject* object = asObject(obj);
</span><span class="cx">
</span><del>- if (isJSFinalObject(object)) {
- object->seal(vm);
- return JSValue::encode(obj);
- }
-
</del><span class="cx"> bool success = setIntegrityLevel<IntegrityLevel::Sealed>(exec, vm, object);
</span><span class="cx"> RETURN_IF_EXCEPTION(scope, encodedJSValue());
</span><span class="cx"> if (UNLIKELY(!success)) {
</span><span class="lines">@@ -578,11 +623,6 @@
</span><span class="cx"> VM& vm = exec->vm();
</span><span class="cx"> auto scope = DECLARE_THROW_SCOPE(vm);
</span><span class="cx">
</span><del>- if (isJSFinalObject(object) && !hasIndexedProperties(object->indexingType())) {
- object->freeze(vm);
- return object;
- }
-
</del><span class="cx"> bool success = setIntegrityLevel<IntegrityLevel::Frozen>(exec, vm, object);
</span><span class="cx"> RETURN_IF_EXCEPTION(scope, nullptr);
</span><span class="cx"> if (!success)
</span><span class="lines">@@ -617,7 +657,6 @@
</span><span class="cx"> EncodedJSValue JSC_HOST_CALL objectConstructorIsSealed(ExecState* exec)
</span><span class="cx"> {
</span><span class="cx"> VM& vm = exec->vm();
</span><del>- auto scope = DECLARE_THROW_SCOPE(vm);
</del><span class="cx">
</span><span class="cx"> // 1. If Type(O) is not Object, return true.
</span><span class="cx"> JSValue obj = exec->argument(0);
</span><span class="lines">@@ -625,40 +664,13 @@
</span><span class="cx"> return JSValue::encode(jsBoolean(true));
</span><span class="cx"> JSObject* object = asObject(obj);
</span><span class="cx">
</span><del>- if (isJSFinalObject(object))
- return JSValue::encode(jsBoolean(object->isSealed(vm)));
-
- // 2. For each named own property name P of O,
- PropertyNameArray properties(exec, PropertyNameMode::StringsAndSymbols);
- object->methodTable(vm)->getOwnPropertyNames(object, exec, properties, EnumerationMode(DontEnumPropertiesMode::Include));
- RETURN_IF_EXCEPTION(scope, { });
- PropertyNameArray::const_iterator end = properties.end();
- for (PropertyNameArray::const_iterator iter = properties.begin(); iter != end; ++iter) {
- Identifier propertyName = *iter;
- if (vm.propertyNames->isPrivateName(propertyName))
- continue;
- // a. Let desc be the result of calling the [[GetOwnProperty]] internal method of O with P.
- PropertyDescriptor desc;
- bool didGetDescriptor = object->getOwnPropertyDescriptor(exec, propertyName, desc);
- RETURN_IF_EXCEPTION(scope, { });
- if (!didGetDescriptor)
- continue;
- // b. If desc.[[Configurable]] is true, then return false.
- if (desc.configurable())
- return JSValue::encode(jsBoolean(false));
- }
-
- // 3. If the [[Extensible]] internal property of O is false, then return true.
- // 4. Otherwise, return false.
- bool isExtensible = object->isExtensible(exec);
- RETURN_IF_EXCEPTION(scope, { });
- return JSValue::encode(jsBoolean(!isExtensible));
</del><ins>+ // 2. Return ? TestIntegrityLevel(O, "sealed").
+ return JSValue::encode(jsBoolean(testIntegrityLevel<IntegrityLevel::Sealed>(exec, vm, object)));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> EncodedJSValue JSC_HOST_CALL objectConstructorIsFrozen(ExecState* exec)
</span><span class="cx"> {
</span><span class="cx"> VM& vm = exec->vm();
</span><del>- auto scope = DECLARE_THROW_SCOPE(vm);
</del><span class="cx">
</span><span class="cx"> // 1. If Type(O) is not Object, return true.
</span><span class="cx"> JSValue obj = exec->argument(0);
</span><span class="lines">@@ -666,35 +678,8 @@
</span><span class="cx"> return JSValue::encode(jsBoolean(true));
</span><span class="cx"> JSObject* object = asObject(obj);
</span><span class="cx">
</span><del>- if (isJSFinalObject(object))
- return JSValue::encode(jsBoolean(object->isFrozen(vm)));
-
- // 2. For each named own property name P of O,
- PropertyNameArray properties(exec, PropertyNameMode::StringsAndSymbols);
- object->methodTable(vm)->getOwnPropertyNames(object, exec, properties, EnumerationMode(DontEnumPropertiesMode::Include));
- RETURN_IF_EXCEPTION(scope, { });
- PropertyNameArray::const_iterator end = properties.end();
- for (PropertyNameArray::const_iterator iter = properties.begin(); iter != end; ++iter) {
- Identifier propertyName = *iter;
- if (vm.propertyNames->isPrivateName(propertyName))
- continue;
- // a. Let desc be the result of calling the [[GetOwnProperty]] internal method of O with P.
- PropertyDescriptor desc;
- bool didGetDescriptor = object->getOwnPropertyDescriptor(exec, propertyName, desc);
- RETURN_IF_EXCEPTION(scope, { });
- if (!didGetDescriptor)
- continue;
- // b. If IsDataDescriptor(desc) is true then
- // i. If desc.[[Writable]] is true, return false. c. If desc.[[Configurable]] is true, then return false.
- if ((desc.isDataDescriptor() && desc.writable()) || desc.configurable())
- return JSValue::encode(jsBoolean(false));
- }
-
- // 3. If the [[Extensible]] internal property of O is false, then return true.
- // 4. Otherwise, return false.
- bool isExtensible = object->isExtensible(exec);
- RETURN_IF_EXCEPTION(scope, { });
- return JSValue::encode(jsBoolean(!isExtensible));
</del><ins>+ // 2. Return ? TestIntegrityLevel(O, "frozen").
+ return JSValue::encode(jsBoolean(testIntegrityLevel<IntegrityLevel::Frozen>(exec, vm, object)));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> EncodedJSValue JSC_HOST_CALL objectConstructorIsExtensible(ExecState* exec)
</span></span></pre>
</div>
</div>
</body>
</html>