Commit 44ac3530 authored by Adam Barth's avatar Adam Barth

Don't GC message pipes that have an in-flight request

In mojom, there's a notion of a request/response pair. This CL teaches the JS
bindings not to GC a message pipe after a request has been issued but before
the response has been received.

R=hansmuller@chromium.org

Review URL: https://codereview.chromium.org/696373003
parent 1befcbfe
...@@ -28,7 +28,7 @@ SkyElement({ ...@@ -28,7 +28,7 @@ SkyElement({
directories: [], directories: [],
attached: function() { attached: function() {
this.url = this.ownerDocument.URL; this.url = this.ownerDocument.URL;
var xhr = this.xhr_ = new XMLHttpRequest(); var xhr = new XMLHttpRequest();
xhr.open('GET', this.url + '?format=json'); xhr.open('GET', this.url + '?format=json');
xhr.onload = (function() { xhr.onload = (function() {
var listing = JSON.parse(xhr.responseText); var listing = JSON.parse(xhr.responseText);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment