Closed Bug 680428 Opened 13 years ago Closed 13 years ago

onEnterFrame does not work with tracejit

Categories

(Core :: JavaScript Engine, defect)

Other Branch
x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla9

People

(Reporter: jorendorff, Assigned: jorendorff)

References

Details

(Whiteboard: [inbound])

Attachments

(1 file, 1 obsolete file)

Debug mode needs to inhibit the tracejit.

var g = newGlobal('new-compartment');
g.eval("function f() { return 1; }\n");
var N = g.N = RUNLOOP + 2;
g.eval("function h() {\n" +
       "    for (var i = 0; i < N; i += f()) {}\n" +
       "}");
g.h(); // record loop

var dbg = Debugger(g);
var log = '';
dbg.onEnterFrame = function (frame) { log += frame.callee.name; };
g.h();
assertEq(log, 'h' + Array(N + 1).join('f'));
Attached patch v1 (obsolete) — Splinter Review
For some reason we had tests onEnterFrame-{01,02,03,05}.js but not 04. I renamed 05 to 04. That's why the patch looks I'm mangling 05. Actually it's a whole new test.
Assignee: general → jorendorff
Attachment #554465 - Flags: review?(dvander)
Comment on attachment 554465 [details] [diff] [review]
v1

Withdrawing. New patch in a sec.
Attachment #554465 - Flags: review?(dvander)
Attached patch v2Splinter Review
The actual operational difference between v1 and v2 is that v2 has this:

>     for (ThreadContextRange r(cx); !r.empty(); r.popFront()) {
>         JSContext *cx = r.front();
>+        if (cx->compartment == this) 
>             cx->updateJITEnabled();
>     }

But I also factored out ThreadContextRange since the #ifdefs made a big mess of that code.
Attachment #554465 - Attachment is obsolete: true
Attachment #554498 - Flags: review?(dvander)
Attachment #554498 - Flags: review?(dvander) → review+
Probably fine, but backed out due to problems with patches for bug 673125.
Whiteboard: [inbound]
http://hg.mozilla.org/mozilla-central/rev/dad9e816d52d
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla9
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: