Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Update zone.js #534

Closed
wants to merge 1 commit into from
Closed

Update zone.js #534

wants to merge 1 commit into from

Conversation

rajendersvit
Copy link

//to handle async if it is being used with any other library or windows.XMLHttpRequest.prototype with other library's. This will solve the issue related to Error: More tasks executed then were scheduled. in few cases we are getting undefined..
if(args[2]===undefined)
args[2]=true;

 //to handle async if it is being used with any other library or windows.XMLHttpRequest.prototype with other library's. This will solve the issue related to Error: More tasks executed then were scheduled. in few cases we are getting undefined..
        if(args[2]===undefined)
            args[2]=true;
@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed, please reply here (e.g. I signed it!) and we'll verify. Thanks.


  • If you've already signed a CLA, it's possible we don't have your GitHub username or you're using a different email address. Check your existing CLA data and verify that your email is set on your git commits.
  • If you signed the CLA as a corporation, please let us know the company's name.

1 similar comment
@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed, please reply here (e.g. I signed it!) and we'll verify. Thanks.


  • If you've already signed a CLA, it's possible we don't have your GitHub username or you're using a different email address. Check your existing CLA data and verify that your email is set on your git commits.
  • If you signed the CLA as a corporation, please let us know the company's name.

@rajendersvit
Copy link
Author

rajendersvit commented Dec 9, 2016 via email

@googlebot
Copy link

CLAs look good, thanks!

1 similar comment
@googlebot
Copy link

CLAs look good, thanks!

@googlebot googlebot added cla: yes and removed cla: no labels Dec 9, 2016
@@ -1570,6 +1570,9 @@ function patchXHR(window) {
return abortNative.apply(data.target, data.args);
}
var openNative = patchMethod(window.XMLHttpRequest.prototype, 'open', function () { return function (self, args) {
//to handle async if it is being used with any other library or windows.XMLHttpRequest.prototype with other library's
if(args[2]===undefined)
Copy link
Collaborator

Choose a reason for hiding this comment

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

could you provide a sample code or repo to describe the error scenario ?
If the args[2] is undefined, the original code

         self[XHR_SYNC] = args[2] == false;

will return false, that means this request will be an async call, I think the original code is correct behavior, your code is not correct to me. because open(url, options, async[options]), by default the async will be true.

about the "More task than scheduled " error, maybe you can check my PR #529 to check whether it fix your issue or not.

And BTW you can't update dist/zone.js directly, you should update lib/browser/browser.ts in this case.

@mhevery
Copy link
Contributor

mhevery commented Dec 18, 2016

I am sorry, but I can't accept any code without tests demonstrating the issue.

It looks like there has been no work on this PR for 9 days, will close. Please open new PR when tests are added.

@mhevery mhevery closed this Dec 18, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants