Bug 185785 - "symbolTablePutTouchWatchpointSet" is a terrible name
Summary: "symbolTablePutTouchWatchpointSet" is a terrible name
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-05-18 14:21 PDT by Simon Fraser (smfr)
Modified: 2018-05-31 11:10 PDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Fraser (smfr) 2018-05-18 14:21:35 PDT
I came across symbolTablePutTouchWatchpointSet() in JSDOMWindowBase::updateDocument() and I had no idea what it meant. Is "TouchWatchPointSet" a set of touch watchpoints? Is it really "symbolTablePut and touch WatchpointSet"?
Comment 1 Yusuke Suzuki 2018-05-30 08:38:42 PDT
What this function actually does is, [[Put]] operation onto the symbol table, at that time, touching a WatchpointSet (this is a class in JSC) for the entry in the symbol table. We have symbolTablePutInvalidateWatchpointSet too.

Why it is not defined as a member function of JSSymbolTableObject is because JSSymbolTableObject just holds the symbol table and it does not know the slot holding a value. These slots are offered separately. These derived class have `variableAt()` function, so the function's SymbolTableObjectType needs to be a template typename.

How about symbolTablePutWithTouchingWatchpointSet?
Comment 2 Simon Fraser (smfr) 2018-05-31 11:10:34 PDT
How about symbolTablePutTouchingWatchpointSet() or symbolTablePutAndTouchWatchpointSet()