Ticket #681 (new task)

Opened 3 years ago

Think about reserved slots in pseudo-global

Reported by: Philip Owned by: Philip
Priority: If Time Permits Milestone: Backlog
Component: Core engine Keywords:
Cc:

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.

Note: See TracTickets for help on using tickets.