mirror of
https://github.com/dart-lang/sdk
synced 2024-09-05 16:41:07 +00:00
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:
parent
888e564924
commit
eb7ec0e6ae
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue