Closed Bug 1343747 Opened 8 years ago Closed 7 years ago

Label runnables in WebSocket

Categories

(Core :: Networking: WebSockets, defect, P2)

defect

Tracking

()

RESOLVED FIXED
mozilla56
Tracking Status
firefox54 --- wontfix
firefox55 --- wontfix
firefox56 --- fixed

People

(Reporter: kershaw, Assigned: kershaw)

References

Details

(Whiteboard: [necko-active][QDL][TDC-MVP][NECKO])

Attachments

(2 files, 4 obsolete files)

This should include files below. 
 - netwerk/protocol/websocket/WebSocketEventService.cpp
 - netwerk/protocol/websocket/WebSocketChannelChild.cpp
Whiteboard: [necko-next] → [necko-next][QDL][TDC-MVP][NECKO]
Priority: -- → P2
Assignee: nobody → kechang
Status: NEW → ASSIGNED
Summary:
 - Make WebSocketChannelChild inherit from NeckoTargetHolder
 - Get a labeled event target from nsContentUtils::GetEventTargetByLoadInfo and use it to dispatch runnables.

Thanks.
Attachment #8876645 - Flags: review?(honzab.moz)
Summary:
 - Make WebSocketEventListenerChild inherit NeckoTargetHolder
 - Initialize mNeckoTarget in WebSocketEventListenerChild's constructor
 - Use window id to get a labeled event target
 - Use labeled event target to dispatch runnables in WebSocketEventService.
Attachment #8876648 - Flags: review?(honzab.moz)
Comment on attachment 8876645 [details] [diff] [review]
Part1: Label runnables in WebSocketChannelChild

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

::: netwerk/protocol/websocket/WebSocketChannelChild.cpp
@@ +505,5 @@
>    }
>  }
>  
> +void
> +WebSocketChannelChild::EnsureNeckoTarget()

according the implementation I'm not sure of the name.  usually "EnsureSomething" methods make sure that the object in demand exists after they exit.  This one more just assigns the target when it happens to exists on load info.  Maybe call it AssignNeckoTarget() or SetupNeckoTarget() ?

@@ +573,5 @@
>  
>      transportProvider = ipcChild;
>    }
>  
> +  // This must have happened before sending constructor message.

// This must be called before... ?

::: netwerk/protocol/websocket/WebSocketChannelChild.h
@@ +71,5 @@
>    bool IsOnTargetThread();
>  
>    void MaybeReleaseIPCObject();
>  
> +  void EnsureNeckoTarget();

add a comment what this is doing!
Attachment #8876645 - Flags: review?(honzab.moz) → review+
Attachment #8876648 - Flags: review?(honzab.moz) → review+
Whiteboard: [necko-next][QDL][TDC-MVP][NECKO] → [necko-active][QDL][TDC-MVP][NECKO]
(In reply to Honza Bambas (:mayhemer) from comment #3)
> Comment on attachment 8876645 [details] [diff] [review]
> Part1: Label runnables in WebSocketChannelChild
> 
> Review of attachment 8876645 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> ::: netwerk/protocol/websocket/WebSocketChannelChild.cpp
> @@ +505,5 @@
> >    }
> >  }
> >  
> > +void
> > +WebSocketChannelChild::EnsureNeckoTarget()
> 
> according the implementation I'm not sure of the name.  usually
> "EnsureSomething" methods make sure that the object in demand exists after
> they exit.  This one more just assigns the target when it happens to exists
> on load info.  Maybe call it AssignNeckoTarget() or SetupNeckoTarget() ?
> 

I like "SetupNeckoTarget". Thanks!

> @@ +573,5 @@
> >  
> >      transportProvider = ipcChild;
> >    }
> >  
> > +  // This must have happened before sending constructor message.
> 
> // This must be called before... ?
> 

Got it.

> ::: netwerk/protocol/websocket/WebSocketChannelChild.h
> @@ +71,5 @@
> >    bool IsOnTargetThread();
> >  
> >    void MaybeReleaseIPCObject();
> >  
> > +  void EnsureNeckoTarget();
> 
> add a comment what this is doing!

Will do.

Thanks again for the prompt review.
Rebase and carry r+.
Attachment #8876645 - Attachment is obsolete: true
Attachment #8876648 - Attachment is obsolete: true
Attachment #8876974 - Flags: review+
Carry r+.
Attachment #8876975 - Flags: review+
Keywords: checkin-needed
has problems to apply:

adding 1343747 to series file
renamed 1343747 -> 0001-Bug-1343747-Part1-Label-runnables-in-WebSocketChanne.patch
applying 0001-Bug-1343747-Part1-Label-runnables-in-WebSocketChanne.patch
patching file netwerk/protocol/websocket/WebSocketChannelChild.cpp
Hunk #6 FAILED at 624
Hunk #9 FAILED at 756
2 out of 9 hunks FAILED -- saving rejects to file netwerk/protocol/websocket/WebSocketChannelChild.cpp.rej
patch failed, unable to continue (try -v)
patch failed, rejects left in working directory
errors during apply, please fix and qrefresh 0001-Bug-1343747-Part1-Label-runnables-in-WebSocketChanne.patch
Flags: needinfo?(kechang)
Keywords: checkin-needed
Rebase again.
Attachment #8876974 - Attachment is obsolete: true
Attachment #8876975 - Attachment is obsolete: true
Flags: needinfo?(kechang)
Attachment #8877393 - Flags: review+
Rebase
Attachment #8877394 - Flags: review+
Keywords: checkin-needed
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/7b96aecbac7b
Part 1: Label runnables in WebSocketChannelChild. r=mayhemer
https://hg.mozilla.org/integration/autoland/rev/5f4a90d6dd5f
Part 2: Label runnables in WebSocketEventListenerChild. r=mayhemer
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/7b96aecbac7b
https://hg.mozilla.org/mozilla-central/rev/5f4a90d6dd5f
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
Mark 54 won't fix as 54 was released.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: