Closed
Bug 1274093
Opened 8 years ago
Closed 6 years ago
Basic jsworkers gecko app
Categories
(Connected Devices Graveyard :: Project Link, defect)
Tracking
(Not tracked)
RESOLVED
INCOMPLETE
People
(Reporter: fabrice, Assigned: fabrice)
Details
Attachments
(1 file, 6 obsolete files)
2.58 MB,
patch
|
Details | Diff | Splinter Review |
No description provided.
Assignee | ||
Comment 1•8 years ago
|
||
Attachment #8754132 -
Attachment is obsolete: true
Assignee | ||
Comment 2•8 years ago
|
||
http://bitsparrow.io/ may provide an easy way to serialize and deserialize messages between Rust and JS.
Assignee | ||
Comment 3•8 years ago
|
||
Now with very basic ws setup...
Attachment #8754184 -
Attachment is obsolete: true
Assignee | ||
Comment 4•8 years ago
|
||
Attachment #8754225 -
Attachment is obsolete: true
Assignee | ||
Comment 5•8 years ago
|
||
Assignee: nobody → fabrice
Attachment #8761884 -
Attachment is obsolete: true
Assignee | ||
Comment 6•8 years ago
|
||
Rebased to build on current m-c
Attachment #8763038 -
Attachment is obsolete: true
Assignee | ||
Comment 7•8 years ago
|
||
Baku, in this patch there are changes to worker code in: diff --git a/dom/webidl/Worker.webidl b/dom/webidl/Worker.webidl diff --git a/dom/workers/ScriptLoader.cpp b/dom/workers/ScriptLoader.cpp diff --git a/dom/workers/WorkerPrivate.cpp b/dom/workers/WorkerPrivate.cpp diff --git a/dom/workers/WorkerPrivate.h b/dom/workers/WorkerPrivate.h The goal is to add an optional argument to the ChromeWorker() constructor to specify in which user context we want to run the worker. I'm setting the principal on the WorkerLoadInfo by building a codebasePrincipal but that doesn't seem to work. Any idea what I should do?
Assignee | ||
Updated•8 years ago
|
Flags: needinfo?(amarchesini)
Assignee | ||
Updated•8 years ago
|
Summary: Basic gecko app → Basic jsworkers gecko app
Comment 8•8 years ago
|
||
Comment on attachment 8766858 [details] [diff] [review] jsworkers.patch Review of attachment 8766858 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/workers/WorkerPrivate.cpp @@ +4115,5 @@ > + if (NS_WARN_IF(NS_FAILED(rv))) { > + return nullptr; > + } > + > + GetLoadInfo(aGlobal.Context(), nullptr, parent, aScriptURL, 2 things here: 1. GetLoadInfo starts the loading of the script and it creates the principal. So, mPrincipal+attrs should be set into GetLoadInfo. 2. This should return a security error, right? because of https://dxr.mozilla.org/mozilla-central/source/dom/workers/WorkerPrivate.cpp#4291
Updated•8 years ago
|
Flags: needinfo?(amarchesini)
Assignee | ||
Comment 9•8 years ago
|
||
Right, I made changes to set the principal in GetLoadInfo, and that part works. But we fail later when we check that the loadContext and the loadInfo match, which makes sense since my loading context is a chrome page. Instead of keep doing terrible hacks I feel I need to have a clean way to create a context to load some local content (a resource:// or chrome:// url) and make it look like it was loaded from a different, remote URL, including https support. This phony page will itself load the worker, and that needs to be same-origin to work. We also need to set the right userContext on this load context. Baku, any idea if that's doable and where I should start?
Flags: needinfo?(amarchesini)
Comment hidden (spam) |
Assignee | ||
Comment 11•8 years ago
|
||
Attachment #8766858 -
Attachment is obsolete: true
Assignee | ||
Updated•8 years ago
|
Flags: needinfo?(amarchesini)
Comment 13•6 years ago
|
||
Resolving per https://bugzilla.mozilla.org/show_bug.cgi?id=1361198
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → INCOMPLETE
Assignee | ||
Updated•5 years ago
|
Flags: needinfo?(fabrice)
You need to log in
before you can comment on or make changes to this bug.
Description
•