WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED WONTFIX
119129
Manage the lifetime of DOMTimers with OwnPtr
https://bugs.webkit.org/show_bug.cgi?id=119129
Summary
Manage the lifetime of DOMTimers with OwnPtr
Ryosuke Niwa
Reported
2013-07-25 22:19:50 PDT
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
Comment 1
2022-08-19 23:22:32 PDT
>> 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
Comment 2
2022-08-19 23:34:00 PDT
We use RefPtr for this.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug