Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(137)

Issue 153290043: Expand and refactor window.onerror support. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 5 months ago by kpreid_google
Modified:
11 years, 4 months ago
Reviewers:
felix8a
CC:
google-caja-discuss_googlegroups.com
Base URL:
http://google-caja.googlecode.com/svn/trunk/
Visibility:
Public.

Description

Guest window.onerror is now invoked for these error cases: * top-level code (that is, <script>throw ...;</script>). Fixes https://code.google.com/p/google-caja/issues/detail?id=1433. * setTimeout, setInterval, or requestAnimationFrame callbacks. The existing calls to onerror have been changed to use a single implementation, domicile.handleUncaughtException. This function takes care to not throw even if the error object or onerror handler cause errors when used, and passes the full set of standardized arguments (still with dummy values). Also reorganized the setTimeout-and-friends implementation (tameSetAndClear) so that the early-exit path is more direct. @r5701

Patch Set 1 #

Total comments: 14

Patch Set 2 : Expand and refactor window.onerror support. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+165 lines, -64 lines) Patch
M src/com/google/caja/plugin/domado.js View 1 6 chunks +98 lines, -41 lines 0 comments Download
M src/com/google/caja/plugin/html-emitter.js View 1 chunk +10 lines, -17 lines 0 comments Download
M src/com/google/caja/plugin/ses-frame-group.js View 1 chunk +6 lines, -1 line 0 comments Download
M tests/com/google/caja/plugin/jsunit.js View 1 1 chunk +2 lines, -0 lines 0 comments Download
M tests/com/google/caja/plugin/test-cajajs-invocation.js View 1 1 chunk +27 lines, -0 lines 0 comments Download
M tests/com/google/caja/plugin/test-domado-events-guest.html View 2 chunks +22 lines, -5 lines 0 comments Download

Messages

Total messages: 5
kpreid_google
11 years, 5 months ago (2014-10-09 17:02:12 UTC) #1
felix8a
lgtm except below https://codereview.appspot.com/153290043/diff/1/src/com/google/caja/plugin/domado.js File src/com/google/caja/plugin/domado.js (right): https://codereview.appspot.com/153290043/diff/1/src/com/google/caja/plugin/domado.js#newcode6760 src/com/google/caja/plugin/domado.js:6760: if (typeof console !== 'undefined') { ...
11 years, 4 months ago (2014-10-12 20:04:50 UTC) #2
kpreid_google
Guest window.onerror is now invoked for these error cases: * top-level code (that is, <script>throw ...
11 years, 4 months ago (2014-10-13 16:56:03 UTC) #3
kpreid_google
https://codereview.appspot.com/153290043/diff/1/src/com/google/caja/plugin/domado.js File src/com/google/caja/plugin/domado.js (right): https://codereview.appspot.com/153290043/diff/1/src/com/google/caja/plugin/domado.js#newcode6760 src/com/google/caja/plugin/domado.js:6760: if (typeof console !== 'undefined') { On 2014/10/12 20:04:50, ...
11 years, 4 months ago (2014-10-13 16:58:00 UTC) #4
felix8a
11 years, 4 months ago (2014-10-13 17:49:22 UTC) #5
lgtm

https://codereview.appspot.com/153290043/diff/1/tests/com/google/caja/plugin/...
File tests/com/google/caja/plugin/test-cajajs-invocation.js (right):

https://codereview.appspot.com/153290043/diff/1/tests/com/google/caja/plugin/...
tests/com/google/caja/plugin/test-cajajs-invocation.js:96:
caja.load(createDiv(), uriPolicy, jsunitCallback(function(frame) {
On 2014/10/13 16:58:00, kpreid_google wrote:
> On 2014/10/12 20:04:50, felix8a wrote:
> > space after function
> 
> I can't find a citation but my understanding of the style we're supposed to be
> following (but historically have been mixed up about) is that there should be
no
> space there. I've been converting code to the no-space style as I touch it.

personally, I prefer to remain consistent within a file, and change style of an
entire file all at once, but ok.

https://codereview.appspot.com/153290043/diff/1/tests/com/google/caja/plugin/...
File tests/com/google/caja/plugin/test-domado-events-guest.html (right):

https://codereview.appspot.com/153290043/diff/1/tests/com/google/caja/plugin/...
tests/com/google/caja/plugin/test-domado-events-guest.html:454: <p
class="testcontainer" id="testTimeoutError">
On 2014/10/13 16:58:00, kpreid_google wrote:
> On 2014/10/12 20:04:50, felix8a wrote:
> > this is an async test, add 'waiting' to the class
> 
> My understanding was that 'waiting' was obsolete. Your TODO comment at
> BrowserTestCase.java claims this. Clarify?

ah, right, I forgot about that. ok.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b