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

Unified Diff: sdk/lib/html/templates/html/dart2js/impl_LocalWindow.darttemplate

Issue 11415064: Phase out local storage usage in PortSync code (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Merge Created 8 years, 1 month 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
Index: sdk/lib/html/templates/html/dart2js/impl_LocalWindow.darttemplate
diff --git a/sdk/lib/html/templates/html/dart2js/impl_LocalWindow.darttemplate b/sdk/lib/html/templates/html/dart2js/impl_LocalWindow.darttemplate
index 8f095cb4bdcfae1e4dce9fcafbecc9f9e412d8e8..5542bf872f0b72cf0ba000b9694870d92e4c0010 100644
--- a/sdk/lib/html/templates/html/dart2js/impl_LocalWindow.darttemplate
+++ b/sdk/lib/html/templates/html/dart2js/impl_LocalWindow.darttemplate
@@ -131,7 +131,7 @@ class $CLASSNAME$EXTENDS$IMPLEMENTS native "@*DOMWindow" {
* registered under [name].
*/
SendPortSync lookupPort(String name) {
- var port = JSON.parse(localStorage['dart-port:$name']);
+ var port = JSON.parse(document.documentElement.attributes['dart-port:$name']);
return _deserialize(port);
}
@@ -142,7 +142,7 @@ class $CLASSNAME$EXTENDS$IMPLEMENTS native "@*DOMWindow" {
*/
void registerPort(String name, var port) {
var serialized = _serialize(port);
- localStorage['dart-port:$name'] = JSON.stringify(serialized);
+ document.documentElement.attributes['dart-port:$name'] = JSON.stringify(serialized);
}
$!MEMBERS
« no previous file with comments | « sdk/lib/html/dartium/html_dartium.dart ('k') | sdk/lib/html/templates/html/dartium/impl_LocalWindow.darttemplate » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698