| Summary: | ActiveDOMObject::hasPendingActivity() should stop preventing wrapper collection after ActiveDOMObject::stop() has been called | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Chris Dumez <cdumez> | ||||||||||||||
| Component: | Bindings | Assignee: | Chris Dumez <cdumez> | ||||||||||||||
| Status: | RESOLVED FIXED | ||||||||||||||||
| Severity: | Normal | CC: | alecflett, ap, beidson, cdumez, eric.carlson, esprehn+autocc, ews-watchlist, ggaren, glenn, gyuyoung.kim, hta, jer.noble, jsbell, kangil.han, macpherson, menard, philipj, rniwa, sergio, tommyw, webkit-bug-importer, ysuzuki | ||||||||||||||
| Priority: | P2 | Keywords: | InRadar | ||||||||||||||
| Version: | WebKit Nightly Build | ||||||||||||||||
| Hardware: | Unspecified | ||||||||||||||||
| OS: | Unspecified | ||||||||||||||||
| See Also: | https://bugs.webkit.org/show_bug.cgi?id=209754 | ||||||||||||||||
| Attachments: |
|
||||||||||||||||
|
Description
Chris Dumez
2020-04-01 16:13:56 PDT
Created attachment 395219 [details]
Patch
Created attachment 395223 [details]
Patch
Is it possible for a script to run in another frame, and to reference something in the stopped one? Created attachment 395268 [details]
Patch
(In reply to Alexey Proskuryakov from comment #3) > Is it possible for a script to run in another frame, and to reference > something in the stopped one? AFAIK, an ActiveDOMObject should really not run script after stop() has been called. I think that if events were still fired after stop() has been called, it would be a bug. Created attachment 395280 [details]
Patch
Created attachment 395283 [details]
Patch
Comment on attachment 395283 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=395283&action=review > Source/WebCore/bindings/scripts/CodeGeneratorJS.pm:4777 > - push(@implContent, " if (js${interfaceName}->wrapped().hasPendingActivity()) {\n"); > + push(@implContent, " if (!js${interfaceName}->wrapped().isContextStopped() && js${interfaceName}->wrapped().hasPendingActivity()) {\n"); Can we add a helper function like hasPendingActivityAndNotStopped so that we don't do de-referencing twice here? (In reply to Ryosuke Niwa from comment #8) > Comment on attachment 395283 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=395283&action=review > > > Source/WebCore/bindings/scripts/CodeGeneratorJS.pm:4777 > > - push(@implContent, " if (js${interfaceName}->wrapped().hasPendingActivity()) {\n"); > > + push(@implContent, " if (!js${interfaceName}->wrapped().isContextStopped() && js${interfaceName}->wrapped().hasPendingActivity()) {\n"); > > Can we add a helper function like hasPendingActivityAndNotStopped so that we > don't do de-referencing twice here? I can also add a stack variable in before the if check for js${interfaceName}->wrapped(). I figured it did not matter much because it is generated code. Created attachment 395299 [details]
Patch
Comment on attachment 395299 [details] Patch Clearing flags on attachment: 395299 Committed r259419: <https://trac.webkit.org/changeset/259419> All reviewed patches have been landed. Closing bug. (In reply to Chris Dumez from comment #9) > (In reply to Ryosuke Niwa from comment #8) > > Comment on attachment 395283 [details] > > Patch > > > > View in context: > > https://bugs.webkit.org/attachment.cgi?id=395283&action=review > > > > > Source/WebCore/bindings/scripts/CodeGeneratorJS.pm:4777 > > > - push(@implContent, " if (js${interfaceName}->wrapped().hasPendingActivity()) {\n"); > > > + push(@implContent, " if (!js${interfaceName}->wrapped().isContextStopped() && js${interfaceName}->wrapped().hasPendingActivity()) {\n"); > > > > Can we add a helper function like hasPendingActivityAndNotStopped so that we > > don't do de-referencing twice here? > > I can also add a stack variable in before the if check for > js${interfaceName}->wrapped(). I figured it did not matter much because it > is generated code. Generated code or not, it would incur runtime cost. |