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

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

Issue 245443003: Update platform_app.js to work even if window.history is not replaceable (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Take arv's feedback into consideration Created 6 years, 8 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/test/data/extensions/platform_apps/restrictions/main.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/resources/extensions/platform_app.js
diff --git a/chrome/renderer/resources/extensions/platform_app.js b/chrome/renderer/resources/extensions/platform_app.js
index 0982a6a18ea0b4371208292f1fd14f6ed4d3b921..f6934cf0bf94d84d625f989b1bd535794f5160d9 100644
--- a/chrome/renderer/resources/extensions/platform_app.js
+++ b/chrome/renderer/resources/extensions/platform_app.js
@@ -152,7 +152,7 @@ disableMethods(HTMLDocument.prototype, 'document', ['open', 'clear', 'close']);
disableMethods(HTMLDocument.prototype, 'document', ['write', 'writeln'], true);
// Disable history.
-window.history = {};
+Object.defineProperty(window, "history", { value: {} });
disableGetters(window.history, 'history', ['back', 'forward', 'go', 'length']);
// Disable find.
« no previous file with comments | « no previous file | chrome/test/data/extensions/platform_apps/restrictions/main.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698