Bug 145489 - [ES6] Drop WeakMap#clear
Summary: [ES6] Drop WeakMap#clear
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Yusuke Suzuki
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-29 23:08 PDT by Yusuke Suzuki
Modified: 2015-05-31 08:10 PDT (History)
6 users (show)

See Also:


Attachments
Patch (2.68 KB, patch)
2015-05-31 03:22 PDT, Yusuke Suzuki
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yusuke Suzuki 2015-05-29 23:08:55 PDT
ES6 spec intentionally drops the WeakMap#clear to allow engine to implement WeakMap as a per-object table.
Comment 1 Yusuke Suzuki 2015-05-31 03:22:54 PDT
Created attachment 253973 [details]
Patch
Comment 2 Mark Lam 2015-05-31 06:43:22 PDT
For reference:

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap/clear indicates that clear() "part of the ECMAScript 6 draft specification until revision 28 (version of October 14, 2014), but has been removed in later versions of the draft. It will not be part of the final standard.”

Firefox 38.0.1 still supports it.
Chrome 43.0.2357.81 has removed it.
Comment 3 Yusuke Suzuki 2015-05-31 07:21:35 PDT
Comment on attachment 253973 [details]
Patch

Thank you for your review and reference.
Comment 4 WebKit Commit Bot 2015-05-31 08:10:31 PDT
Comment on attachment 253973 [details]
Patch

Clearing flags on attachment: 253973

Committed r185041: <http://trac.webkit.org/changeset/185041>
Comment 5 WebKit Commit Bot 2015-05-31 08:10:35 PDT
All reviewed patches have been landed.  Closing bug.