Closed Bug 1246784 Opened 4 years ago Closed 4 years ago

Expose Console to the WorkerDebuggerGlobalScope

Categories

(DevTools :: Debugger, defect)

defect
Not set

Tracking

(firefox47 fixed)

RESOLVED FIXED
Firefox 47
Tracking Status
firefox47 --- fixed

People

(Reporter: bgrins, Assigned: baku)

References

Details

Attachments

(1 file, 1 obsolete file)

I really want to be able to console.log within actors in the worker thread.

Also, I believe we might need access to this to be able to access console events in Bug 1246091.
Andrea, you mentioned this might not be too hard to do.  I haven't been able to figure it out - can you help?
Flags: needinfo?(amarchesini)
(In reply to Brian Grinstead [:bgrins] from comment #1)
> Andrea, you mentioned this might not be too hard to do.  I haven't been able
> to figure it out - can you help?

Everything depends on if you want to see your console events mixed with the content console events or you want to have a separate console object. I guess you want a separate console object... I'm going to propose a patch soon.
Flags: needinfo?(amarchesini)
Attached patch console4.patch (obsolete) — Splinter Review
Assignee: nobody → amarchesini
Attachment #8717326 - Flags: review?(khuey)
Attached patch console4.patchSplinter Review
With a mochitest.
Attachment #8717326 - Attachment is obsolete: true
Attachment #8717326 - Flags: review?(khuey)
Attachment #8717330 - Flags: review?(khuey)
(In reply to Andrea Marchesini (:baku) from comment #2)
> (In reply to Brian Grinstead [:bgrins] from comment #1)
> > Andrea, you mentioned this might not be too hard to do.  I haven't been able
> > to figure it out - can you help?
> 
> Everything depends on if you want to see your console events mixed with the
> content console events or you want to have a separate console object.

Separate, I think
Comment on attachment 8717330 [details] [diff] [review]
console4.patch

Review of attachment 8717330 [details] [diff] [review]:
-----------------------------------------------------------------

::: dom/webidl/Console.webidl
@@ +4,5 @@
>   * License, v. 2.0. If a copy of the MPL was not distributed with this
>   * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
>  
>  [ChromeOnly,
> + Exposed=(Window,Worker, WorkerDebugger)]

either put a space between Window and Worker, or remove it between Worker and WorkerDebugger.  Whatever other IDLs do, ideally.
Attachment #8717330 - Flags: review?(khuey) → review+
https://hg.mozilla.org/mozilla-central/rev/e42032ce8d5a
https://hg.mozilla.org/mozilla-central/rev/d8b60725f683
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 47
Blocks: 1249709
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.