Suppress check on localStorage to enable chrome apps

Review URL: https://codereview.chromium.org//11428064

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15487 260f80e4-7a28-3924-810f-c04153c831b5
This commit is contained in:
vsm@google.com 2012-11-29 00:51:12 +00:00
parent 888e564924
commit eb7ec0e6ae

View file

@ -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) {