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

Side by Side Diff: ui/webui/resources/js/assert.js

Issue 13375003: Fixing iframe jank in the local omnibox popup. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removing sites, too. Created 7 years, 8 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
OLDNEW
(Empty)
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 /**
6 * @fileoverview Assertion support.
7 */
8
9 /**
10 * Simple common assertion API
11 * @param {*} condition The condition to test. Note that this may be used to
12 * test whether a value is defined or not, and we don't want to force a
13 * cast to Boolean.
14 * @param {string=} opt_message A message to use in any error.
15 */
16 function assert(condition, opt_message) {
17 'use strict';
18 if (!condition) {
19 var msg = 'Assertion failed';
20 if (opt_message)
21 msg = msg + ': ' + opt_message;
22 throw new Error(msg);
23 }
24 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698