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

Issue 9078044: Domado: Require declaration of private state at construction time. (Closed)

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

Description

Each private state record is made non-extensible after the object has been constructed. Thus, all private fields must be created in the constructor. This should make it easier to review how the private namespace is being used. Incidental changes: * Rename .src to .scriptSrc to reduce the chances of a particularly dangerous name collision. * Remove dead old-style editability flag setting in HTMLIFrameElement. @r5400

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+28 lines, -4 lines) Patch
M src/com/google/caja/plugin/domado.js View 12 chunks +28 lines, -4 lines 0 comments Download

Messages

Total messages: 4
kpreid2
13 years ago (2013-05-04 01:03:54 UTC) #1
felix8a
lgtm, but I'm finding it awkward to verify that all privates have had preventExtensions called ...
13 years ago (2013-05-04 01:14:43 UTC) #2
kpreid2
On 2013/05/04 01:14:43, felix8a wrote: > lgtm, but I'm finding it awkward to verify that ...
13 years ago (2013-05-04 01:54:36 UTC) #3
felix8a
13 years ago (2013-05-06 16:29:13 UTC) #4
On 2013/05/04 01:54:36, kpreid2 wrote:
> On 2013/05/04 01:14:43, felix8a wrote:
> > lgtm, but I'm finding it awkward to verify that all privates have had
> > preventExtensions called at the right time. is there some way to have it
> happen
> > in just one place like amplify or a variant of amplify?
> 
> Unfortunately, there is no such place currently. Specifically, there is no
> general single place which is 'after the constructor is done', due to the
> presence of subtypes. In the case of tame nodes specifically, finishNode is
that
> single place (nodes are essentially created as finishNode(new
tamingCtor(node)))
> but there is no such place for all types-which-use-Confidence.
> 
> It would be nice if there *was* such a place. Do you have any suggestions for
> how to cause it to exist? I don't have any good ideas yet.

yeah, me neither. haven't yet thought of anything noticeably better than the
status quo
Sign in to reply to this message.

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