mirror of
https://github.com/roytam1/palemoon27.git
synced 2026-05-26 23:06:52 +00:00
0657c00b25
- Bug 1181869 - Update Bindings to use normal Rooted primitives; r=shu (b5356d1610) - Bug 1182124 - Remove InternalHandle and its last use; r=bbouvier (3ea8a6e41a) - Bug 1189490 - Part 2: Stop using mozilla::LinkedList for the allocations and tenure promotions logs and use js::TraceableFifo instead. r=terrence (d383bb76e5) - Bug 1189490 - Follow ups: Move [Traceable]Fifo to js/src/ds. r=terrence (89e18e65bf) - Bug 1189809 - Remove the ill-fated DynamicTraceable; r=jonco (e1821ecdc4) - Bug 1181292 - Make JSPropertyDescriptor a StaticTraceable; r=efaust (a9efa1a42d) - Bug 1191756: Improve tests to not always exit with status 3 (OOM); r=jonco (5f6bc24914) - Bug 1192242 - Adjust the button design in some circumstances. r=Gijs (4a642459cd) - bug 1162654 - allow proxies to implement the document interface r=davidb (33fd1a5ed2) - Bug 1167409 - 4/4 - Inititalize ScriptSourceObject even when off-main-thread compilation fails. r=smaug (0a83446019) - Bug 1176880 part 1 - Add a flag on the Debugger & Compartment to record code-coverage information. r=shu (160fc0321d) - missing parts of Bug 1254164 - Make aliasedBodyLevelLexicalBegin a uint32. (6c8129c0e1) - Bug 1176880 part 2 - Add Debugger.Script.getOffsetsCoverage. r=shu (5024d2e99b) - Bug 1176880 part 3 - Debugger.Script.getOffsetsCoverage: Add documentation. r=shu (d3d4af6d7c) - js: export JSPropertyDescriptor struct, fix build with --enable-shared-js specified
62 lines
1.8 KiB
C++
62 lines
1.8 KiB
C++
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
|
* vim: set ts=8 sts=4 et sw=4 tw=99:
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
#include "builtin/ModuleObject.h"
|
|
|
|
#include "jsobjinlines.h"
|
|
|
|
using namespace js;
|
|
|
|
///////////////////////////////////////////////////////////////////////////
|
|
// ModuleObject
|
|
|
|
const Class ModuleObject::class_ = {
|
|
"Module",
|
|
JSCLASS_HAS_RESERVED_SLOTS(ModuleObject::SlotCount) |
|
|
JSCLASS_IS_ANONYMOUS |
|
|
JSCLASS_IMPLEMENTS_BARRIERS,
|
|
nullptr, /* addProperty */
|
|
nullptr, /* delProperty */
|
|
nullptr, /* getProperty */
|
|
nullptr, /* setProperty */
|
|
nullptr, /* enumerate */
|
|
nullptr, /* resolve */
|
|
nullptr, /* mayResolve */
|
|
nullptr, /* convert */
|
|
nullptr, /* finalize */
|
|
nullptr, /* call */
|
|
nullptr, /* hasInstance */
|
|
nullptr, /* construct */
|
|
ModuleObject::trace
|
|
};
|
|
|
|
/* static */ ModuleObject*
|
|
ModuleObject::create(ExclusiveContext* cx)
|
|
{
|
|
return NewBuiltinClassInstance<ModuleObject>(cx, TenuredObject);
|
|
}
|
|
|
|
void
|
|
ModuleObject::init(HandleScript script)
|
|
{
|
|
initReservedSlot(ScriptSlot, PrivateValue(script));
|
|
}
|
|
|
|
JSScript*
|
|
ModuleObject::script() const
|
|
{
|
|
return static_cast<JSScript*>(getReservedSlot(ScriptSlot).toPrivate());
|
|
}
|
|
|
|
/* static */ void
|
|
ModuleObject::trace(JSTracer* trc, JSObject* obj)
|
|
{
|
|
ModuleObject& module = obj->as<ModuleObject>();
|
|
JSScript* script = module.script();
|
|
TraceManuallyBarrieredEdge(trc, &script, "Module script");
|
|
module.setReservedSlot(ScriptSlot, PrivateValue(script));
|
|
}
|