Bug 119129
Summary: | Manage the lifetime of DOMTimers with OwnPtr | ||
---|---|---|---|
Product: | WebKit | Reporter: | Ryosuke Niwa <rniwa> |
Component: | DOM | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED WONTFIX | ||
Severity: | Normal | CC: | ahmad.saleem792, ap, bfulgham, ggaren, kling, koivisto |
Priority: | P2 | Keywords: | BlinkMergeCandidate |
Version: | 528+ (Nightly build) | ||
Hardware: | Unspecified | ||
OS: | Unspecified |
Ryosuke Niwa
Consider merging https://chromium.googlesource.com/chromium/blink/+/b1d4635341dd888387901873696d3329a462b9e3
The lifetime of DOMTimers are currently managed manually with new and delete.
This change wraps the DOMTimers with OwnPtr, and lets ScriptExecutionContext
own them.
This is a refactoring step that will be required to fix bug 230705. This is
a pure refactoring, and thus user-visible behavior should not change.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Ahmad Saleem
>> Not applied changes to ScriptExecutionContext.cpp:
https://github.com/WebKit/WebKit/blob/main/Source/WebCore/dom/ScriptExecutionContext.cpp#L495
https://github.com/WebKit/WebKit/blob/main/Source/WebCore/dom/ScriptExecutionContext.cpp#L520
>> Not applied changes to ScriptExecutionContext.h:
https://github.com/WebKit/WebKit/blob/main/Source/WebCore/dom/ScriptExecutionContext.h#L239
Plus other lifecycleNotifier changes.
>> Not applied changes to DOMTimer.cpp:
https://github.com/WebKit/WebKit/blob/main/Source/WebCore/page/DOMTimer.cpp#L161
https://github.com/WebKit/WebKit/blob/main/Source/WebCore/page/DOMTimer.cpp#L179
and few other changes.
>> Not applied changes to DOMTimer.h:
Missing ScriptExecutionContext class.
Did some changes here - https://github.com/WebKit/WebKit/blob/main/Source/WebCore/page/DOMTimer.h#L54
and missing other changes.
>> DOMWindow.cpp changes:
Not done -https://github.com/WebKit/WebKit/blob/main/Source/WebCore/page/DOMWindow.cpp#L1842
Not done - https://github.com/WebKit/WebKit/blob/main/Source/WebCore/page/DOMWindow.cpp#L1867
>> WorkerGlobalScope.cpp does not exist but WindowOrWorkerGlobalScope do:
Only change from 'id' to 'ID" so since all others are not done, I am assuming this wouldn't as well.
________
rniwa@webkit.org - any plan for this or not, since you mentioned bug in Comment 0 is also now fixed, which required this refactoring. Thanks!
Ryosuke Niwa
We use RefPtr for this.