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

Side by Side 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 8 years, 12 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 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 var __dom_get_class = __dom_get_class_generic; 202 var __dom_get_class = __dom_get_class_generic;
203 if (typeof window !== 'undefined' && // webworkers don't have a window 203 if (typeof window !== 'undefined' && // webworkers don't have a window
204 window.constructor.name == "DOMWindow") { 204 window.constructor.name == "DOMWindow") {
205 __dom_get_class = __dom_get_class_chrome; 205 __dom_get_class = __dom_get_class_chrome;
206 } 206 }
207 207
208 function __dom_get_cached(hashtablename, obj, isolatetoken) { 208 function __dom_get_cached(hashtablename, obj, isolatetoken) {
209 if (!obj.hasOwnProperty(hashtablename)) return (void 0); 209 if (!obj.hasOwnProperty(hashtablename)) return (void 0);
210 var hashtable = obj[hashtablename]; 210 var hashtable = obj[hashtablename];
211 var hash = isolatetoken.hashCode; 211 var hash = isolatetoken.hashCode;
212 // Issue 1005 part (1), may be undefined in CSSStyleDeclaration.
213 hashtable = hashtable || {};
212 while (true) { 214 while (true) {
213 var result = hashtable[hash]; 215 var result = hashtable[hash];
214 if (result) { 216 if (result) {
215 if (result.$token === isolatetoken) { 217 if (result.$token === isolatetoken) {
216 return result; 218 return result;
217 } else { 219 } else {
218 hash++; 220 hash++;
219 } 221 }
220 } else { 222 } else {
221 return (void 0); 223 return (void 0);
222 } 224 }
223 } 225 }
224 } 226 }
225 227
226 function __dom_set_cached(hashtablename, obj, isolatetoken, value) { 228 function __dom_set_cached(hashtablename, obj, isolatetoken, value) {
227 var hashtable; 229 var hashtable;
228 if (!obj.hasOwnProperty(hashtablename)) { 230 if (!obj.hasOwnProperty(hashtablename)) {
229 hashtable = {}; 231 hashtable = {};
230 obj[hashtablename] = hashtable; 232 obj[hashtablename] = hashtable;
231 } else { 233 } else {
232 hashtable = obj[hashtablename]; 234 hashtable = obj[hashtablename];
235 if (!hashtable) obj[hashtablename] = hashtable = {}; // Issue 1005 part (1)
233 } 236 }
234 var hash = isolatetoken.hashCode; 237 var hash = isolatetoken.hashCode;
235 while (true) { 238 while (true) {
236 var entry = hashtable[hash]; 239 var entry = hashtable[hash];
237 if (entry) { 240 if (entry) {
238 if (entry.$token === isolatetoken) { 241 if (entry.$token === isolatetoken) {
239 throw "Wrapper already exists for this object: " + obj; 242 throw "Wrapper already exists for this object: " + obj;
240 } else { 243 } else {
241 hash++; 244 hash++;
242 } 245 }
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 function native__NativeDomGlobalProperties_getWindow() { 336 function native__NativeDomGlobalProperties_getWindow() {
334 // TODO: Should the window be obtained from an isolate? 337 // TODO: Should the window be obtained from an isolate?
335 return __dom_wrap(window); 338 return __dom_wrap(window);
336 } 339 }
337 340
338 // Declared in src/GlobalProperties.dart 341 // Declared in src/GlobalProperties.dart
339 function native__NativeDomGlobalProperties_getDocument() { 342 function native__NativeDomGlobalProperties_getDocument() {
340 // TODO: Should the window be obtained from an isolate? 343 // TODO: Should the window be obtained from an isolate?
341 return __dom_wrap(window.document); 344 return __dom_wrap(window.document);
342 } 345 }
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