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

Unified Diff: lib/runtime/dart/_js_primitives.js

Issue 1355893003: Rewire DDC to use the analyzer task model (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: Fix for identifiers Created 5 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 side-by-side diff with in-line comments
Download patch
Index: lib/runtime/dart/_js_primitives.js
diff --git a/lib/runtime/dart/_js_primitives.js b/lib/runtime/dart/_js_primitives.js
index ecda66647d271315f9f6dc4ecbf9846750ef0a6c..8c6da506cb8d0c5f9f4fa87a30e12cb0cd1fcdae 100644
--- a/lib/runtime/dart/_js_primitives.js
+++ b/lib/runtime/dart/_js_primitives.js
@@ -6,18 +6,18 @@ dart_library.library('dart/_js_primitives', null, /* Imports */[
'use strict';
let dartx = dart.dartx;
function printString(string) {
- if (typeof dartPrint == "function") {
+ if (dart.notNull(dart.as(typeof dartPrint == "function", core.bool))) {
dartPrint(string);
return;
}
- if (typeof console == "object" && typeof console.log != "undefined") {
+ if (dart.notNull(dart.as(typeof console == "object", core.bool)) && dart.notNull(dart.as(typeof console.log != "undefined", core.bool))) {
console.log(string);
return;
}
- if (typeof window == "object") {
+ if (dart.notNull(dart.as(typeof window == "object", core.bool))) {
return;
}
- if (typeof print == "function") {
+ if (dart.notNull(dart.as(typeof print == "function", core.bool))) {
print(string);
return;
}

Powered by Google App Engine
This is Rietveld 408576698