Project

General

Profile

Actions

Feature #14775

open
RM

Delete Handler before handleRequest() is called for a WResource that does not take the lock

Feature #14775: Delete Handler before handleRequest() is called for a WResource that does not take the lock

Added by Romain Mardulyn 16 days ago. Updated 13 days ago.

Status:
New
Priority:
Low
Assignee:
-
Target version:
Start date:
08/24/2026
Due date:
% Done:

0%

Estimated time:

Description

It can sometimes be hard to know which function access the WApplication. This is annoying for private WResources that are run without taking the application lock. For instance, a paintedWidget that you want to use to create an image may make a call to WApplication::doJavaScript() without the user knowing it, even if the widget is not added to the DOM tree. Using that WPaintedWidget in a private WResource that does not take the application lock may create issues that are hard to debug.

The idea would be to add an option that allows to delete the thread_local WebSession::Handler when the WResource release the application lock. This would also be more consistent with how the application lock actually works when grabbing it using a WApplication::updateLock.

RM Updated by Romain Mardulyn 16 days ago Actions #1

  • Target version set to 4.15.0

RM Updated by Romain Mardulyn 13 days ago Actions #2

  • Subject changed from Add an option to block WApplication::getInstance() from returning the WApplication if the thread does not hold the session lock. to Delete Handler before handleRequest() is called for a WResource that does not take the lock
  • Description updated (diff)
Actions

Also available in: PDF Atom