All users were logged out of Bugzilla on October 13th, 2018

Prevent using [Pref] on names that are exposed to workers

RESOLVED FIXED in mozilla34

Status

()

RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: Ehsan, Unassigned)

Tracking

unspecified
mozilla34
x86
Mac OS X
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

4 years ago
Boris mentioned that these currently generate code which access the pref service from the worker.  We should explicitly generate a WebIDL compiler error for now before someone starts to need it without realizing the implications.
The problem is the codegen doesn't know what's exposed to workers....
Yeah, this is simply not possible today :(

We do need to move the information about which interfaces are visible in workers into codegen eventually to generate RegisterBindings.cpp.  Perhaps we should do that now.
(Reporter)

Comment 3

4 years ago
(In reply to comment #1)
> The problem is the codegen doesn't know what's exposed to workers....

Hmm, can't it check [ExposedTo] from the AST?
(In reply to :Ehsan Akhgari (lagging on bugmail, needinfo? me!) from comment #3)
> (In reply to comment #1)
> > The problem is the codegen doesn't know what's exposed to workers....
> 
> Hmm, can't it check [ExposedTo] from the AST?

What is [ExposedTo]?
> What is [ExposedTo]?

Ehsan mean [Exposed], from <http://heycam.github.io/webidl/#Exposed>: A pretty new addition to the spec.

But yes, we should implement [Exposed].  We can also use it to do things like skip codegen for some things on workers.

That said, I think the current spec for [Exposed] is wrong in an obvious way.  See https://www.w3.org/Bugs/Public/show_bug.cgi?id=25495
(Reporter)

Comment 6

4 years ago
(In reply to Boris Zbarsky [:bz] from comment #5)
> > What is [ExposedTo]?
> 
> Ehsan mean [Exposed], from <http://heycam.github.io/webidl/#Exposed>: A
> pretty new addition to the spec.
> 
> But yes, we should implement [Exposed].  We can also use it to do things
> like skip codegen for some things on workers.

Ah, yeah, sorry I didn't realize that we haven't implemented that yet.  And I got the name wrong too!!

> That said, I think the current spec for [Exposed] is wrong in an obvious
> way.  See https://www.w3.org/Bugs/Public/show_bug.cgi?id=25495

Can we somehow help improve the situation there?  I think supporting [Exposed] would be beneficial to the readability of our WebIDL files as well.
I filed bug 1017988 on implementing [Exposed].

> Can we somehow help improve the situation there? 

https://github.com/heycam/webidl/pull/12
(Reporter)

Comment 8

4 years ago
(In reply to comment #7)
> I filed bug 1017988 on implementing [Exposed].
> 
> > Can we somehow help improve the situation there? 
> 
> https://github.com/heycam/webidl/pull/12

Thanks!
(Reporter)

Comment 9

4 years ago
Is this possible to fix now?
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla34
You need to log in before you can comment on or make changes to this bug.