Re: Fixes several problems in our support for safe debugging. (issue 226970043 by erights@gmail.com)

0 views
Skip to first unread message

eri...@gmail.com

unread,
Apr 27, 2015, 7:49:22 PM4/27/15
to kpr...@google.com, kpreid.sw...@gmail.com, google-ca...@googlegroups.com, re...@codereview-hr.appspotmail.com
Hi Kevin, I'm done. So either this is all your's now, or you can walk me
through submitting this to github.


https://codereview.appspot.com/226970043/diff/60001/src/com/google/caja/ses/debug.js
File src/com/google/caja/ses/debug.js (right):

https://codereview.appspot.com/226970043/diff/60001/src/com/google/caja/ses/debug.js#newcode86
src/com/google/caja/ses/debug.js:86: [EvalError, RangeError,
ReferenceError, SyntaxError, TypeError, URIError
On 2015/04/20 17:48:50, kpreid_google wrote:
> What happens if this list is out of sync with the whitelist?

Because of our new __proto__ test, it should fail safe, which is why
https://code.google.com/p/google-caja/issues/detail?id=1963 could be
filed as a public bug. As an experiment just now, removing URIError from
the list above caused SES to fail safe on Chrome 44 Canary with:

Max Severity: Not isolated(5) is not SES-safe.
[-] 1 unexpected intrinsic. Not isolated(5) is not SES-safe.
URIError.__proto__

But going the other way -- leaving URIError in the above list but
deleting it from whitelist.js -- did not provoke a diagnostic. Instead,
URIError is rewired by not whitelisted, which is still safe.

> If it's silent and bad, add a warning to the whitelist.

> Or, perhaps we could derive this list from the whitelist, ensuring
it's in sync?

I just added comments to debug.js and whitelist.js documenting that
these lists need to be kept in sync.

Done.

https://codereview.appspot.com/226970043/

eri...@gmail.com

unread,
Apr 27, 2015, 8:01:50 PM4/27/15
to kpr...@google.com, kpreid.sw...@gmail.com, google-ca...@googlegroups.com, re...@codereview-hr.appspotmail.com

eri...@gmail.com

unread,
Apr 27, 2015, 8:03:55 PM4/27/15
to kpr...@google.com, kpreid.sw...@gmail.com, google-ca...@googlegroups.com, re...@codereview-hr.appspotmail.com
Hold on. "ant runtests" doesn't run yet. Investigating.

https://codereview.appspot.com/226970043/

eri...@gmail.com

unread,
Apr 27, 2015, 8:21:44 PM4/27/15
to kpr...@google.com, kpreid.sw...@gmail.com, google-ca...@googlegroups.com, re...@codereview-hr.appspotmail.com
With snapshot 6, "ant runtests" now runs, but its remaining problems
are:


FAIL: testScriptOnerror: TypeError: undefined is not a function
" TypeError: undefined is not a function
Stack trace:
assertObjectEquals@http://localhost:65182/ant-testlib/com/google/caja/plugin/jsUnitCore.js:307:21
tamingNullAdvice@http://localhost:65182/caja/5722m/ses-single-frame.opt.js?debug=1:1457:110
applyFeralFunction@http://localhost:65182/caja/5722m/ses-single-frame.opt.js?debug=1:1439:40
applyFeralFunction@http://localhost:65182/caja/5722m/ses-single-frame.opt.js?debug=1:1472:126
tamePureFunction/t@http://localhost:65182/caja/5722m/ses-single-frame.opt.js?debug=1:1514:46
assertObjectEquals@http://localhost:65182/caja/5722m/ses-single-frame.opt.js?debug=1
line 113 > eval:4:12
scriptEventTest@http://localhost:65182/caja/5722m/ses-single-frame.opt.js?debug=1
line 584 > eval:38:1
testScriptOnerror@http://localhost:65182/caja/5722m/ses-single-frame.opt.js?debug=1
line 584 > eval:61:1
applyTameFunction@http://localhost:65182/caja/5722m/ses-single-frame.opt.js?debug=1:1473:74
untameCajaFunction/f@http://localhost:65182/caja/5722m/ses-single-frame.opt.js?debug=1:1536:48
testScriptOnerror@http://localhost:65182/caja/5722m/ses-single-frame.opt.js?debug=1
line 113 > eval:4:12
jsunitRun@http://localhost:65182/ant-testlib/com/google/caja/plugin/jsunit.js:271:7
@http://localhost:65182/ant-testlib/com/google/caja/plugin/default-test-driver.js:76:24
run/</<@http://localhost:65182/caja/5722m/ses-single-frame.opt.js?debug=1:1562:343
jsunit.js:106:4
jsunit.fail() jsunit.js:106
jsunitRun() jsunit.js:274
<anonymous> default-test-driver.js:76
run/</<() ses-single-frame.opt.js:1562


and


"FAIL: testScriptOnload: TypeError: undefined is not a function
" TypeError: undefined is not a function
Stack trace:
assertObjectEquals@http://localhost:65182/ant-testlib/com/google/caja/plugin/jsUnitCore.js:307:21
tamingNullAdvice@http://localhost:65182/caja/5722m/ses-single-frame.opt.js?debug=1:1457:110
applyFeralFunction@http://localhost:65182/caja/5722m/ses-single-frame.opt.js?debug=1:1439:40
applyFeralFunction@http://localhost:65182/caja/5722m/ses-single-frame.opt.js?debug=1:1472:126
tamePureFunction/t@http://localhost:65182/caja/5722m/ses-single-frame.opt.js?debug=1:1514:46
assertObjectEquals@http://localhost:65182/caja/5722m/ses-single-frame.opt.js?debug=1
line 113 > eval:4:12
scriptEventTest@http://localhost:65182/caja/5722m/ses-single-frame.opt.js?debug=1
line 584 > eval:38:1
testScriptOnload@http://localhost:65182/caja/5722m/ses-single-frame.opt.js?debug=1
line 584 > eval:57:1
applyTameFunction@http://localhost:65182/caja/5722m/ses-single-frame.opt.js?debug=1:1473:74
untameCajaFunction/f@http://localhost:65182/caja/5722m/ses-single-frame.opt.js?debug=1:1536:48
testScriptOnload@http://localhost:65182/caja/5722m/ses-single-frame.opt.js?debug=1
line 113 > eval:4:12
jsunitRun@http://localhost:65182/ant-testlib/com/google/caja/plugin/jsunit.js:271:7
@http://localhost:65182/ant-testlib/com/google/caja/plugin/default-test-driver.js:76:24
run/</<@http://localhost:65182/caja/5722m/ses-single-frame.opt.js?debug=1:1562:343
jsunit.js:106:4
jsunit.fail() jsunit.js:106
jsunitRun() jsunit.js:274
<anonymous> default-test-driver.js:76
run/</<() ses-single-frame.opt.js:1562


Are these the missing ".next" coverage?

https://codereview.appspot.com/226970043/
Reply all
Reply to author
Forward
0 new messages