Closed
Bug 662069
Opened 15 years ago
Closed 1 year ago
Minor JSBench bugs
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
INCOMPLETE
People
(Reporter: bhackett1024, Unassigned)
References
Details
Attachments
(4 files)
Track some minor issues found while trying out JSBench.
| Reporter | ||
Comment 1•15 years ago
|
||
Replay from loading google.com and then replaying with -O uremv. When generating the callArgs arrays used to verify calls, references to undefined variables appear, e.g. 'o69'.
| Reporter | ||
Comment 2•15 years ago
|
||
Removing the 'm' flag fixes the undefined variables, but then during replay there are errors triggered by verifySet (e.g. 'o75.height is not "100px", it's undefined!'). The problem may be that the verifySet calls are emitted before the code on the page is geval'ed, as if I move the verifySet calls to the end all the properties searched for are now in place with the right value.
| Reporter | ||
Comment 3•15 years ago
|
||
Boilerplate fixes to get the google.com replay working in the shell without modification. window.top was undefined, and the browser-but-not-shell builtin Image was undefined (I'm sure there are a bazillion more of these, but this is the only one used on google.com).
Attachment #537371 -
Flags: review?(gkrichar)
Comment 4•15 years ago
|
||
At present the 'v' option isn't compatible with various other modes, simply because I didnAt yet work to preserve verification-relevant information in them. urv is about the most sophisticated mode that ought to work. More could work, I just haven't gotten around to making them work.
Comment 5•15 years ago
|
||
Probably a better solution for Image would be to add it to the list of instrumented names. See instrumentation/objects.js. The "do" and "don't"
Comment 6•15 years ago
|
||
Probably a better solution for Image would be to add it to the list of instrumented names. See instrumentation/objects.js. The "do" and "don't" instrument lists are decided in a somewhat ad-hoc way, basically global types don't get instrumented, but global objects do. It was done that way when things were much buggier, probably the vast majority could be instrumented now.
| Reporter | ||
Comment 7•15 years ago
|
||
OK, next thing I've been trying is the AWFY assorted page (A smaller version of the breakdown page that is causing problems in bug 662082):
http://arewefastyet.com/?a=b&view=assorted
The first time I tried to record I got a 'window is undefined' exception. Moving 'window' from dontInstrument to doInstrument in objects.js fixed this, but I don't know if mucking with that is advised. After that, recording spun a while and then gave a syntax error ('unrecognized expression: >' with no file/line, d'oh).
Trying to replay that syntax error with -O ur gave me a few new problems (could these have been caused by the window change above?). Replay .js attached. The navigator object 'o30' is assigned to the window before being created, and is constructed a second time later before giving it the userAgent property.
window.JSBNG__navigator = o30;
o30 = {};
...
o30 = {};
...
o30.userAgent = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:6.0a1) Gecko/20110603
Fixing those ran into another problem where the script calls createDocumentFragment three times but only two calls were recorded. Don't know which is correct, need to dig some more.
Comment 8•15 years ago
|
||
You got "window is undefined" at /record/ time??? That's ... terrifying? I'll look into that tomorrow if I can catch a few minutes of time.
In general it's safe to move things between doInstrument and dontInstrument (with the obvious caveat that anything you move do -> dont won't be instrumented), but window is the exception to that rule, as the instrumentation doesn't know about its unique semantics (being both the global scope and a nameable object). Besides, if you instrument it then references at replay time will be replaced with mock objects, which is rather silly for the global scope :)
Comment 9•15 years ago
|
||
OK, I fixed that as well as merging in the iframes branch (it had all bugfixes that were related to interframe communication, even if the bug showed up with iframes disabled). iframes are still disabled by default (and should be, they're not "there" yet), but you may find more success with it.
The AWFY assorted page is now giving me a truly bizarre error (regex too complex???), I'll keep hunting :)
| Reporter | ||
Updated•15 years ago
|
Attachment #537371 -
Flags: review?(gkrichar)
| Assignee | ||
Updated•12 years ago
|
Assignee: general → nobody
Updated•4 years ago
|
Severity: normal → S3
Updated•1 year ago
|
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → INCOMPLETE
You need to log in
before you can comment on or make changes to this bug.
Description
•