Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Patch strip custom ns attrs issue 14928 #15030

Conversation

BobChao87
Copy link
Contributor

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)

Bug fix.

What is the current behavior? (You can also link to an open issue here)

Issue #14928.
Summary: IE has a stack overflow on large datasets being parsed through $sanitize.

What is the new behavior (if this is a feature change)?

Changes the loop to leave fewer remnant function calls by performing an in-function while loop over the sibling elements being processed. Ensuring only one function on the stack for each level of depth.

Does this PR introduce a breaking change?

No. Unless someone is somehow using a fatal JS execution to detect IE. I'm sure there are better ways.

Please check if the PR fulfills these requirements

Other information:

Addresses issue by reducing the stack size, but not by the maximal possible amount. It was decided that instead of doing a fully in-function walk of the tree, it was sufficient to deal with the horizontal issue as most use cases don't have an extremely deep (ca. thousands) DOM structure.

@googlebot
Copy link

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for the commit author(s). If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.

1 similar comment
@googlebot
Copy link

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for the commit author(s). If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.

result += element;
}
expectHTML('a' + result + 'c').toEqual('a' + result + 'c');
});
Copy link
Member

Choose a reason for hiding this comment

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

So, is this testcase failing in IE without the fix? What version of IE?

@BobChao87
Copy link
Contributor Author

That's correct. I was concerned about making sure the test was valid, so I tested the test. This test failed on IE 11 on Win10 Anniversary 64 bit with the expected "Out of stack space" error. This test did not fail on Chrome or FireFox. The updated version passes on all three. I did not test against IE 10 or IE 9 nor on any other OSes for IE.

As for my CLA, this has happened to me before. I am the only commit author, my CLA has been manually verified before #14221 Comment

@gkalpak
Copy link
Member

gkalpak commented Aug 18, 2016

LGTM

We need to sort out the CLA issue, though. In the other PR, BobChao87 was displayed by GitHub as the author of the commits. In this one, it is Bob Chao, so we might need to re-verify the CLA.
/cc @IgorMinar, @petebacondarwin

@Narretz
Copy link
Contributor

Narretz commented Aug 18, 2016

@BobChao87 can you make sure that the email of the commit author matches an email you have set in Github?

@BobChao87
Copy link
Contributor Author

I've looked around, and I'm really not sure how this came to be. The computer I had previously committed on broke recently and this was committed from a virtual machine on my new computer. It looks like Fedora was "helpful" and used my name registered with the OS as the commit name, despite using the BobChao87 GitHub account to log in. As there was no email associated with the commits beyond the email associated with the GitHub login, I'm not sure how I can possibly verify the email. I have (hopefully) fixed the issue going forward and will test with a less crucial repository. I am, however, not sure how to proceed from here. I definitely personally edited and tested the code myself, but am unsure to provide sufficient evidence.

@Narretz
Copy link
Contributor

Narretz commented Aug 21, 2016 via email

@Narretz
Copy link
Contributor

Narretz commented Aug 26, 2016

@BobChao87 Can you fix the commit or open a new PR with these changes (but a commit author that matches the Github email)?

@BobChao87
Copy link
Contributor Author

Yes, sorry, I've been busy. Hopefully by end of day tomorrow I'll have that for you.

@BobChao87
Copy link
Contributor Author

Hopefully that will be sufficient. If that doesn't work, I'll make a new branch and submit a new pull.

@Narretz
Copy link
Contributor

Narretz commented Aug 29, 2016

@BobChao87 You need to replace the previous commits after you have changed the author / reauthored them. So remove the first 3 commits from your branch and then push --force the branch again.

@BobChao87 BobChao87 closed this Sep 4, 2016
@BobChao87 BobChao87 force-pushed the patch-stripCustomNsAttrs-issue-14928 branch from c87d5c7 to a272a3c Compare September 4, 2016 01:53
Update Internet Explorer-only helper function stripCustomNsAttrs to be less
recursive. Reduce stack height of function causing out of stack space error.

Closes angular#14928
@BobChao87
Copy link
Contributor Author

Removed old commits and re-added as proper Github account.

@BobChao87 BobChao87 reopened this Sep 4, 2016
@googlebot
Copy link

CLAs look good, thanks!

@googlebot
Copy link

CLAs look good, thanks!

2 similar comments
@googlebot
Copy link

CLAs look good, thanks!

@googlebot
Copy link

CLAs look good, thanks!

@googlebot googlebot added cla: yes and removed cla: no labels Sep 4, 2016
@BobChao87
Copy link
Contributor Author

Looking at the Travis build that failed, it seems like iOS had some unrelated issues involving sockets and $$animateCssDriver. Can we get a rebuild?

@petebacondarwin
Copy link
Contributor

rebuilding

@Narretz Narretz closed this in 45129cf Sep 5, 2016
Narretz pushed a commit that referenced this pull request Sep 8, 2016
Update Internet Explorer-only helper function stripCustomNsAttrs to be less
recursive. Reduce stack height of function causing out of stack space error.

Closes #14928
Closes #15030
petebacondarwin pushed a commit to petebacondarwin/angular.js that referenced this pull request Nov 21, 2016
Update Internet Explorer-only helper function stripCustomNsAttrs to be less
recursive. Reduce stack height of function causing out of stack space error.

Closes angular#14928
Closes angular#15030
petebacondarwin pushed a commit to petebacondarwin/angular.js that referenced this pull request Nov 21, 2016
Update Internet Explorer-only helper function stripCustomNsAttrs to be less
recursive. Reduce stack height of function causing out of stack space error.

Closes angular#14928
Closes angular#15030
petebacondarwin pushed a commit to petebacondarwin/angular.js that referenced this pull request Nov 21, 2016
Update Internet Explorer-only helper function stripCustomNsAttrs to be less
recursive. Reduce stack height of function causing out of stack space error.

Closes angular#14928
Closes angular#15030
petebacondarwin pushed a commit to petebacondarwin/angular.js that referenced this pull request Nov 21, 2016
Update Internet Explorer-only helper function stripCustomNsAttrs to be less
recursive. Reduce stack height of function causing out of stack space error.

Closes angular#14928
Closes angular#15030
petebacondarwin pushed a commit to petebacondarwin/angular.js that referenced this pull request Nov 21, 2016
Update Internet Explorer-only helper function stripCustomNsAttrs to be less
recursive. Reduce stack height of function causing out of stack space error.

Closes angular#14928
Closes angular#15030
petebacondarwin pushed a commit that referenced this pull request Nov 23, 2016
Update Internet Explorer-only helper function stripCustomNsAttrs to be less
recursive. Reduce stack height of function causing out of stack space error.

Closes #14928
Closes #15030
petebacondarwin pushed a commit that referenced this pull request Nov 24, 2016
Update Internet Explorer-only helper function stripCustomNsAttrs to be less
recursive. Reduce stack height of function causing out of stack space error.

Closes #14928
Closes #15030
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants