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

Unified Diff: chrome/renderer/resources/extensions/web_view.js

Issue 530043002: <webview> cleanup: Change self = this to bind(this) in web_view.js (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/renderer/resources/extensions/web_view_events.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/resources/extensions/web_view.js
diff --git a/chrome/renderer/resources/extensions/web_view.js b/chrome/renderer/resources/extensions/web_view.js
index 3c8c0d8295828dbc645eaa6cdce561fff33eb3eb..40dd19f365e9fd91ed1fd32ce5256b13e323d0ef 100644
--- a/chrome/renderer/resources/extensions/web_view.js
+++ b/chrome/renderer/resources/extensions/web_view.js
@@ -449,7 +449,7 @@ WebViewInternal.prototype.setupWebViewSrcAttributeMutationObserver =
this.handleWebviewAttributeMutation(
lazyboy 2014/09/02 22:57:27 ^^^
mutation.attributeName, oldValue, newValue);
}.bind(this));
- });
+ }.bind(this));
lazyboy 2014/09/02 17:45:34 This isn't necessary, are you doing this for consi
Fady Samuel 2014/09/02 22:53:59 Are you sure about that? If I don't bind this here
lazyboy 2014/09/02 22:57:27 I was confused by the whole diff being messed up i
var params = {
attributes: true,
attributeOldValue: true,
@@ -747,7 +747,7 @@ WebViewInternal.prototype.dispatchEvent = function(webViewEvent) {
*/
WebViewInternal.prototype.setupEventProperty = function(eventName) {
var propertyName = 'on' + eventName.toLowerCase();
- Object.defineProperty(webviewNode, propertyName, {
+ Object.defineProperty(this.webviewNode, propertyName, {
get: function() {
return this.on[propertyName];
}.bind(this),
« no previous file with comments | « no previous file | chrome/renderer/resources/extensions/web_view_events.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698