Index: client/dart.js |
diff --git a/client/dart.js b/client/dart.js |
index 1c8b333be70329f766432575e8955014a55d83ae..1777e22828b2c0745cd35cf093693840c22804d5 100644 |
--- a/client/dart.js |
+++ b/client/dart.js |
@@ -161,9 +161,14 @@ function ReceivePortSync() { |
var stringified = JSON.stringify(serialize(port)); |
var attrName = 'dart-port:' + name; |
document.documentElement.setAttribute(attrName, stringified); |
- // TODO(vsm): Phase out usage of localStorage. We're leaving it in |
- // temporarily for backwards compatibility. |
- window.localStorage[attrName] = stringified; |
+ // TODO(vsm): Phase out usage of localStorage and delete the |
+ // below. We're leaving it in temporarily for backwards |
+ // compatibility. |
+ try { |
+ window.localStorage[attrName] = stringified; |
+ } catch (e) { |
+ // Swallow errors (e.g., Chrome apps disallow this access). |
+ } |
}; |
window.lookupPort = function(name) { |