Skip to content

Conversation

@tilgovi
Copy link
Contributor

@tilgovi tilgovi commented Jul 31, 2015

The frame-rpc module is a proper CommonJS module and it's footprint
is really tiny. Its protocol is simpler. It doesn't handle connection
and buffering, but with our onConnect callback we don't need buffering.
The connection handshake that jschannel did was so trivial it's been
re-implemented here (each side tries to connect to the other once).

We have to handle timeouts ourselves, but that's all hidden in the
bridge code. In exchange, we get a simpler API, we get rid of the
call/notify distinction in favor of just passing a callback or not
and we avoid the excess overhead of the recursion guard in the
serialization code that was giving us false positive issues with
the document title.

This is one step toward removing all the browserify-shim requiring
libraries from the injected bundle, which will eventually fix #2397.

@tilgovi
Copy link
Contributor Author

tilgovi commented Jul 31, 2015

Okay. This is verified manually. The tests all pass. I just re-forced with having removed the 'notify' calls. I did a grep for "method: " to make sure I hadn't missed any calls somehow.

I'm pretty confident this is good to go, unless there are objections.

@judell
Copy link
Contributor

judell commented Jul 31, 2015

Nice!

The frame-rpc module is a proper CommonJS module and it's footprint
is really tiny. Its protocol is simpler. It doesn't handle connection
and buffering, but with our onConnect callback we don't need buffering.
The connection handshake that jschannel did was so trivial it's been
re-implemented here (each side tries to connect to the other once).

We have to handle timeouts ourselves, but that's all hidden in the
bridge code. In exchange, we get a simpler API, we get rid of the
call/notify distinction in favor of just passing a callback or not
and we avoid the excess overhead of the recursion guard in the
serialization code that was giving us false positive issues with
the document title.

This is one step toward removing all the browserify-shim requiring
libraries from the injected bundle, which will eventually fix #2397.
@landscape-bot
Copy link

Code Health
Code quality remained the same when pulling f5b16aa on hypothesis:frame-rpc into 8725c40 on hypothesis:master.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"open"/"back" o_O

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Not suggesting that's an issue with this PR. Just... o_O...)

@nickstenning
Copy link
Contributor

LGTM.

nickstenning added a commit that referenced this pull request Aug 3, 2015
Switch out jschannel for frame-rpc
@nickstenning nickstenning merged commit 5f9f3e4 into master Aug 3, 2015
@nickstenning nickstenning deleted the frame-rpc branch August 3, 2015 12:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

H activation fails at abcnews.go.com

5 participants