Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1014)

Side by Side Diff: extensions/renderer/resources/guest_view/extension_view/extension_view_api_methods.js

Issue 2298803004: Fix for undefined reject() in extension_view_api_methods.js. (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // This module implements the public-facing API functions for the 5 // This module implements the public-facing API functions for the
6 // <extensionview> tag. 6 // <extensionview> tag.
7 7
8 var ExtensionViewInternal = 8 var ExtensionViewInternal =
9 require('extensionViewInternal').ExtensionViewInternal; 9 require('extensionViewInternal').ExtensionViewInternal;
10 var ExtensionViewImpl = require('extensionView').ExtensionViewImpl; 10 var ExtensionViewImpl = require('extensionView').ExtensionViewImpl;
(...skipping 14 matching lines...) Expand all
25 25
26 ExtensionViewImpl.prototype.load = function(src) { 26 ExtensionViewImpl.prototype.load = function(src) {
27 return new Promise(function(resolve, reject) { 27 return new Promise(function(resolve, reject) {
28 this.loadQueue.push({src: src, resolve: resolve, reject: reject}); 28 this.loadQueue.push({src: src, resolve: resolve, reject: reject});
29 this.loadNextSrc(); 29 this.loadNextSrc();
30 }.bind(this)) 30 }.bind(this))
31 .then(function onLoadResolved() { 31 .then(function onLoadResolved() {
32 this.pendingLoad = null; 32 this.pendingLoad = null;
33 this.loadNextSrc(); 33 this.loadNextSrc();
34 }.bind(this), function onLoadRejected() { 34 }.bind(this), function onLoadRejected() {
35 this.pendingLoad.reject('Failed to load.');
35 this.pendingLoad = null; 36 this.pendingLoad = null;
36 this.loadNextSrc(); 37 this.loadNextSrc();
37 reject('Failed to load.');
38 }.bind(this)); 38 }.bind(this));
39 }; 39 };
40 40
41 // ----------------------------------------------------------------------------- 41 // -----------------------------------------------------------------------------
42 42
43 ExtensionViewImpl.getApiMethods = function() { 43 ExtensionViewImpl.getApiMethods = function() {
44 return EXTENSION_VIEW_API_METHODS; 44 return EXTENSION_VIEW_API_METHODS;
45 }; 45 };
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698