Summary: | Make JSEventListener more robust in the event of the compiled handler being released. | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Oliver Hunt <oliver> | ||||
Component: | New Bugs | Assignee: | Oliver Hunt <oliver> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | ||||||
Priority: | P2 | ||||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Attachments: |
|
Description
Oliver Hunt
2013-01-30 14:57:52 PST
Created attachment 185591 [details]
Patch
Committed r141348: <http://trac.webkit.org/changeset/141348> Comment on attachment 185591 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=185591&action=review > Source/WebCore/bindings/js/JSLazyEventListener.cpp:-125 > - // Since we only parse once, there's no need to keep data used for parsing around anymore. > - m_functionName = String(); > - m_code = String(); > - m_eventParameterName = String(); > - m_sourceURL = String(); Why do we need this, given the early return? (In reply to comment #3) > (From update of attachment 185591 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=185591&action=review > > > Source/WebCore/bindings/js/JSLazyEventListener.cpp:-125 > > - // Since we only parse once, there's no need to keep data used for parsing around anymore. > > - m_functionName = String(); > > - m_code = String(); > > - m_eventParameterName = String(); > > - m_sourceURL = String(); > > Why do we need this, given the early return? So that we maintain correct behaviour - the only reason we hit this is if we want to execute the function so not running the function would result in incorrect behaviour. |