|
|
|
Created:
15 years, 1 month ago by MarkM Modified:
14 years, 2 months ago CC:
google-caja-discuss_googlegroups.com Base URL:
http://google-caja.googlecode.com/svn/trunk/ Visibility:
Public. |
DescriptionEmulated ES-Harmony Proxies.
Offers our internal table as a WeakMap emulation.
Patch Set 1 #Patch Set 2 : Harmonious Proxies and WeakMaps. #Patch Set 3 : Harmonious Proxies and WeakMaps. #Patch Set 4 : Harmonious Proxies and WeakMaps. #Patch Set 5 : Harmonious Proxies and WeakMaps. #
Total comments: 16
Patch Set 6 : Harmonious Proxies and WeakMaps. #Patch Set 7 : Harmonious Proxies and WeakMaps. #Patch Set 8 : Harmonious Proxies and WeakMaps. #Patch Set 9 : Harmonious Proxies and WeakMaps. #Patch Set 10 : Harmonious Proxies and WeakMaps. #Patch Set 11 : Harmonious Proxies and WeakMaps. #Patch Set 12 : Harmonious Proxies and WeakMaps. #Patch Set 13 : Harmonious Proxies and WeakMaps. #Patch Set 14 : Harmonious Proxies and WeakMaps. #
Total comments: 2
Patch Set 15 : Harmonious Proxies and WeakMaps. #
MessagesTotal messages: 11
http://codereview.appspot.com/2225043/diff/10001/src/com/google/caja/es53.js File src/com/google/caja/es53.js (right): http://codereview.appspot.com/2225043/diff/10001/src/com/google/caja/es53.js#... src/com/google/caja/es53.js:47: Object.prototype.hasOwnProperty___ = Object.prototype.hasOwnProperty; I think the reversion from virtualize should happen as a separate change, since it applies to so much of the file. http://codereview.appspot.com/2225043/diff/10001/src/com/google/caja/es53.js#... src/com/google/caja/es53.js:177: var edIndex = aguments[2]; Bug in my code: edIndex should be endIndex http://codereview.appspot.com/2225043/diff/10001/src/com/google/caja/es53.js#... src/com/google/caja/es53.js:751: // Is there any reason even to log these? They are many, and There shouldn't be any; where are you seeing them? I was getting errors due to accidentally taming something in two ways, so I put this in. http://codereview.appspot.com/2225043/diff/10001/src/com/google/caja/es53.js#... src/com/google/caja/es53.js:921: // ES-Harmony proposal Include a link to the proposal http://codereview.appspot.com/2225043/diff/10001/src/com/google/caja/es53.js#... src/com/google/caja/es53.js:1443: proxy['ne___'] = false, Here and below, use . instead of ['...'] http://codereview.appspot.com/2225043/diff/10001/src/com/google/caja/es53.js#... src/com/google/caja/es53.js:1459: if (typeof trap === 'function') { What about regexps? http://codereview.appspot.com/2225043/diff/10001/src/com/google/caja/es53.js#... src/com/google/caja/es53.js:1611: proxy[p] = v; Did you mean to return here? http://codereview.appspot.com/2225043/diff/10001/src/com/google/caja/es53.js#... src/com/google/caja/es53.js:3155: var P = names[i]; yikes! good catch
Sign in to reply to this message.
http://codereview.appspot.com/2225043/diff/10001/src/com/google/caja/es53.js File src/com/google/caja/es53.js (right): http://codereview.appspot.com/2225043/diff/10001/src/com/google/caja/es53.js#... src/com/google/caja/es53.js:47: Object.prototype.hasOwnProperty___ = Object.prototype.hasOwnProperty; On 2010/09/23 20:56:02, metaweta wrote: > I think the reversion from virtualize should happen as a separate change, since > it applies to so much of the file. Done. http://codereview.appspot.com/2225043/diff/10001/src/com/google/caja/es53.js#... src/com/google/caja/es53.js:177: var edIndex = aguments[2]; On 2010/09/23 20:56:02, metaweta wrote: > Bug in my code: edIndex should be endIndex And aguments should be arguments. On the same line and we both missed it! Done. http://codereview.appspot.com/2225043/diff/10001/src/com/google/caja/es53.js#... src/com/google/caja/es53.js:751: // Is there any reason even to log these? They are many, and On 2010/09/23 20:56:02, metaweta wrote: > There shouldn't be any; where are you seeing them? I was getting errors due to > accidentally taming something in two ways, so I put this in. I don't remember. I'll instrument and re-run until I reproduce this. Or I'll revert. http://codereview.appspot.com/2225043/diff/10001/src/com/google/caja/es53.js#... src/com/google/caja/es53.js:921: // ES-Harmony proposal On 2010/09/23 20:56:02, metaweta wrote: > Include a link to the proposal Done. http://codereview.appspot.com/2225043/diff/10001/src/com/google/caja/es53.js#... src/com/google/caja/es53.js:1443: proxy['ne___'] = false, On 2010/09/23 20:56:02, metaweta wrote: > Here and below, use . instead of ['...'] Weird. I don't know why I did it that way. Done. http://codereview.appspot.com/2225043/diff/10001/src/com/google/caja/es53.js#... src/com/google/caja/es53.js:1459: if (typeof trap === 'function') { On 2010/09/23 20:56:02, metaweta wrote: > What about regexps? Added a TODO. Will get back to this. I think Tom's right -- the fundamental traps should error instead of defaulting. http://codereview.appspot.com/2225043/diff/10001/src/com/google/caja/es53.js#... src/com/google/caja/es53.js:1611: proxy[p] = v; On 2010/09/23 20:56:02, metaweta wrote: > Did you mean to return here? I did indeed. Done.
Sign in to reply to this message.
On Thu, Sep 23, 2010 at 9:59 PM, <erights@google.com> wrote: > > http://codereview.appspot.com/2225043/diff/10001/src/com/google/caja/es53.js#... > src/com/google/caja/es53.js:751: // Is there any reason even to log > these? They are many, and > On 2010/09/23 20:56:02, metaweta wrote: > >> There shouldn't be any; where are you seeing them? I was getting >> > errors due to > >> accidentally taming something in two ways, so I put this in. >> > > I don't remember. I'll instrument and re-run until I reproduce this. Or > I'll revert. The reason you weren't seeing these dups was that your previous line fn.f___ !== fn.apply was buggy. After I corrected to fn.f___ === fn.apply I saw the error. When I change the error report to simply logging dups, I see trace shown below. The reason for this is apparently that domita.js exportFields and applyAccessors will use the same function multiple times as getters and setters, i.e., as arguments to ___.useGetHandler and ___.useSetHandler. AFAICT, there's nothing wrong with that, so I'm preserving the absence of a diagnostic for this case. I will leave in an explanatory comment citing this email. Already tamed: function writeln(html) { tameDocWrite(concat(arguments), "\n"); } Already tamed: function write(html_varargs) { var htmlText = concat(arguments); if (!insertionPoint) { insertionPoint = base; } var lexer = html.makeSaxParser(documentWriter); lexer(htmlText); } Already tamed: function () { return tameDocument.body___.clientWidth; } Already tamed: function () { return tameDocument.body___.clientHeight; } Already tamed: function () { return tameDocument.body___.clientWidth; } Already tamed: function () { return tameDocument.body___.clientHeight; } Already tamed: function propertyOnlyHasGetter(_) { throw new TypeError("setting a property that only has a getter"); } Already tamed: function () { return tameDocument.body___.scrollWidth; } Already tamed: function propertyOnlyHasGetter(_) { throw new TypeError("setting a property that only has a getter"); } Already tamed: function () { return tameDocument.body___.scrollWidth; } Already tamed: function propertyOnlyHasGetter(_) { throw new TypeError("setting a property that only has a getter"); } Already tamed: function () { return tameDocument.body___.scrollWidth; } Already tamed: function propertyOnlyHasGetter(_) { throw new TypeError("setting a property that only has a getter"); } Already tamed: function propertyOnlyHasGetter(_) { throw new TypeError("setting a property that only has a getter"); } Already tamed: function () { return tameDocument.body___.scrollHeight; } Already tamed: function propertyOnlyHasGetter(_) { throw new TypeError("setting a property that only has a getter"); } Already tamed: function () { return tameDocument.body___.scrollHeight; } Already tamed: function propertyOnlyHasGetter(_) { throw new TypeError("setting a property that only has a getter"); } Already tamed: function () { return tameDocument.body___.scrollHeight; } Already tamed: function propertyOnlyHasGetter(_) { throw new TypeError("setting a property that only has a getter"); } Already tamed: function (y) { tameDocument.body___.scrollTop = + y; return y; } Already tamed: function () { return tameDocument.body___.scrollTop; } Already tamed: function (y) { tameDocument.body___.scrollTop = + y; return y; } Already tamed: function () { return tameDocument.body___.scrollTop; } Already tamed: function (y) { tameDocument.body___.scrollTop = + y; return y; } Already tamed: function () { return tameDocument.body___.scrollTop; } Already tamed: function (x) { tameDocument.body___.scrollLeft = + x; return x; } Already tamed: function () { return tameDocument.body___.scrollLeft; } Already tamed: function (x) { tameDocument.body___.scrollLeft = + x; return x; } Already tamed: function () { return tameDocument.body___.scrollLeft; } Already tamed: function (x) { tameDocument.body___.scrollLeft = + x; return x; } Already tamed: function () { return tameDocument.body___.scrollLeft; } Already tamed: function propertyOnlyHasGetter(_) { throw new TypeError("setting a property that only has a getter"); } Already tamed: function () { return tameDocument.body___.scrollTop; } Already tamed: function propertyOnlyHasGetter(_) { throw new TypeError("setting a property that only has a getter"); } Already tamed: function () { return tameDocument.body___.scrollTop; } Already tamed: function propertyOnlyHasGetter(_) { throw new TypeError("setting a property that only has a getter"); } Already tamed: function () { return tameDocument.body___.scrollTop; } Already tamed: function propertyOnlyHasGetter(_) { throw new TypeError("setting a property that only has a getter"); } Already tamed: function propertyOnlyHasGetter(_) { throw new TypeError("setting a property that only has a getter"); } Already tamed: function () { return tameDocument.body___.scrollLeft; } Already tamed: function propertyOnlyHasGetter(_) { throw new TypeError("setting a property that only has a getter"); } Already tamed: function () { return tameDocument.body___.scrollLeft; } Already tamed: function propertyOnlyHasGetter(_) { throw new TypeError("setting a property that only has a getter"); } Already tamed: function () { return tameDocument.body___.scrollLeft; } Already tamed: function propertyOnlyHasGetter(_) { throw new TypeError("setting a property that only has a getter"); } Already tamed: function propertyOnlyHasGetter(_) { throw new TypeError("setting a property that only has a getter"); } Already tamed: function () { return tameDocument.body___.offsetWidth; } Already tamed: function propertyOnlyHasGetter(_) { throw new TypeError("setting a property that only has a getter"); } Already tamed: function () { return tameDocument.body___.offsetWidth; } Already tamed: function propertyOnlyHasGetter(_) { throw new TypeError("setting a property that only has a getter"); } Already tamed: function () { return tameDocument.body___.offsetWidth; } Already tamed: function propertyOnlyHasGetter(_) { throw new TypeError("setting a property that only has a getter"); } Already tamed: function propertyOnlyHasGetter(_) { throw new TypeError("setting a property that only has a getter"); } Already tamed: function () { return tameDocument.body___.offsetHeight; } Already tamed: function propertyOnlyHasGetter(_) { throw new TypeError("setting a property that only has a getter"); } Already tamed: function () { return tameDocument.body___.offsetHeight; } Already tamed: function propertyOnlyHasGetter(_) { throw new TypeError("setting a property that only has a getter"); } Already tamed: function () { return tameDocument.body___.offsetHeight; } Already tamed: function propertyOnlyHasGetter(_) { throw new TypeError("setting a property that only has a getter"); } Already tamed: function propertyOnlyHasGetter(_) { throw new TypeError("setting a property that only has a getter"); } Already tamed: function () { return tameDocument.body___.offsetTop; } Already tamed: function propertyOnlyHasGetter(_) { throw new TypeError("setting a property that only has a getter"); } Already tamed: function () { return tameDocument.body___.offsetTop; } Already tamed: function propertyOnlyHasGetter(_) { throw new TypeError("setting a property that only has a getter"); } Already tamed: function () { return tameDocument.body___.offsetTop; } Already tamed: function propertyOnlyHasGetter(_) { throw new TypeError("setting a property that only has a getter"); } Already tamed: function propertyOnlyHasGetter(_) { throw new TypeError("setting a property that only has a getter"); } Already tamed: function () { return tameDocument.body___.offsetLeft; } Already tamed: function propertyOnlyHasGetter(_) { throw new TypeError("setting a property that only has a getter"); } Already tamed: function () { return tameDocument.body___.offsetLeft; } Already tamed: function propertyOnlyHasGetter(_) { throw new TypeError("setting a property that only has a getter"); } Already tamed: function () { return tameDocument.body___.offsetLeft; } Already tamed: function propertyOnlyHasGetter(_) { throw new TypeError("setting a property that only has a getter"); } Already tamed: function propertyOnlyHasGetter(_) { throw new TypeError("setting a property that only has a getter"); } Already tamed: function () { return tameDocument.body___.clientWidth; } Already tamed: function propertyOnlyHasGetter(_) { throw new TypeError("setting a property that only has a getter"); } Already tamed: function () { return tameDocument.body___.clientWidth; } Already tamed: function propertyOnlyHasGetter(_) { throw new TypeError("setting a property that only has a getter"); } Already tamed: function () { return tameDocument.body___.clientWidth; } Already tamed: function propertyOnlyHasGetter(_) { throw new TypeError("setting a property that only has a getter"); } Already tamed: function propertyOnlyHasGetter(_) { throw new TypeError("setting a property that only has a getter"); } Already tamed: function () { return tameDocument.body___.clientHeight; } Already tamed: function propertyOnlyHasGetter(_) { throw new TypeError("setting a property that only has a getter"); } Already tamed: function () { return tameDocument.body___.clientHeight; } Already tamed: function propertyOnlyHasGetter(_) { throw new TypeError("setting a property that only has a getter"); } Already tamed: function () { return tameDocument.body___.clientHeight; } Already tamed: function propertyOnlyHasGetter(_) { throw new TypeError("setting a property that only has a getter"); } Already tamed: function propertyOnlyHasGetter(_) { throw new TypeError("setting a property that only has a getter"); } Already tamed: function () { return tameDocument.body___.clientTop; } Already tamed: function propertyOnlyHasGetter(_) { throw new TypeError("setting a property that only has a getter"); } Already tamed: function () { return tameDocument.body___.clientTop; } Already tamed: function propertyOnlyHasGetter(_) { throw new TypeError("setting a property that only has a getter"); } Already tamed: function () { return tameDocument.body___.clientTop; } Already tamed: function propertyOnlyHasGetter(_) { throw new TypeError("setting a property that only has a getter"); } Already tamed: function propertyOnlyHasGetter(_) { throw new TypeError("setting a property that only has a getter"); } Already tamed: function () { return tameDocument.body___.clientLeft; } Already tamed: function propertyOnlyHasGetter(_) { throw new TypeError("setting a property that only has a getter"); } Already tamed: function () { return tameDocument.body___.clientLeft; } Already tamed: function propertyOnlyHasGetter(_) { throw new TypeError("setting a property that only has a getter"); } Already tamed: function () { return tameDocument.body___.clientLeft; } Already tamed: function funcBound(var_args) { var args = leftArgs.concat(slice.call(arguments, 0)); return thisFunc.apply(safeDis(self), args); } Already tamed: function propertyOnlyHasGetter(_) { throw new TypeError("setting a property that only has a getter"); } Already tamed: function () { return this.getGeometryDelegate___().scrollHeight; } Already tamed: function propertyOnlyHasGetter(_) { throw new TypeError("setting a property that only has a getter"); } Already tamed: function () { return this.getGeometryDelegate___().scrollWidth; } Already tamed: function (y) { if (!this.editable___) { throw new Error(NOT_EDITABLE); } this.getGeometryDelegate___().scrollTop = + y; return y; } Already tamed: function () { return this.getGeometryDelegate___().scrollTop; } Already tamed: function (x) { if (!this.editable___) { throw new Error(NOT_EDITABLE); } this.getGeometryDelegate___().scrollLeft = + x; return x; } Already tamed: function () { return this.getGeometryDelegate___().scrollLeft; } Already tamed: function propertyOnlyHasGetter(_) { throw new TypeError("setting a property that only has a getter"); } Already tamed: function () { return this.getGeometryDelegate___().offsetHeight; } Already tamed: function propertyOnlyHasGetter(_) { throw new TypeError("setting a property that only has a getter"); } Already tamed: function () { return this.getGeometryDelegate___().offsetWidth; } Already tamed: function propertyOnlyHasGetter(_) { throw new TypeError("setting a property that only has a getter"); } Already tamed: function () { return this.getGeometryDelegate___().offsetTop; } Already tamed: function propertyOnlyHasGetter(_) { throw new TypeError("setting a property that only has a getter"); } Already tamed: function () { return this.getGeometryDelegate___().offsetLeft; } Already tamed: function propertyOnlyHasGetter(_) { throw new TypeError("setting a property that only has a getter"); } Already tamed: function () { return this.getGeometryDelegate___().clientHeight; } Already tamed: function () { return this.getGeometryDelegate___().clientWidth; } Already tamed: function () { return this.tagName___; } Already tamed: function () { return this.innerHTMLGetter___(); } Already tamed: function () { return 1; } Already tamed: function () { return null; } Already tamed: function () { return this.tagName___; } Already tamed: function () { var children = this.getChildNodes___(); return children.length ? children[0] : null; } Already tamed: function () { var children = this.getChildNodes___(); return children.length ? children[children.length - 1] : null; } Already tamed: function () { var parentNode = this.getParentNode___(); if (!parentNode) { return null; } var siblings = parentNode.getChildNodes___(); for (var i = siblings.length - 1; --i >= 0;) { if (siblings[i] === this) { return siblings[i + 1]; } } return null; } Already tamed: function () { var parentNode = this.getParentNode___(); if (!parentNode) { return null; } var siblings = parentNode.getChildNodes___(); for (var i = siblings.length; --i >= 1;) { if (siblings[i] === this) { return siblings[i - 1]; } } return null; } Already tamed: function () { return this.parentNodeGetter___(); } Already tamed: function () { return this.tameDoc___; } Already tamed: function () { return this.childNodesGetter___(); } Already tamed: function () { return tameNodeList([], false, undefined); } Already tamed: function propertyOnlyHasGetter(_) { throw new TypeError("setting a property that only has a getter"); } Already tamed: function () { return this.getGeometryDelegate___().scrollHeight; } Already tamed: function propertyOnlyHasGetter(_) { throw new TypeError("setting a property that only has a getter"); } Already tamed: function () { return this.getGeometryDelegate___().scrollWidth; } Already tamed: function (y) { if (!this.editable___) { throw new Error(NOT_EDITABLE); } this.getGeometryDelegate___().scrollTop = + y; return y; } Already tamed: function () { return this.getGeometryDelegate___().scrollTop; } Already tamed: function (x) { if (!this.editable___) { throw new Error(NOT_EDITABLE); } this.getGeometryDelegate___().scrollLeft = + x; return x; } Already tamed: function () { return this.getGeometryDelegate___().scrollLeft; } Already tamed: function propertyOnlyHasGetter(_) { throw new TypeError("setting a property that only has a getter"); } Already tamed: function () { return this.getGeometryDelegate___().offsetHeight; } Already tamed: function propertyOnlyHasGetter(_) { throw new TypeError("setting a property that only has a getter"); } Already tamed: function () { return this.getGeometryDelegate___().offsetWidth; } Already tamed: function propertyOnlyHasGetter(_) { throw new TypeError("setting a property that only has a getter"); } Already tamed: function () { return this.getGeometryDelegate___().offsetTop; } Already tamed: function propertyOnlyHasGetter(_) { throw new TypeError("setting a property that only has a getter"); } Already tamed: function () { return this.getGeometryDelegate___().offsetLeft; } Already tamed: function propertyOnlyHasGetter(_) { throw new TypeError("setting a property that only has a getter"); } Already tamed: function () { return this.getGeometryDelegate___().clientHeight; } Already tamed: function () { return this.getGeometryDelegate___().clientWidth; } Already tamed: function () { return this.tagName___; } Already tamed: function () { return this.innerHTMLGetter___(); } Already tamed: function () { return 1; } Already tamed: function () { return null; } Already tamed: function () { return this.tagName___; } Already tamed: function () { var children = this.getChildNodes___(); return children.length ? children[0] : null; } Already tamed: function () { var children = this.getChildNodes___(); return children.length ? children[children.length - 1] : null; } Already tamed: function () { var parentNode = this.getParentNode___(); if (!parentNode) { return null; } var siblings = parentNode.getChildNodes___(); for (var i = siblings.length - 1; --i >= 0;) { if (siblings[i] === this) { return siblings[i + 1]; } } return null; } Already tamed: function () { var parentNode = this.getParentNode___(); if (!parentNode) { return null; } var siblings = parentNode.getChildNodes___(); for (var i = siblings.length; --i >= 1;) { if (siblings[i] === this) { return siblings[i - 1]; } } return null; } Already tamed: function () { return this.parentNodeGetter___(); } Already tamed: function () { return this.tameDoc___; } Already tamed: function () { return this.childNodesGetter___(); } Already tamed: function () { return tameNodeList([], false, undefined); } Already tamed: function propertyOnlyHasGetter(_) { throw new TypeError("setting a property that only has a getter"); } Already tamed: function () { return this.getGeometryDelegate___().scrollHeight; } Already tamed: function propertyOnlyHasGetter(_) { throw new TypeError("setting a property that only has a getter"); } Already tamed: function () { return this.getGeometryDelegate___().scrollWidth; } Already tamed: function (y) { if (!this.editable___) { throw new Error(NOT_EDITABLE); } this.getGeometryDelegate___().scrollTop = + y; return y; } Already tamed: function () { return this.getGeometryDelegate___().scrollTop; } Already tamed: function (x) { if (!this.editable___) { throw new Error(NOT_EDITABLE); } this.getGeometryDelegate___().scrollLeft = + x; return x; } Already tamed: function () { return this.getGeometryDelegate___().scrollLeft; } Already tamed: function propertyOnlyHasGetter(_) { throw new TypeError("setting a property that only has a getter"); } Already tamed: function () { return this.getGeometryDelegate___().offsetHeight; } Already tamed: function propertyOnlyHasGetter(_) { throw new TypeError("setting a property that only has a getter"); } Already tamed: function () { return this.getGeometryDelegate___().offsetWidth; } Already tamed: function propertyOnlyHasGetter(_) { throw new TypeError("setting a property that only has a getter"); } Already tamed: function () { return this.getGeometryDelegate___().offsetTop; } Already tamed: function propertyOnlyHasGetter(_) { throw new TypeError("setting a property that only has a getter"); } Already tamed: function () { return this.getGeometryDelegate___().offsetLeft; } Already tamed: function propertyOnlyHasGetter(_) { throw new TypeError("setting a property that only has a getter"); } Already tamed: function () { return this.getGeometryDelegate___().clientHeight; } Already tamed: function () { return this.getGeometryDelegate___().clientWidth; } Already tamed: function () { return this.tagName___; } Already tamed: function () { return this.innerHTMLGetter___(); } Already tamed: function () { return 1; } Already tamed: function () { return null; } Already tamed: function () { return this.tagName___; } Already tamed: function () { var children = this.getChildNodes___(); return children.length ? children[0] : null; } Already tamed: function () { var children = this.getChildNodes___(); return children.length ? children[children.length - 1] : null; } Already tamed: function () { var parentNode = this.getParentNode___(); if (!parentNode) { return null; } var siblings = parentNode.getChildNodes___(); for (var i = siblings.length - 1; --i >= 0;) { if (siblings[i] === this) { return siblings[i + 1]; } } return null; } Already tamed: function () { var parentNode = this.getParentNode___(); if (!parentNode) { return null; } var siblings = parentNode.getChildNodes___(); for (var i = siblings.length; --i >= 1;) { if (siblings[i] === this) { return siblings[i - 1]; } } return null; } Already tamed: function () { return this.parentNodeGetter___(); } Already tamed: function () { return this.tameDoc___; } Already tamed: function () { return this.childNodesGetter___(); } Already tamed: function () { return tameNodeList([], false, undefined); } Already tamed: function funcBound(var_args) { var args = leftArgs.concat(slice.call(arguments, 0)); return thisFunc.apply(safeDis(self), args); } Already tamed: function funcBound(var_args) { var args = leftArgs.concat(slice.call(arguments, 0)); return thisFunc.apply(safeDis(self), args); } Already tamed: function funcBound(var_args) { var args = leftArgs.concat(slice.call(arguments, 0)); return thisFunc.apply(safeDis(self), args); } Already tamed: function funcBound(var_args) { var args = leftArgs.concat(slice.call(arguments, 0)); return thisFunc.apply(safeDis(self), args); } Already tamed: function propertyOnlyHasGetter(_) { throw new TypeError("setting a property that only has a getter"); } Already tamed: function () { return this.getGeometryDelegate___().scrollHeight; } Already tamed: function propertyOnlyHasGetter(_) { throw new TypeError("setting a property that only has a getter"); } Already tamed: function () { return this.getGeometryDelegate___().scrollWidth; } Already tamed: function (y) { if (!this.editable___) { throw new Error(NOT_EDITABLE); } this.getGeometryDelegate___().scrollTop = + y; return y; } Already tamed: function () { return this.getGeometryDelegate___().scrollTop; } Already tamed: function (x) { if (!this.editable___) { throw new Error(NOT_EDITABLE); } this.getGeometryDelegate___().scrollLeft = + x; return x; } Already tamed: function () { return this.getGeometryDelegate___().scrollLeft; } Already tamed: function propertyOnlyHasGetter(_) { throw new TypeError("setting a property that only has a getter"); } Already tamed: function () { return this.getGeometryDelegate___().offsetHeight; } Already tamed: function propertyOnlyHasGetter(_) { throw new TypeError("setting a property that only has a getter"); } Already tamed: function () { return this.getGeometryDelegate___().offsetWidth; } Already tamed: function propertyOnlyHasGetter(_) { throw new TypeError("setting a property that only has a getter"); } Already tamed: function () { return this.getGeometryDelegate___().offsetTop; } Already tamed: function propertyOnlyHasGetter(_) { throw new TypeError("setting a property that only has a getter"); } Already tamed: function () { return this.getGeometryDelegate___().offsetLeft; } Already tamed: function propertyOnlyHasGetter(_) { throw new TypeError("setting a property that only has a getter"); } Already tamed: function () { return this.getGeometryDelegate___().clientHeight; } Already tamed: function () { return this.getGeometryDelegate___().clientWidth; } Already tamed: function () { return this.tagName___; } Already tamed: function () { var children = this.getChildNodes___(); return children.length ? children[0] : null; } Already tamed: function () { var children = this.getChildNodes___(); return children.length ? children[children.length - 1] : null; } Already tamed: function () { var parentNode = this.getParentNode___(); if (!parentNode) { return null; } var siblings = parentNode.getChildNodes___(); for (var i = siblings.length - 1; --i >= 0;) { if (siblings[i] === this) { return siblings[i + 1]; } } return null; } Already tamed: function () { var parentNode = this.getParentNode___(); if (!parentNode) { return null; } var siblings = parentNode.getChildNodes___(); for (var i = siblings.length; --i >= 1;) { if (siblings[i] === this) { return siblings[i - 1]; } } return null; } Already tamed: function propertyOnlyHasGetter(_) { throw new TypeError("setting a property that only has a getter"); } Already tamed: function propertyOnlyHasGetter(_) { throw new TypeError("setting a property that only has a getter"); } Already tamed: function propertyOnlyHasGetter(_) { throw new TypeError("setting a property that only has a getter"); } Already tamed: function propertyOnlyHasGetter(_) { throw new TypeError("setting a property that only has a getter"); } Already tamed: function propertyOnlyHasGetter(_) { throw new TypeError("setting a property that only has a getter"); } Already tamed: function propertyOnlyHasGetter(_) { throw new TypeError("setting a property that only has a getter"); } Already tamed: function propertyOnlyHasGetter(_) { throw new TypeError("setting a property that only has a getter"); } Already tamed: function () { return this.node___.nodeName; } Already tamed: function (newText) { if (!this.editable___) { throw new Error(NOT_EDITABLE); } var newTextStr = newText != null ? String(newText) : ""; var el = this.node___; for (var c; c = el.firstChild;) { el.removeChild(c); } if (newTextStr) { el.appendChild(el.ownerDocument.createTextNode(newTextStr)); } return newText; } Already tamed: function () { var text = []; innerTextOf(this.node___, text); return text.join(""); }
Sign in to reply to this message.
On Sat, Sep 25, 2010 at 8:28 PM, Mark S. Miller <erights@google.com> wrote: > On Thu, Sep 23, 2010 at 9:59 PM, <erights@google.com> wrote: > >> >> http://codereview.appspot.com/2225043/diff/10001/src/com/google/caja/es53.js#... >> src/com/google/caja/es53.js:751: // Is there any reason even to log >> these? They are many, and >> On 2010/09/23 20:56:02, metaweta wrote: >> >>> There shouldn't be any; where are you seeing them? I was getting >>> >> errors due to >> >>> accidentally taming something in two ways, so I put this in. >>> >> >> I don't remember. I'll instrument and re-run until I reproduce this. Or >> I'll revert. > > > The reason you weren't seeing these dups was that your previous line > fn.f___ !== fn.apply > was buggy. After I corrected to > fn.f___ === fn.apply > I saw the error. When I change the error report to simply logging dups, I > see trace shown below. > > The other possibility is that I misunderstand the purpose of your equality test and that it was not originally buggy. In which case my "fix" created the problem. Please advise. -- Cheers, --MarkM
Sign in to reply to this message.
A significant number of other changes as well. http://codereview.appspot.com/2225043/diff/10001/src/com/google/caja/es53.js File src/com/google/caja/es53.js (right): http://codereview.appspot.com/2225043/diff/10001/src/com/google/caja/es53.js#... src/com/google/caja/es53.js:751: // Is there any reason even to log these? They are many, and On 2010/09/24 04:59:10, Mark S. Miller wrote: > On 2010/09/23 20:56:02, metaweta wrote: > > There shouldn't be any; where are you seeing them? I was getting errors due > to > > accidentally taming something in two ways, so I put this in. > > I don't remember. I'll instrument and re-run until I reproduce this. Or I'll > revert. See https://groups.google.com/group/google-caja-discuss/msg/5b2692533f00637c
Sign in to reply to this message.
On 2010/09/26 03:28:28, Mark S. Miller wrote: > The reason you weren't seeing these dups was that your previous line > fn.f___ !== fn.apply > was buggy. After I corrected to > fn.f___ === fn.apply > I saw the error. When I change the error report to simply logging dups, I > see trace shown below. No, that's how I intended it; double-taming a simple function is harmless, but taming it one way and then accidentally taming it as a simple function later can break stuff.
Sign in to reply to this message.
On 2010/09/26 16:03:24, metaweta wrote: > On 2010/09/26 03:28:28, Mark S. Miller wrote: > > The reason you weren't seeing these dups was that your previous line > > fn.f___ !== fn.apply > > was buggy. After I corrected to > > fn.f___ === fn.apply > > I saw the error. When I change the error report to simply logging dups, I > > see trace shown below. > > No, that's how I intended it; double-taming a simple function is harmless, but > taming it one way and then accidentally taming it as a simple function later can > break stuff. Restored. Made the error a tad clearer.
Sign in to reply to this message.
One thing that will be necessary for submitting this is a bunch of proxy tests; they'll also help me understand better how the proxies are used.
Sign in to reply to this message.
http://codereview.appspot.com/2225043/diff/35001/src/com/google/caja/es53.js File src/com/google/caja/es53.js (right): http://codereview.appspot.com/2225043/diff/35001/src/com/google/caja/es53.js#... src/com/google/caja/es53.js:1016: * Is {@code P} and own property of {@code this}? "an", not "and"
Sign in to reply to this message.
http://codereview.appspot.com/2225043/diff/35001/src/com/google/caja/es53.js File src/com/google/caja/es53.js (right): http://codereview.appspot.com/2225043/diff/35001/src/com/google/caja/es53.js#... src/com/google/caja/es53.js:1016: * Is {@code P} and own property of {@code this}? On 2010/10/07 18:53:50, metaweta wrote: > "an", not "and" Done.
Sign in to reply to this message.
On 2010/10/07 19:17:45, MarkM wrote: > http://codereview.appspot.com/2225043/diff/35001/src/com/google/caja/es53.js > File src/com/google/caja/es53.js (right): > > http://codereview.appspot.com/2225043/diff/35001/src/com/google/caja/es53.js#... > src/com/google/caja/es53.js:1016: * Is {@code P} and own property of {@code > this}? > On 2010/10/07 18:53:50, metaweta wrote: > > "an", not "and" > > Done. This CL looks obsolete.
Sign in to reply to this message.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
