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

Unified Diff: sdk/lib/html/dart2js/html_dart2js.dart

Side-by-side diff isn't available for this file because of its large size.
Issue 12326132: Removing an unnecessary throw for JS interop. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 9 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:
Download patch
« no previous file with comments | « no previous file | sdk/lib/html/dartium/html_dartium.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/html/dart2js/html_dart2js.dart
diff --git a/sdk/lib/html/dart2js/html_dart2js.dart b/sdk/lib/html/dart2js/html_dart2js.dart
index 6440d5a336fceb85ea59944668ff7666c2232fcf..2e4798241d880e77b9268d32dc93410a236f4e8d 100644
--- a/sdk/lib/html/dart2js/html_dart2js.dart
+++ b/sdk/lib/html/dart2js/html_dart2js.dart
@@ -25492,7 +25492,7 @@ class Window extends EventTarget implements WindowBase native "@*DOMWindow" {
* frame unwinds, causing the future to complete after all processing has
* completed for the current event, but before any subsequent events.
*/
- void setImmediate(TimeoutHandler callback) {
+ void setImmediate(TimeoutHandler callback) {
_addMicrotaskCallback(callback);
}
/**
@@ -25500,8 +25500,11 @@ class Window extends EventTarget implements WindowBase native "@*DOMWindow" {
* registered under [name].
*/
SendPortSync lookupPort(String name) {
- var port =
- json.parse(document.documentElement.attributes['dart-port:$name']);
+ var portStr = document.documentElement.attributes['dart-port:$name'];
+ if (portStr == null) {
+ return null;
+ }
+ var port = json.parse(portStr);
return _deserialize(port);
}
@@ -25523,7 +25526,7 @@ class Window extends EventTarget implements WindowBase native "@*DOMWindow" {
* If you need to later cancel this animation, use [requestAnimationFrame]
* instead.
*
- * Note: The code that runs when the future completes should call
+ * Note: The code that runs when the future completes should call
* [animationFrame] again for the animation to continue.
*/
Future<num> get animationFrame {
@@ -25598,7 +25601,7 @@ class Window extends EventTarget implements WindowBase native "@*DOMWindow" {
/**
* Called to draw an animation frame and then request the window to repaint
- * after [callback] has finished (creating the animation).
+ * after [callback] has finished (creating the animation).
*
* Use this method only if you need to later call [cancelAnimationFrame]. If
* not, the preferred Dart idiom is to set animation frames by calling
« no previous file with comments | « no previous file | sdk/lib/html/dartium/html_dartium.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698