Closed Bug 662069 Opened 15 years ago Closed 1 year ago

Minor JSBench bugs

Categories

(Core :: JavaScript Engine, defect)

x86
macOS
defect

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: bhackett1024, Unassigned)

References

Details

Attachments

(4 files)

Track some minor issues found while trying out JSBench.
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'.
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.
Attached patch console patch — — Splinter Review
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)
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.
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"
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.
Attached file awfy replay with -O ur —
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.
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 :)
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 :)
Attachment #537371 - Flags: review?(gkrichar)
Assignee: general → nobody
Severity: normal → S3
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.

Attachment

General

Created:
Updated:
Size: