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

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

Issue 1524843002: JS: Format if statements with no else on a single line (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: rebased Created 5 years 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
« no previous file with comments | « lib/runtime/dart/_native_typed_data.js ('k') | lib/runtime/dart/async.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/runtime/dart/_utils.js
diff --git a/lib/runtime/dart/_utils.js b/lib/runtime/dart/_utils.js
index 9793464a006c386c98f89f1ed67c1996100212c2..84ede046b14822ad6526d280f4c2cdd6ac55a244 100644
--- a/lib/runtime/dart/_utils.js
+++ b/lib/runtime/dart/_utils.js
@@ -23,16 +23,14 @@ dart_library.library('dart/_utils', null, /* Imports */[
throw Error(message);
}
function assert_(condition) {
- if (!condition)
- throwInternalError("The compiler is broken: failed assert");
+ if (!condition) throwInternalError("The compiler is broken: failed assert");
}
function getOwnNamesAndSymbols(obj) {
return getOwnPropertyNames(obj).concat(getOwnPropertySymbols(obj));
}
function safeGetOwnProperty(obj, name) {
let desc = getOwnPropertyDescriptor(obj, name);
- if (desc)
- return desc.value;
+ if (desc) return desc.value;
}
function defineLazyProperty(to, name, desc) {
let init = desc.get;
@@ -45,8 +43,7 @@ dart_library.library('dart/_utils', null, /* Imports */[
throwInternalError('circular initialization for field ' + name);
}
function lazyGetter() {
- if (init == null)
- return value;
+ if (init == null) return value;
let f = init;
init = circularInitError;
lazySetter(f());
@@ -54,8 +51,7 @@ dart_library.library('dart/_utils', null, /* Imports */[
}
desc.get = lazyGetter;
desc.configurable = true;
- if (desc.set)
- desc.set = lazySetter;
+ if (desc.set) desc.set = lazySetter;
return defineProperty(to, name, desc);
}
function defineLazy(to, from) {
« no previous file with comments | « lib/runtime/dart/_native_typed_data.js ('k') | lib/runtime/dart/async.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698