-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deploy more smart pointers in ScriptExecutionContext.cpp and RejectedPromiseTracker.cpp #20331
Conversation
EWS run on previous version of this PR (hash 93621a7)
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
@@ -724,7 +729,7 @@ CrossOriginMode ScriptExecutionContext::crossOriginMode() | |||
bool ScriptExecutionContext::postTaskTo(ScriptExecutionContextIdentifier identifier, Task&& task) | |||
{ | |||
Locker locker { allScriptExecutionContextsMapLock }; | |||
auto* context = allScriptExecutionContextsMap().get(identifier); | |||
RefPtr context = allScriptExecutionContextsMap().get(identifier); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apparently we can't do this.
@@ -736,7 +741,7 @@ bool ScriptExecutionContext::postTaskTo(ScriptExecutionContextIdentifier identif | |||
bool ScriptExecutionContext::postTaskForModeToWorkerOrWorklet(ScriptExecutionContextIdentifier identifier, Task&& task, const String& mode) | |||
{ | |||
Locker locker { allScriptExecutionContextsMapLock }; | |||
auto* context = dynamicDowncast<WorkerOrWorkletGlobalScope>(allScriptExecutionContextsMap().get(identifier)); | |||
RefPtr context = dynamicDowncast<WorkerOrWorkletGlobalScope>(allScriptExecutionContextsMap().get(identifier)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this
@@ -747,7 +752,7 @@ bool ScriptExecutionContext::postTaskForModeToWorkerOrWorklet(ScriptExecutionCon | |||
|
|||
bool ScriptExecutionContext::ensureOnContextThread(ScriptExecutionContextIdentifier identifier, Task&& task) | |||
{ | |||
ScriptExecutionContext* context = nullptr; | |||
RefPtr<ScriptExecutionContext> context; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or this
EWS run on current version of this PR (hash 16b47c6) |
…PromiseTracker.cpp https://bugs.webkit.org/show_bug.cgi?id=264621 Reviewed by Chris Dumez. Deploy smart pointers as warned by the clang static analyzer. * Source/WebCore/dom/RejectedPromiseTracker.cpp: (WebCore::RejectedPromiseTracker::reportUnhandledRejections): (WebCore::RejectedPromiseTracker::reportRejectionHandled): * Source/WebCore/dom/ScriptExecutionContext.cpp: (WebCore::ScriptExecutionContext::reportUnhandledPromiseRejection): (WebCore::ScriptExecutionContext::dispatchErrorEvent): (WebCore::ScriptExecutionContext::protectedVM): Added. (WebCore::ScriptExecutionContext::ensureRejectedPromiseTrackerSlow): * Source/WebCore/dom/ScriptExecutionContext.h: * Source/WebCore/dom/ShadowRoot.cpp: (WebCore::ShadowRoot::~ShadowRoot): Canonical link: https://commits.webkit.org/270615@main
16b47c6
to
f739f84
Compare
Committed 270615@main (f739f84): https://commits.webkit.org/270615@main Reviewed commits have been landed. Closing PR #20331 and removing active labels. |
f739f84
16b47c6