Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Load without errors in IE 9 #110

Merged
merged 14 commits into from Jun 26, 2015
Merged

Conversation

spiralman
Copy link
Contributor

This ports our fixes back into the Shaka source.

@ustudio/dev Can somebody review this, before I open a PR back to the upstream source?

@@ -43,8 +43,23 @@ shaka.asserts.notImplemented = function() {};
shaka.asserts.unreachable = function() {};


shaka.asserts.patchAssert_ = function() {
var assert = console['assert'];
Copy link
Member

Choose a reason for hiding this comment

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

I think this doesn't need to be quoted. Dot notation should work fine, since closure will not rename browser-built-ins and thingThatExists.nonExistentMember will be undefined, but not cause an exception. Please correct me if I missed something.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You're right. For some reason, I thought IE had tripped up when I didn't quote it, but I can't reproduce that behavior, so there must have been something else wrong.

Copy link
Member

Choose a reason for hiding this comment

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

Ping! Please fix, should not need to be quoted.

@joeyparrish
Copy link
Member

Also, please read CONTRIBUTING and follow the instructions there. You'll need to sign a license agreement and add yourself to AUTHORS & CONTRIBUTORS. Thanks!

@spiralman
Copy link
Contributor Author

@joeyparrish Thanks for the feedback. WRT CONTRIBUTORS/AUTHORS, since I'm doing this for uStudio I need to wait for somebody else to agree to the Corporate CLA, so I left it out of the PR for now.

I actually intended to open this against our fork, so one of our other devs could review it, so you didn't have to deal with the fiddly stuff, but I guess GitHub doesn't allow that.

@joeyparrish
Copy link
Member

Sounds good on the CLA. Just ping me when you're ready for me to take another look, and thanks for your contribution!

@spiralman
Copy link
Contributor Author

@joeyparrish Your comments should be addressed, other than the contributor stuff. I'll update those files and ping you again when we get that sorted out on our end.

Thanks again!

@spiralman
Copy link
Contributor Author

@joeyparrish We finally got the CLA taken care of, so I've pushed the new AUTHORS and CONTRIBUTORS file, so it should be GTG.

// readyState, before document.body has been initialized, so wait
// for window.load
if (document.readyState == "loading" ||
document.readyState == "interactive") {
Copy link
Member

Choose a reason for hiding this comment

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

Please use single quotes on these ready states. I was breaking our own style rules in the original. :-)

@joeyparrish
Copy link
Member

If you can fix the quoted console['assert'] and change support.js's double quotes to single quotes, everything else looks good to me. Thanks!

@joeyparrish joeyparrish self-assigned this Jun 25, 2015
@joeyparrish joeyparrish added the type: enhancement New feature or request label Jun 25, 2015
@joeyparrish joeyparrish added this to the v1.4.0 milestone Jun 25, 2015
@joeyparrish
Copy link
Member

I spoke too soon. You'll also need to fix the errors reported by the compiler & linter. Just run ./build/all.sh to see them:

./build/all.sh
0 error(s), 0 warning(s), 98.1% typed
----- FILE : /var/lib/jenkins/jobs/Shaka Player GitHub PR Build/workspace/lib/debug/asserts.js -----
Line 46, E:0220: No docs found for member 'shaka.asserts.patchAssert_'
Line 55, E:0011: Missing semicolon after function assigned to a variable
----- FILE : /var/lib/jenkins/jobs/Shaka Player GitHub PR Build/workspace/lib/debug/log.js -----
Line 72, E:0220: No docs found for member 'shaka.log.patchConsole_'
Line 82, E:0011: Missing semicolon after function assigned to a variable
Found 4 errors, including 0 new errors, in 2 files (107 files OK).

@spiralman
Copy link
Contributor Author

@joeyparrish Sorry about all the back and forth, but hopefully I have it all fixed now.

@@ -43,8 +43,25 @@ shaka.asserts.notImplemented = function() {};
shaka.asserts.unreachable = function() {};


/** @private @type {function()} */
Copy link
Member

Choose a reason for hiding this comment

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

You can drop the "type" annotation here.

@joeyparrish
Copy link
Member

Looks great, just one small tweak.

@spiralman
Copy link
Contributor Author

Ok, @joeyparrish I think I have it.

@joeyparrish
Copy link
Member

I'm so sorry. I know closure is new for lots of people. I meant that only @Private is needed for a private function with no arguments and no return value. We don't generally use @type for functions unless it's a callback.

@spiralman
Copy link
Contributor Author

@joeyparrish No problem; back to you.

@joeyparrish
Copy link
Member

Looks good to me. I'm going to see if the CI system I'm experimenting with will pick this up and test it: ok to test

If not, I'll give it a manual test run and merge later today. Thanks for your hard work on this!

@spiralman
Copy link
Contributor Author

No problem; thanks for sticking with all the back and forth!

@joeyparrish
Copy link
Member

CI isn't working yet, but I ran the tests manually and everything's passing. Thanks for the contribution!

joeyparrish added a commit that referenced this pull request Jun 26, 2015
Load without errors in IE 9
@joeyparrish joeyparrish merged commit ccb3ed5 into shaka-project:master Jun 26, 2015
joeyparrish added a commit that referenced this pull request Jul 6, 2015
Load without errors in IE 9
@github-actions github-actions bot added the status: archived Archived and locked; will not be updated label Jul 25, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: archived Archived and locked; will not be updated type: enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants