Closed Bug 763238 Opened 12 years ago Closed 12 years ago

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

Categories

(Core :: IPC, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla16
blocking-kilimanjaro ?
blocking-basecamp -

People

(Reporter: cjones, Assigned: cjones)

References

Details

Attachments

(2 files)

We might be bridging/opening protocols in other C++ namespaces, so fq names need to be generated.
Assignee: nobody → jones.chris.g
Attachment #631701 - Flags: review?(bent.mozilla)
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 ;).
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.

Attachment

General

Created:
Updated:
Size: