Opened 13 years ago

Closed 10 years ago

Last modified 10 years ago

#681 closed task (fixed)

Think about reserved slots in pseudo-global

Reported by: Philip Taylor Owned by:
Priority: If Time Permits Milestone: Alpha 16
Component: UI & Simulation Keywords:
Cc: Yves Patch:

Description

CGUI copies pseudo-global stuff from GPSEE modules, which also do

    /** Get the cached class prototypes sorted out in advance. Not guaranteed tracemonkey-future-proof. 
     *  Almost certainly requires eager standard class initialization on the true global.
     */
    for (key = 0; key < JSProto_LIMIT; key++)
    {
      jsval v;

      if (JS_GetReservedSlot(cx, realm->globalObject, key, &v) == JS_FALSE)
        return JS_FALSE;

      if (JS_SetReservedSlot(cx, moduleScope, key, v) == JS_FALSE)
        return JS_FALSE;
    }

which we don't. Apparently this might possibly cause tracer-interaction problems like

var a = new Array();
var b = [];
print(b instanceof Array === a instanceof Array)

giving false sometimes (similar with {} and Object).

Ought to test this and see if it's still a real problem, and if the reserved slot thing fixes it.

Change History (5)

comment:1 by historic_bruno, 11 years ago

Owner: Philip Taylor removed

comment:2 by historic_bruno, 10 years ago

Cc: Yves added

Was this indirectly fixed by the SpiderMonkey upgrade?

comment:3 by Yves, 10 years ago

Milestone: BacklogAlpha 17
Resolution: fixed
Status: newclosed

Indeed, this is was fixed in r14496. We don't use the approach with the pseudo-global and a per-page global anymore.

comment:4 by Yves, 10 years ago

Component: Core engineUI & Simulation

comment:5 by fabio, 10 years ago

Milestone: Alpha 17Alpha 16
Note: See TracTickets for help on using tickets.