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

Side by Side Diff: client/dom/scripts/template_wrapping_dom.js

Issue 8301007: Convert cache property from array to object. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 9 years, 2 months 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « client/dom/generated/wrapping_dom.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 // DO NOT EDIT 5 // DO NOT EDIT
6 // Auto-generated Dart DOM implementation. 6 // Auto-generated Dart DOM implementation.
7 7
8 $!CODE 8 $!CODE
9 9
10 function __dom_native_TimeoutHander_method(_this, callback, timeout, operation) { 10 function __dom_native_TimeoutHander_method(_this, callback, timeout, operation) {
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 } 214 }
215 } else { 215 } else {
216 return (void 0); 216 return (void 0);
217 } 217 }
218 } 218 }
219 } 219 }
220 220
221 function __dom_set_cached(hashtablename, obj, isolatetoken, value) { 221 function __dom_set_cached(hashtablename, obj, isolatetoken, value) {
222 var hashtable; 222 var hashtable;
223 if (!obj.hasOwnProperty(hashtablename)) { 223 if (!obj.hasOwnProperty(hashtablename)) {
224 hashtable = []; 224 hashtable = {};
225 obj[hashtablename] = hashtable; 225 obj[hashtablename] = hashtable;
226 } else { 226 } else {
227 hashtable = obj[hashtablename]; 227 hashtable = obj[hashtablename];
228 } 228 }
229 var hash = isolatetoken.hashCode; 229 var hash = isolatetoken.hashCode;
230 while (true) { 230 while (true) {
231 var entry = hashtable[hash]; 231 var entry = hashtable[hash];
232 if (entry) { 232 if (entry) {
233 if (entry.$token === isolatetoken) { 233 if (entry.$token === isolatetoken) {
234 throw "Wrapper already exists for this object: " + obj; 234 throw "Wrapper already exists for this object: " + obj;
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 function native__NativeDomGlobalProperties_getWindow() { 319 function native__NativeDomGlobalProperties_getWindow() {
320 // TODO: Should the window be obtained from an isolate? 320 // TODO: Should the window be obtained from an isolate?
321 return __dom_wrap(window); 321 return __dom_wrap(window);
322 } 322 }
323 323
324 // Declared in src/GlobalProperties.dart 324 // Declared in src/GlobalProperties.dart
325 function native__NativeDomGlobalProperties_getDocument() { 325 function native__NativeDomGlobalProperties_getDocument() {
326 // TODO: Should the window be obtained from an isolate? 326 // TODO: Should the window be obtained from an isolate?
327 return __dom_wrap(window.document); 327 return __dom_wrap(window.document);
328 } 328 }
OLDNEW
« 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