Skip to content

Commit

Permalink
amp-ad linter fix (#15549)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhouyx committed May 24, 2018
1 parent ac4319b commit 01b29df
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
3 changes: 0 additions & 3 deletions extensions/amp-ad/0.1/amp-ad-xorigin-iframe-handler.js
Expand Up @@ -78,9 +78,6 @@ export class AmpAdXOriginIframeHandler {
/** @private {boolean} */
this.isInaboxPositionApiInit_ = false;

/** @private {?SubscriptionApi} */
this.inaboxRequestPositionApi_ = null;

/** @private {!Array<!Function>} functions to unregister listeners */
this.unlisteners_ = [];

Expand Down
2 changes: 1 addition & 1 deletion extensions/amp-ad/0.1/amp-ad.js
Expand Up @@ -31,7 +31,7 @@ import {user} from '../../../src/log';
* will be handled by the extension loader.
*
* @param {string} type
* @return !string
* @return {string}
* @private
*/
function networkImplementationTag(type) {
Expand Down
10 changes: 8 additions & 2 deletions extensions/amp-ad/0.1/concurrent-load.js
Expand Up @@ -13,6 +13,7 @@
* limitations under the License.
*/

import {Deferred} from '../../../src/utils/promise';
import {Services} from '../../../src/services';
import {user} from '../../../src/log';

Expand Down Expand Up @@ -75,8 +76,13 @@ export function incrementLoadingAds(win, opt_loadingPromise) {
win[LOADING_ADS_WIN_ID_] = 0;
}
win[LOADING_ADS_WIN_ID_]++;
throttlePromise_ = throttlePromise_ ||
new Promise(resolver => throttlePromiseResolver_ = resolver);

if (!throttlePromise_) {
const deferred = new Deferred();
throttlePromise_ = deferred.promise;
throttlePromiseResolver_ = deferred.resolve;
}

Services.timerFor(win)
.timeoutPromise(1000, opt_loadingPromise)
.catch(() => {})
Expand Down
1 change: 1 addition & 0 deletions extensions/amp-ad/0.1/test/test-amp-ad-custom.js
Expand Up @@ -38,6 +38,7 @@ describe('Amp custom ad', () => {
* Get a custom amp-ad element
* @param {string} url The url of the ad server
* @param {string} slot The alphanumeric slot Id (optional)
* @param {HTMLElement} body
* @return {Element} The completed amp-ad element, which has been added to
* the current document body.
*/
Expand Down

0 comments on commit 01b29df

Please sign in to comment.