Bug 206131

Summary: Object.preventExtensions should throw if not successful
Product: WebKit Reporter: Alexey Shvayka <ashvayka>
Component: JavaScriptCoreAssignee: Alexey Shvayka <ashvayka>
Status: RESOLVED FIXED    
Severity: Minor CC: commit-queue, ews-watchlist, keith_miller, mark.lam, msaboff, ross.kirsling, saam, tzagallo, webkit-bug-importer, ysuzuki
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch none

Description Alexey Shvayka 2020-01-11 10:16:36 PST
Test case:
  Object.preventExtensions(new Proxy({}, {
    preventExtensions: () => false
  }))

Expected:
  Throws TypeError

Actual:
  Returns Proxy

ECMA262: https://tc39.es/ecma262/#sec-object.preventextensions (step 3)
Test262: https://test262.report/browse/built-ins/Object/preventExtensions/throws-when-false.js
Comment 1 Alexey Shvayka 2020-01-11 12:30:34 PST
Created attachment 387443 [details]
Patch
Comment 2 Ross Kirsling 2020-01-15 10:23:27 PST
Comment on attachment 387443 [details]
Patch

r=me
Comment 3 WebKit Commit Bot 2020-01-15 11:57:44 PST
Comment on attachment 387443 [details]
Patch

Clearing flags on attachment: 387443

Committed r254626: <https://trac.webkit.org/changeset/254626>
Comment 4 WebKit Commit Bot 2020-01-15 11:57:45 PST
All reviewed patches have been landed.  Closing bug.
Comment 5 Radar WebKit Bug Importer 2020-01-15 11:58:17 PST
<rdar://problem/58613904>