Bug 185785

Summary: "symbolTablePutTouchWatchpointSet" is a terrible name
Product: WebKit Reporter: Simon Fraser (smfr) <simon.fraser>
Component: JavaScriptCoreAssignee: Nobody <webkit-unassigned>
Status: NEW    
Severity: Normal CC: ggaren, saam, simon.fraser, ysuzuki
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

Simon Fraser (smfr)
Reported 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"?
Attachments
Yusuke Suzuki
Comment 1 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?
Simon Fraser (smfr)
Comment 2 2018-05-31 11:10:34 PDT
How about symbolTablePutTouchingWatchpointSet() or symbolTablePutAndTouchWatchpointSet()
Note You need to log in before you can comment on or make changes to this bug.