Fix Chunks in extensions#7374
Merged
dreamofabear merged 4 commits intoampproject:masterfrom Feb 7, 2017
Merged
Conversation
4de2d97 to
a964e4d
Compare
Author
|
/to @dvoytenko /cc @cramforce PTAL |
cramforce
requested changes
Feb 6, 2017
| if (deactivated) { | ||
| resolved.then(fn); | ||
| return; | ||
| } |
Member
There was a problem hiding this comment.
Just calling getExistingServiceForDoc should have the desired result code size wise. I personally feel that is a nicer pattern that we should move towards.
Author
There was a problem hiding this comment.
Agreed, that's actually what I'm doing in this PR.
- Extensions use
chunksForDoc->getExistingServiceForDoc - Entry points continue to use
startupChunk->fromClassForDocto install the service as a side effect
Did you mean I should change startupChunk to use getExistingServiceForDoc and explicitly install the service in each entry point?
Member
There was a problem hiding this comment.
No, I meant that you can keep the chunk function to limit the exported interface to just that function.
Author
There was a problem hiding this comment.
Ohh, I assumed that we'd want to make Chunks more consistent with other services. Done!
added 2 commits
February 6, 2017 18:06
0438dd6 to
4a5e6e3
Compare
cramforce
approved these changes
Feb 7, 2017
This was referenced Feb 9, 2017
torch2424
pushed a commit
to torch2424/amphtml
that referenced
this pull request
Feb 14, 2017
* avoid referencing Chunks in extension * fix unit test * fix presubmit * malte's comment
mrjoro
pushed a commit
to mrjoro/amphtml
that referenced
this pull request
Apr 28, 2017
* avoid referencing Chunks in extension * fix unit test * fix presubmit * malte's comment
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #7329. Use
getExistingServiceForDoc()to preventChunksfrom being installed in each extension that uses it.If you think it's a good idea, I can follow up this bug fix with a PR to split this file into
chunk.jsandservice/chunk-impl.jslike other services.