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

Side by Side Diff: lib/dom/templates/html/dart2js/impl_Window.darttemplate

Issue 10891022: Update corelib/ and lib/ to use the new try-catch syntax. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 3 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 | « lib/dom/scripts/idlparser_test.dart ('k') | lib/dom/templates/html/impl/impl_Node.darttemplate » ('j') | 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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 class $CLASSNAME$EXTENDS$IMPLEMENTS native "@*DOMWindow" { 5 class $CLASSNAME$EXTENDS$IMPLEMENTS native "@*DOMWindow" {
6 6
7 _DocumentImpl get document() native "return this.document;"; 7 _DocumentImpl get document() native "return this.document;";
8 8
9 Window get _top() native "return this.top;"; 9 Window get _top() native "return this.top;";
10 10
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 void set _location(Location value) native 'this.location = value'; 62 void set _location(Location value) native 'this.location = value';
63 // Prevent compiled from thinking 'location' property is available for a Dart 63 // Prevent compiled from thinking 'location' property is available for a Dart
64 // member. 64 // member.
65 _protect_location() native 'location'; 65 _protect_location() native 'location';
66 66
67 static _isDartLocation(thing) { 67 static _isDartLocation(thing) {
68 // On Firefox the code that implements 'is Location' fails to find the patch 68 // On Firefox the code that implements 'is Location' fails to find the patch
69 // stub on Object.prototype and throws an exception. 69 // stub on Object.prototype and throws an exception.
70 try { 70 try {
71 return thing is Location; 71 return thing is Location;
72 } catch (var e) { 72 } catch (e) {
73 return false; 73 return false;
74 } 74 }
75 } 75 }
76 76
77 77
78 void requestLayoutFrame(TimeoutHandler callback) { 78 void requestLayoutFrame(TimeoutHandler callback) {
79 _addMeasurementFrameCallback(callback); 79 _addMeasurementFrameCallback(callback);
80 } 80 }
81 81
82 /** @domName DOMWindow.requestAnimationFrame */ 82 /** @domName DOMWindow.requestAnimationFrame */
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 return _deserialize(port); 124 return _deserialize(port);
125 } 125 }
126 126
127 registerPort(String name, var port) { 127 registerPort(String name, var port) {
128 var serialized = _serialize(port); 128 var serialized = _serialize(port);
129 localStorage['dart-port:$name'] = JSON.stringify(serialized); 129 localStorage['dart-port:$name'] = JSON.stringify(serialized);
130 } 130 }
131 131
132 $!MEMBERS 132 $!MEMBERS
133 } 133 }
OLDNEW
« no previous file with comments | « lib/dom/scripts/idlparser_test.dart ('k') | lib/dom/templates/html/impl/impl_Node.darttemplate » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698