зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1742469 - Part 1: Resolve simplify-boolean-expr warnings r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D131929
This commit is contained in:
Родитель
8bac8a33ce
Коммит
692ab475b4
|
@ -151,10 +151,10 @@ class UniquePtrComparator {
|
|||
|
||||
public:
|
||||
bool Equals(const A& a, const A& b) const {
|
||||
return a && b ? *a == *b : !a && !b ? true : false;
|
||||
return (a && b) ? (*a == *b) : (!a && !b);
|
||||
}
|
||||
bool LessThan(const A& a, const A& b) const {
|
||||
return a && b ? *a < *b : b ? true : false;
|
||||
return (a && b) ? (*a < *b) : !!b;
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -644,12 +644,9 @@ class DebuggerImmediateRunnable : public WorkerRunnable {
|
|||
aCx, JS::ObjectOrNullValue(mHandler->CallableOrNull()));
|
||||
JS::HandleValueArray args = JS::HandleValueArray::empty();
|
||||
JS::Rooted<JS::Value> rval(aCx);
|
||||
if (!JS_CallFunctionValue(aCx, global, callable, args, &rval)) {
|
||||
// Just return false; WorkerRunnable::Run will report the exception.
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
// WorkerRunnable::Run will report the exception if it happens.
|
||||
return JS_CallFunctionValue(aCx, global, callable, args, &rval);
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -1729,11 +1726,7 @@ bool WorkerPrivate::Freeze(const nsPIDOMWindowInner* aWindow) {
|
|||
DisableDebugger();
|
||||
|
||||
RefPtr<FreezeRunnable> runnable = new FreezeRunnable(this);
|
||||
if (!runnable->Dispatch()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
return runnable->Dispatch();
|
||||
}
|
||||
|
||||
bool WorkerPrivate::Thaw(const nsPIDOMWindowInner* aWindow) {
|
||||
|
@ -1769,11 +1762,7 @@ bool WorkerPrivate::Thaw(const nsPIDOMWindowInner* aWindow) {
|
|||
EnableDebugger();
|
||||
|
||||
RefPtr<ThawRunnable> runnable = new ThawRunnable(this);
|
||||
if (!runnable->Dispatch()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
return runnable->Dispatch();
|
||||
}
|
||||
|
||||
void WorkerPrivate::ParentWindowPaused() {
|
||||
|
|
Загрузка…
Ссылка в новой задаче