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

Issue 10044: Support better debugging of Cajoled code by naming functions when practical. (Closed)

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

Description

Currently, when debugging cajoled code under, for example Firebug, the stack trace looks mostly populated by non-informative anonymous function markers. Firebug will pick up the name of named functions, so we should name functions when we can. Named functions already cajoled to named functions. In addition, when cajoling an anonymous function, if the function is directly used to initialize a literally named property or variable, pick up the variable or property name from the context and mangle it into the function's name. Many anonymous uncajoled functions in our own sources are now named as well.

Patch Set 1 #

Patch Set 2 : Support better debugging of Cajoled code by naming functions when practical. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+971 lines, -459 lines) Patch
M src/com/google/caja/cajita.js View 39 chunks +136 lines, -100 lines 2 comments Download
M src/com/google/caja/log-to-console.js View 2 chunks +17 lines, -7 lines 0 comments Download
M src/com/google/caja/opensocial/applet/testbed.js View 1 chunk +1 line, -1 line 0 comments Download
M src/com/google/caja/parser/quasiliteral/CajitaRewriter.java View 12 chunks +240 lines, -179 lines 2 comments Download
M src/com/google/caja/parser/quasiliteral/DefaultValijaRewriter.java View 20 chunks +306 lines, -116 lines 6 comments Download
M src/com/google/caja/parser/quasiliteral/QuasiBuilder.java View 2 chunks +2 lines, -2 lines 0 comments Download
M src/com/google/caja/parser/quasiliteral/QuasiNode.java View 5 chunks +4 lines, -5 lines 0 comments Download
M src/com/google/caja/parser/quasiliteral/RewriterMessageType.java View 1 chunk +6 lines, -0 lines 1 comment Download
M src/com/google/caja/parser/quasiliteral/Rule.java View 3 chunks +88 lines, -20 lines 0 comments Download
M src/com/google/caja/plugin/stages/DebuggingSymbolsStage.java View 3 chunks +3 lines, -2 lines 0 comments Download
M src/com/google/caja/triv-logger.js View 1 chunk +5 lines, -3 lines 0 comments Download
M src/com/google/caja/valija-cajita.js View 5 chunks +15 lines, -9 lines 0 comments Download
M tests/com/google/caja/opensocial/example-rewritten.xml View 2 chunks +3 lines, -3 lines 0 comments Download
M tests/com/google/caja/opensocial/service/CajolingServiceTest.java View 1 chunk +1 line, -1 line 0 comments Download
M tests/com/google/caja/parser/quasiliteral/CajitaRewriterTest.java View 4 chunks +58 lines, -8 lines 1 comment Download
M tests/com/google/caja/parser/quasiliteral/DefaultValijaRewriterTest.java View 2 chunks +84 lines, -1 line 0 comments Download
M tests/com/google/caja/plugin/stages/DebuggingSymbolsStageTest.java View 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 5
MarkM
18 years ago (2008-12-05 02:24:36 UTC) #1
MarkM
18 years ago (2008-12-05 02:29:32 UTC) #2
ben
Comments below. I confess I haven't really reviewed rule re-ordering. Also untested, but I'm about ...
18 years ago (2008-12-05 11:26:26 UTC) #3
MarkM
http://codereview.appspot.com/10044/diff/36/210 File src/com/google/caja/parser/quasiliteral/CajitaRewriter.java (right): http://codereview.appspot.com/10044/diff/36/210#newcode1174 Line 1174: Pair<Expression, Expression> rPair = reuse(nymize(r, propertyName, "meth"), scope, ...
18 years ago (2008-12-05 16:53:23 UTC) #4
MarkM
18 years ago (2008-12-05 22:34:46 UTC) #5
http://codereview.appspot.com/10044/diff/36/215
File src/com/google/caja/cajita.js (right):

http://codereview.appspot.com/10044/diff/36/215#newcode2342
Line 2342: handle: frozenFunc(function handleOnly(newModule){ return newModule;
})
On 2008/12/05 11:26:27, ben wrote:
> Why handleOnly?

Only to indicate that this is the atypical handle method -- which only returns
the module without invoking it.
Sign in to reply to this message.

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