|
|
|
[
Permlink
| « Hide
]
Benjamin Shine - 23/Aug/07 03:01 PM
I've tracked this down to a data loading problem; assigning to Henry for investigation.
This broke at r6134:
Change 20070817-ptw-3 by ptw@dueling-banjos.local on 2007-08-17 07:12:53 EDT in /Users/ptw/OpenLaszlo/wafflecone for http://svn.openlaszlo.org/openlaszlo/branches/wafflecone Summary: Remove `make` trampoline from Class system Bugs Fixed: Technical Reviewer: max (Message-ID: <46C62AAF.1070400@openlaszlo.org>) QA Reviewer: hminsky (pending) Details: LzDefs: Rework LzInheritedHash to not require .make. Class: Rework contstructors to call .initialize, .make retained for backwards-compatibility. Split out class validation code. Compiler: Remove passThroughNodes before dispatching. Print new expressions with correct associativity. JavascriptGenerator, JavascriptCompressor, CodeGenerator: Remove translation of new to .make Parser.jjt: Learn how to correctly parse a `new` expressions and maintain associativity. Tests: smokecheck in swf7, swf8, dhtml Simplified testcase that shows the issue - the red boxes only show up in debug mode.
Okay, so the testcase I attached is a stumper. Not sure why it starts failing as of r6134, or why the red boxes show up in DHTML debug mode, but don't show up in non-debug mode.
If I remove the indent constraint, the boxes show up. Maybe that is a clue?
Henry and I tracked it down to the rewrite of LzInheritedHash to operate without make. Henry discovered that either making sure the xtor function had a name (it is normally stripped in non-debug mode) or removing the setting of this.constructor inside that (which was really only intended for debugging), makes things work. Apparently there is something we don't know about setting the constructor property of instances, at least in some Javascript interpreters. This idiom is used elsewhere in our Class code to make inheritance and super calls work, so it apparently is ok, but only sometimes.
The simple fix is to just remove the this.constructor setting from the code (with a comment). But maybe it is better to not pretend that LzInheritedHash can be made with a new expression at all, to replace all those calls with something like makeInheritedHash which goes back to the simple portable mechanism we had before? The current implementation has to switch on as/js because as does not allow you to return a value from a constructor (still, even though it is called for by the standard). r6299 | ptw | 2007-08-31 10:23:13 -0400 (Fri, 31 Aug 2007) | 19 lines
Changed paths: M /openlaszlo/branches/wafflecone/WEB-INF/lps/lfc/core/LzDefs.lzs Change 20070830-ptw-B by ptw@dueling-banjos.local on 2007-08-30 17:11:24 EDT in /Users/ptw/OpenLaszlo/wafflecone-2 for http://svn.openlaszlo.org/openlaszlo/branches/wafflecone Summary: Make LzInheritedHash work again Bugs Fixed: Technical Reviewer: hqm (Message-ID: <8c61fad60708310706p6838294boa435d725ad86a44c@mail.gmail.com>) QA Reviewer: max (pending) Details: Don't try to set instance constructor, which seems to break Javascript Tests: Max's test case from Jira works correctly in non-debug DHTML Tested in r6938 on Safari 2.0.4, Opera 9.24 in DHTML and swf7. Hierarchical menus in navbar are rendered. VErified.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||