Last Comment Bug 680428 - onEnterFrame does not work with tracejit
: onEnterFrame does not work with tracejit
Status: RESOLVED FIXED
[inbound]
:
Product: Core
Classification: Components
Component: JavaScript Engine (show other bugs)
: Other Branch
: x86 Mac OS X
: -- normal (vote)
: mozilla9
Assigned To: Jason Orendorff [:jorendorff]
:
Mentors:
: 677373 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-08-19 07:19 PDT by Jason Orendorff [:jorendorff]
Modified: 2011-08-25 04:57 PDT (History)
2 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
v1 (4.69 KB, patch)
2011-08-19 10:32 PDT, Jason Orendorff [:jorendorff]
no flags Details | Diff | Review
v2 (9.45 KB, patch)
2011-08-19 12:03 PDT, Jason Orendorff [:jorendorff]
dvander: review+
Details | Diff | Review

Description Jason Orendorff [:jorendorff] 2011-08-19 07:19:16 PDT
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'));
Comment 1 Jason Orendorff [:jorendorff] 2011-08-19 10:32:42 PDT
Created attachment 554465 [details] [diff] [review]
v1

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.
Comment 2 Jason Orendorff [:jorendorff] 2011-08-19 11:41:47 PDT
Comment on attachment 554465 [details] [diff] [review]
v1

Withdrawing. New patch in a sec.
Comment 3 Jason Orendorff [:jorendorff] 2011-08-19 12:03:45 PDT
Created attachment 554498 [details] [diff] [review]
v2

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.
Comment 4 Jason Orendorff [:jorendorff] 2011-08-23 13:02:00 PDT
http://hg.mozilla.org/integration/mozilla-inbound/rev/305a3a0e26fd
Comment 5 Jason Orendorff [:jorendorff] 2011-08-23 14:29:58 PDT
Probably fine, but backed out due to problems with patches for bug 673125.
Comment 6 Jason Orendorff [:jorendorff] 2011-08-24 16:53:27 PDT
http://hg.mozilla.org/integration/mozilla-inbound/rev/dad9e816d52d
Comment 7 Marco Bonardo [::mak] 2011-08-25 04:35:26 PDT
http://hg.mozilla.org/mozilla-central/rev/dad9e816d52d
Comment 8 Jason Orendorff [:jorendorff] 2011-08-25 04:57:00 PDT
*** Bug 677373 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.