mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 01:07:36 +00:00
WebWorker: Reuse main thread VM for DedicatedWorker realms
While creating a new VM feels warm and fuzzy from an isolation perspective, having multiple JS heaps in the same process is a footgun waiting to happen. Additionally, there are still many places in LibWeb that reach for the main thread VM to check for the current realm to do things, such as Web::HTML::incumbent_settings_object().
This commit is contained in:
parent
e30ecacb71
commit
05ec93e276
2 changed files with 3 additions and 9 deletions
|
@ -8,7 +8,6 @@
|
|||
|
||||
#include <AK/RefCounted.h>
|
||||
#include <AK/URL.h>
|
||||
#include <LibJS/Runtime/VM.h>
|
||||
#include <LibWeb/Bindings/MainThreadVM.h>
|
||||
#include <LibWeb/Forward.h>
|
||||
|
||||
|
@ -22,7 +21,6 @@ public:
|
|||
void run();
|
||||
|
||||
private:
|
||||
NonnullRefPtr<JS::VM> m_worker_vm;
|
||||
RefPtr<Web::HTML::WorkerDebugConsoleClient> m_console;
|
||||
Web::Page& m_page;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue