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

Issue 1015553003: Added more typechecking functions and unit tests for existing code. (Closed)

Created:
5 years, 9 months ago by John Williams
Modified:
5 years, 9 months ago
Reviewers:
garykac, kelvinp
CC:
chromium-reviews, chromoting-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Added more typechecking functions and unit tests for existing code. This change alters the functionality of getObjectAttr slightly: it no longer accepts null or Array objects as "object" values. I made this change because the type checking code seems designed to mirror the semantics of JSON, where each value belongs to exactly one of the following categories: array, boolean, number, null, object, or string. This change also changes the type of values thrown from strings to Error objects so that there are more likely to be useful stack traces when an error occurs. BUG= Committed: https://crrev.com/b814ba0d3921aaf296ebe1b653ab2827f671a7dd Cr-Commit-Position: refs/heads/master@{#321415}

Patch Set 1 #

Patch Set 2 : #

Total comments: 12

Patch Set 3 : #

Total comments: 5

Patch Set 4 : #

Patch Set 5 : #

Patch Set 6 : #

Patch Set 7 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+526 lines, -165 lines) Patch
M remoting/remoting_webapp_files.gypi View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M remoting/webapp/app_remoting/js/app_remoting.js View 1 2 3 4 5 6 3 chunks +7 lines, -7 lines 0 comments Download
M remoting/webapp/base/js/base.js View 1 2 1 chunk +0 lines, -1 line 0 comments Download
M remoting/webapp/crd/js/cast_extension_handler.js View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M remoting/webapp/crd/js/client_plugin_host_desktop_impl.js View 1 2 2 chunks +5 lines, -5 lines 0 comments Download
M remoting/webapp/crd/js/client_plugin_impl.js View 1 2 3 4 chunks +36 lines, -34 lines 0 comments Download
M remoting/webapp/crd/js/gnubby_auth_handler.js View 1 2 3 2 chunks +4 lines, -4 lines 0 comments Download
M remoting/webapp/crd/js/host.js View 1 2 3 1 chunk +5 lines, -5 lines 0 comments Download
M remoting/webapp/crd/js/host_daemon_facade.js View 1 2 3 chunks +20 lines, -19 lines 0 comments Download
M remoting/webapp/crd/js/host_list_api_impl.js View 1 2 3 4 5 6 1 chunk +11 lines, -9 lines 0 comments Download
M remoting/webapp/crd/js/it2me_host_facade.js View 1 2 3 chunks +9 lines, -8 lines 0 comments Download
M remoting/webapp/crd/js/typecheck.js View 1 2 7 chunks +171 lines, -70 lines 0 comments Download
A remoting/webapp/crd/js/typecheck_unittest.js View 1 2 3 1 chunk +240 lines, -0 lines 0 comments Download
M remoting/webapp/crd/js/video_frame_recorder.js View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M remoting/webapp/js_proto/qunit_proto.js View 1 2 3 4 5 6 1 chunk +14 lines, -0 lines 0 comments Download

Messages

Total messages: 24 (10 generated)
John Williams
5 years, 9 months ago (2015-03-17 01:48:28 UTC) #2
John Williams
5 years, 9 months ago (2015-03-17 19:50:43 UTC) #4
kelvinp
lgtm PTAL https://codereview.chromium.org/1015553003/diff/20001/remoting/webapp/crd/js/typecheck.js File remoting/webapp/crd/js/typecheck.js (right): https://codereview.chromium.org/1015553003/diff/20001/remoting/webapp/crd/js/typecheck.js#newcode13 remoting/webapp/crd/js/typecheck.js:13: throw new Error('Undefined value'); we have a ...
5 years, 9 months ago (2015-03-17 21:41:48 UTC) #5
John Williams
https://codereview.chromium.org/1015553003/diff/20001/remoting/webapp/crd/js/typecheck.js File remoting/webapp/crd/js/typecheck.js (right): https://codereview.chromium.org/1015553003/diff/20001/remoting/webapp/crd/js/typecheck.js#newcode13 remoting/webapp/crd/js/typecheck.js:13: throw new Error('Undefined value'); On 2015/03/17 21:41:48, kelvinp wrote: ...
5 years, 9 months ago (2015-03-18 17:23:01 UTC) #6
garykac
https://codereview.chromium.org/1015553003/diff/40001/remoting/webapp/crd/js/typecheck.js File remoting/webapp/crd/js/typecheck.js (right): https://codereview.chromium.org/1015553003/diff/40001/remoting/webapp/crd/js/typecheck.js#newcode10 remoting/webapp/crd/js/typecheck.js:10: 'use strict'; All of our files should have 'use ...
5 years, 9 months ago (2015-03-18 17:28:37 UTC) #7
kelvinp
https://codereview.chromium.org/1015553003/diff/20001/remoting/webapp/crd/js/typecheck_unittest.js File remoting/webapp/crd/js/typecheck_unittest.js (right): https://codereview.chromium.org/1015553003/diff/20001/remoting/webapp/crd/js/typecheck_unittest.js#newcode39 remoting/webapp/crd/js/typecheck_unittest.js:39: QUnit.strictEqual(assertDefined(anArray), anArray); On 2015/03/18 17:23:01, John Williams wrote: > ...
5 years, 9 months ago (2015-03-18 17:52:19 UTC) #8
John Williams
https://codereview.chromium.org/1015553003/diff/20001/remoting/webapp/crd/js/typecheck_unittest.js File remoting/webapp/crd/js/typecheck_unittest.js (right): https://codereview.chromium.org/1015553003/diff/20001/remoting/webapp/crd/js/typecheck_unittest.js#newcode39 remoting/webapp/crd/js/typecheck_unittest.js:39: QUnit.strictEqual(assertDefined(anArray), anArray); On 2015/03/18 17:52:19, kelvinp wrote: > On ...
5 years, 9 months ago (2015-03-18 20:20:19 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1015553003/60001
5 years, 9 months ago (2015-03-18 20:21:38 UTC) #12
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_compile_dbg_32_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_compile_dbg_32_ng/builds/34627)
5 years, 9 months ago (2015-03-18 20:26:23 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1015553003/100001
5 years, 9 months ago (2015-03-19 18:26:54 UTC) #17
commit-bot: I haz the power
Try jobs failed on following builders: ios_rel_device_ninja on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_rel_device_ninja/builds/49488)
5 years, 9 months ago (2015-03-19 18:29:54 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1015553003/120001
5 years, 9 months ago (2015-03-19 18:41:37 UTC) #22
commit-bot: I haz the power
Committed patchset #7 (id:120001)
5 years, 9 months ago (2015-03-19 20:08:59 UTC) #23
commit-bot: I haz the power
5 years, 9 months ago (2015-03-19 20:10:07 UTC) #24
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/b814ba0d3921aaf296ebe1b653ab2827f671a7dd
Cr-Commit-Position: refs/heads/master@{#321415}

Powered by Google App Engine
This is Rietveld 408576698