run v0 and extensions in strict mode#28793
Conversation
|
Hey @rsimha! These files were changed: Hey @danielrozenberg! These files were changed: |
rsimha
left a comment
There was a problem hiding this comment.
LGTM with a couple of comments.
| } | ||
| while (this.unlisteners_.length > 0) { | ||
| this.unlisteners_.pop().call(); | ||
| this.unlisteners_.pop()(); |
There was a problem hiding this comment.
this one looks safe to me since exitHandler is bound via arrow funcs.
| return; | ||
| } | ||
| this.methods_[method].call(); | ||
| this.methods_[method](); |
There was a problem hiding this comment.
I'm having trouble verifying if this change is safe, or if we should be setting this to a value. I'll investigate before merging
|
Do experiments work on build-system files? This is failing lint, and it would make sense to me if these global consts were only valid within the scope of CC. |
Just remembered: you'll need to add the new constant to |
I added it there! https://github.com/ampproject/amphtml/pull/28793/files#diff-67d2d24ff5678f99cda13ca5af136ebeR5 |
I don't think experiments work on build-system, since it ends up only affecting preclosure babel transforms (which build-system isn't run through). I've modified the code to listen for the correct I've manually tested this via:
|
* run v0 in strict mode * if working before, this should work * add rtv experiment * raghu comments * default val * unbreak / lint * create server-side experiment manually * raghu style * lint :/ * doih
Fixes #19380.
From mdn:
note: in some ways this is a baby step towards esm, since those force strict mode as well.
cc @choumx / @jridgewell