コード例 #1
0
bool
IndirectBindingMap::putNew(JSContext* cx, HandleId name,
                           HandleModuleEnvironmentObject environment, HandleId localName)
{
    RootedShape shape(cx, environment->lookup(cx, localName));
    MOZ_ASSERT(shape);
    return map_.putNew(name, Binding(environment, shape));
}
コード例 #2
0
ファイル: ModuleObject.cpp プロジェクト: bslassey/spidernode
bool
IndirectBindingMap::putNew(JSContext* cx, HandleId name,
                           HandleModuleEnvironmentObject environment, HandleId localName)
{
    RootedShape shape(cx, environment->lookup(cx, localName));
    MOZ_ASSERT(shape);
    if (!map_.putNew(name, Binding(environment, shape))) {
        ReportOutOfMemory(cx);
        return false;
    }

    return true;
}