Closed
Bug 657550
Opened 14 years ago
Closed 14 years ago
jslinux broken in Nightly
Categories
(Tech Evangelism Graveyard :: English Other, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: jrmuizel, Unassigned)
References
Details
http://bellard.org/jslinux/ works in Aurora but not in the nightly from 2011-05-16.
It gives a "invalid arguments" error in the console.
Comment 1•14 years ago
|
||
works: 2011-05-11 TM - http://hg.mozilla.org/tracemonkey/rev/b83c8374358a
fails: 2011-05-12 TM - http://hg.mozilla.org/tracemonkey/rev/5b479a987cda
Regression range:
http://hg.mozilla.org/tracemonkey/pushloghtml?fromchange=b83c8374358a&tochange=5b479a987cda
Comment 2•14 years ago
|
||
Bug 649133 removed mozResponseArrayBuffer. jslinux uses response/responseType like this:
--
Le = new XMLHttpRequest();
Le.open('GET', Ke, false);
if (Le.hasOwnProperty('responseType')) {
Le.responseType = 'arraybuffer';
} else {
Le.overrideMimeType('text/plain; charset=x-user-defined');
}
Le.send(null);
if (Le.status != 200 && Le.status != 0) {
throw "Error while loading " + Ke;
}
if (Le.mozResponseArrayBuffer) {
Me = Le.mozResponseArrayBuffer;
} else if (Le.hasOwnProperty('responseType')) {
Me = Le.response;
} else {
Me = Le.responseText;
}
fd = Me.byteLength;
Ne = new Uint8Array(Me, 0, fd);
for (i = 0; i < fd; i++) {
this.st8_phys(ha + i, Ne[i]);
}
return fd;
--
Blocks: 649133
Comment 3•14 years ago
|
||
javascript:alert(new XMLHttpRequest().hasOwnProperty("responseType"));
This alerts |true| in Chrome, |false| in Firefox 6.
Comment 4•14 years ago
|
||
> new XMLHttpRequest().hasOwnProperty("responseType")
This test doesn't look correct to me. It should be
> XMLHttpRequest.prototype.hasOwnProperty("responseType")
per WebIDL <http://dev.w3.org/2006/webapi/WebIDL/>.
Unfortunately the latter test doesn't work on WebKit because WebKit doesn't comply the WebIDL spec...
Comment 5•14 years ago
|
||
There are actually a number of sites now broken that were testing for mozResponseArrayBuffer.... I hope unprefixing response/responseType will fix most of them, but for jslinux we should just get the author to fix the code per comment 4.
Comment 6•14 years ago
|
||
But maybe we should keep mozResponseArrayBuffer for now...
Reporter | ||
Comment 7•14 years ago
|
||
(In reply to comment #5)
> for jslinux we should just get the author to fix the
> code per comment 4.
I've emailed Fabrice about this.
i guess I would be fine with bringing mozResponseArrayBuffer back for a release if we also put a warning in the error console when it's used.
However I wonder how much trouble this will be in practice since it's a very new property and it sites which are using it should still be maintained. And there's always the risk that keeping it longer will just mean that more sites come to depend on it.
Comment 9•14 years ago
|
||
Yeah, fair. Let's not worry about it for now, then; we can bring it back in aurora or beta if it becomes an issue.
The page has been changed to use 'in' instead of hasOwnProperty. Now we just need to remove the prefixing on reponseType/response. ;)
Assignee: general → english-other
Status: NEW → RESOLVED
Closed: 14 years ago
Component: JavaScript Engine → English Other
Product: Core → Tech Evangelism
QA Contact: general → english-other
Resolution: --- → FIXED
Reporter | ||
Comment 11•14 years ago
|
||
jslinux now works in the nightly
Comment 12•13 years ago
|
||
"'mozResponseType' in" test is no longer required because responseType/response properties have been unprefixed. No versions of Firefox will be shipped with the prefixed mozResponseType/mozResponse.
Updated•10 years ago
|
Product: Tech Evangelism → Tech Evangelism Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•