Question

This code causes a strange bug in ie8. It comes from MicrosoftAjaxAdoNet.js in link text

   function Sys$Data$_AdoNetBatchWriter$startChangeSet() {
        this._changesetBoundary = "changeset_" + this._createBoundary();
        this._changesetEntries = [];
    }

Before calling this function, this._changesetEntries is always null. I expected his._changesetEntries will become a empty array after this function is called. It happened as expected in chrome, firefox, ie8. It is not always true in ie8, I found that sometimes this function create a method "indexOf(v, n)" instead of empty array.

This strange behavior cause other bug noted in here link text

EDIT:I can isolate this issue from my code now, this issue occur when I use a fish-eye jquery plug-in. In this plug-in, there are something like

[].indexOf || (Array.prototype.indexOf = function (v, n) {
n = (n == null) ? 0 : n;
var m = this.length;
for (var i = n; i < m; i++)
if (this[i] == v) return i;
return -1;

})

This is a cause of this issue.

Was it helpful?

Solution

The 'sometimes' in your question is the key here: under what conditions does this._changesetEntries get a function rather than an empty array? Some page loads? some calls to the dataService? Once you have a testcase, the answe may become more obvious.

OTHER TIPS

Could you post how you're using this? All we can do until then is speculate:

This looks like a constructor. Are you using you instantiating using new Sys$Data$_AdoNetBatchWriter$startChangeSet()?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top