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

Unified Diff: client/dom/scripts/template_wrapping_dom.js

Issue 9051011: Work-around for Issue 1005 part (1) (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: typo Created 9 years 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 | « client/dom/generated/wrapping_dom.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/dom/scripts/template_wrapping_dom.js
diff --git a/client/dom/scripts/template_wrapping_dom.js b/client/dom/scripts/template_wrapping_dom.js
index e9b0ddca8383c0982893a305c2cc8d3b042c2c6e..03d296a80e2dc0fe3003ed1d577401b5f1261552 100644
--- a/client/dom/scripts/template_wrapping_dom.js
+++ b/client/dom/scripts/template_wrapping_dom.js
@@ -209,6 +209,8 @@ function __dom_get_cached(hashtablename, obj, isolatetoken) {
if (!obj.hasOwnProperty(hashtablename)) return (void 0);
var hashtable = obj[hashtablename];
var hash = isolatetoken.hashCode;
+ // Issue 1005 part (1), may be undefined in CSSStyleDeclaration.
+ hashtable = hashtable || {};
while (true) {
var result = hashtable[hash];
if (result) {
@@ -230,6 +232,7 @@ function __dom_set_cached(hashtablename, obj, isolatetoken, value) {
obj[hashtablename] = hashtable;
} else {
hashtable = obj[hashtablename];
+ if (!hashtable) obj[hashtablename] = hashtable = {}; // Issue 1005 part (1)
}
var hash = isolatetoken.hashCode;
while (true) {
« no previous file with comments | « client/dom/generated/wrapping_dom.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698