"Opens" and "Bridge" declarations need to use fully-qualified names

RESOLVED FIXED in mozilla16

Status

()

Core
IPC
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: cjones, Assigned: cjones)

Tracking

Trunk
mozilla16
Points:
---

Firefox Tracking Flags

(blocking-kilimanjaro:?, blocking-basecamp:-)

Details

Attachments

(2 attachments)

We might be bridging/opening protocols in other C++ namespaces, so fq names need to be generated.
Created attachment 631701 [details] [diff] [review]
Use fully-qualified names for Open/Bridge
Assignee: nobody → jones.chris.g
Attachment #631701 - Flags: review?(bent.mozilla)
Created attachment 631702 [details] [diff] [review]
Test for bug 763228
Comment on attachment 631701 [details] [diff] [review]
Use fully-qualified names for Open/Bridge

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

::: ipc/ipdl/ipdl/lower.py
@@ +447,1 @@
>          return Type(t.name())

Hm, you repeat this pattern in lots of places. How about you just have another method that does this:

  def _internalName(self, thing):
    return thing.fullname() if self.fq else thing.name()

Then all the other places would be much simpler, don't you think? Up to you I guess.

@@ +481,5 @@
>      def visitMessageType(self, m): assert 0
>      def visitVoidType(self, v): assert 0
>      def visitStateType(self, st): assert 0
>  
> +def _cxxBareType(ipdltype, side, fq=0):

False? 0 and 1 are kinda 1980's style ;)
Attachment #631701 - Flags: review?(bent.mozilla) → review+
(In reply to ben turner [:bent] from comment #3)
> Comment on attachment 631701 [details] [diff] [review]
> Use fully-qualified names for Open/Bridge
> 
> Review of attachment 631701 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> ::: ipc/ipdl/ipdl/lower.py
> @@ +447,1 @@
> >          return Type(t.name())
> 
> Hm, you repeat this pattern in lots of places. How about you just have
> another method that does this:
> 
>   def _internalName(self, thing):
>     return thing.fullname() if self.fq else thing.name()
> 
> Then all the other places would be much simpler, don't you think? Up to you
> I guess.
> 

Good idea.  Added, with typename() helper.

> @@ +481,5 @@
> >      def visitMessageType(self, m): assert 0
> >      def visitVoidType(self, v): assert 0
> >      def visitStateType(self, st): assert 0
> >  
> > +def _cxxBareType(ipdltype, side, fq=0):
> 
> False? 0 and 1 are kinda 1980's style ;)

Well, that's the prevailing style in this file.  I guess 1980s programmers got much more work done from not having to type as much ;).  I didn't change this because it's the prevailing style.  Feel free to file a followup for changing that, and assign to bent ;).
https://hg.mozilla.org/integration/mozilla-inbound/rev/cdc00d148906
https://hg.mozilla.org/integration/mozilla-inbound/rev/a9479d148ce5
Target Milestone: --- → mozilla16
https://hg.mozilla.org/mozilla-central/rev/37e50965e1b5
https://hg.mozilla.org/mozilla-central/rev/cdc00d148906
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED

Updated

5 years ago
blocking-basecamp: --- → ?
blocking-kilimanjaro: --- → ?
blocking-basecamp: ? → -
Not sure why we're retriaging closed bugs, but this would have blocked (blocks a blocker).
You need to log in before you can comment on or make changes to this bug.