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
This commit is contained in:
parent
1befcbfe67
commit
44ac35308c
@ -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);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user