mirror of
https://github.com/oven-sh/bun
synced 2026-02-11 19:38:58 +00:00
Mark some things as not configurable
This commit is contained in:
@@ -7,6 +7,7 @@ export default [
|
||||
noConstructor: true,
|
||||
finalize: true,
|
||||
hasPendingActivity: true,
|
||||
configurable: false,
|
||||
klass: {},
|
||||
JSType: "0b11101110",
|
||||
proto: {
|
||||
|
||||
@@ -6,6 +6,7 @@ const named = names.map(name => {
|
||||
name: name,
|
||||
construct: true,
|
||||
finalize: true,
|
||||
configurable: false,
|
||||
klass: {
|
||||
hash: {
|
||||
fn: "hash",
|
||||
|
||||
@@ -6,7 +6,7 @@ export default [
|
||||
construct: true,
|
||||
finalize: true,
|
||||
JSType: "0b11101110",
|
||||
|
||||
configurable: false,
|
||||
proto: {
|
||||
match: {
|
||||
fn: "match",
|
||||
|
||||
@@ -6,6 +6,7 @@ function generate(ssl) {
|
||||
JSType: "0b11101110",
|
||||
hasPendingActivity: true,
|
||||
noConstructor: true,
|
||||
configurable: false,
|
||||
proto: {
|
||||
write: {
|
||||
fn: "write",
|
||||
|
||||
@@ -6,6 +6,7 @@ export default [
|
||||
construct: true,
|
||||
finalize: true,
|
||||
hasPendingActivity: false,
|
||||
configurable: false,
|
||||
klass: {},
|
||||
JSType: "0b11101110",
|
||||
proto: {
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1037,6 +1037,64 @@ public:
|
||||
mutable JSC::WriteBarrier<JSC::Unknown> m_remoteAddress;
|
||||
};
|
||||
|
||||
class JSStats final : public JSC::JSDestructibleObject {
|
||||
public:
|
||||
using Base = JSC::JSDestructibleObject;
|
||||
static JSStats* create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure, void* ctx);
|
||||
|
||||
DECLARE_EXPORT_INFO;
|
||||
template<typename, JSC::SubspaceAccess mode> static JSC::GCClient::IsoSubspace* subspaceFor(JSC::VM& vm)
|
||||
{
|
||||
if constexpr (mode == JSC::SubspaceAccess::Concurrently)
|
||||
return nullptr;
|
||||
return WebCore::subspaceForImpl<JSStats, WebCore::UseCustomHeapCellType::No>(
|
||||
vm,
|
||||
[](auto& spaces) { return spaces.m_clientSubspaceForStats.get(); },
|
||||
[](auto& spaces, auto&& space) { spaces.m_clientSubspaceForStats = WTFMove(space); },
|
||||
[](auto& spaces) { return spaces.m_subspaceForStats.get(); },
|
||||
[](auto& spaces, auto&& space) { spaces.m_subspaceForStats = WTFMove(space); });
|
||||
}
|
||||
|
||||
static void destroy(JSC::JSCell*);
|
||||
static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
|
||||
{
|
||||
return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(static_cast<JSC::JSType>(ObjectType), StructureFlags), info());
|
||||
}
|
||||
|
||||
static JSObject* createPrototype(VM& vm, JSDOMGlobalObject* globalObject);
|
||||
static JSObject* createConstructor(VM& vm, JSGlobalObject* globalObject, JSValue prototype);
|
||||
|
||||
~JSStats();
|
||||
|
||||
void* wrapped() const { return m_ctx; }
|
||||
|
||||
void detach()
|
||||
{
|
||||
m_ctx = nullptr;
|
||||
}
|
||||
|
||||
static void analyzeHeap(JSCell*, JSC::HeapAnalyzer&);
|
||||
static ptrdiff_t offsetOfWrapped() { return OBJECT_OFFSETOF(JSStats, m_ctx); }
|
||||
|
||||
void* m_ctx { nullptr };
|
||||
|
||||
JSStats(JSC::VM& vm, JSC::Structure* structure, void* sinkPtr)
|
||||
: Base(vm, structure)
|
||||
{
|
||||
m_ctx = sinkPtr;
|
||||
}
|
||||
|
||||
void finishCreation(JSC::VM&);
|
||||
|
||||
DECLARE_VISIT_CHILDREN;
|
||||
template<typename Visitor> void visitAdditionalChildren(Visitor&);
|
||||
DECLARE_VISIT_OUTPUT_CONSTRAINTS;
|
||||
|
||||
mutable JSC::WriteBarrier<JSC::Unknown> m_atime;
|
||||
mutable JSC::WriteBarrier<JSC::Unknown> m_ctime;
|
||||
mutable JSC::WriteBarrier<JSC::Unknown> m_mtime;
|
||||
};
|
||||
|
||||
class JSSubprocess final : public JSC::JSDestructibleObject {
|
||||
public:
|
||||
using Base = JSC::JSDestructibleObject;
|
||||
|
||||
@@ -8,6 +8,7 @@ export default [
|
||||
finalize: true,
|
||||
JSType: "0b11101110",
|
||||
values: ["capturedValue", "resultValue"],
|
||||
configurable: false,
|
||||
klass: {
|
||||
extend: {
|
||||
fn: "extend",
|
||||
|
||||
@@ -6,6 +6,7 @@ export default [
|
||||
construct: true,
|
||||
finalize: true,
|
||||
JSType: "0b11101110",
|
||||
configurable: false,
|
||||
klass: {},
|
||||
proto: {
|
||||
encoding: {
|
||||
|
||||
@@ -8,6 +8,7 @@ export default [
|
||||
klass: {},
|
||||
JSType: "0b11101110",
|
||||
estimatedSize: true,
|
||||
configurable: false,
|
||||
proto: {
|
||||
text: { fn: "getText" },
|
||||
json: { fn: "getJSON" },
|
||||
@@ -60,6 +61,7 @@ export default [
|
||||
construct: true,
|
||||
finalize: true,
|
||||
JSType: "0b11101110",
|
||||
configurable: false,
|
||||
estimatedSize: true,
|
||||
klass: {
|
||||
json: {
|
||||
@@ -116,6 +118,7 @@ export default [
|
||||
finalize: true,
|
||||
JSType: "0b11101110",
|
||||
klass: {},
|
||||
configurable: false,
|
||||
proto: {
|
||||
text: { fn: "getText" },
|
||||
json: { fn: "getJSON" },
|
||||
|
||||
Reference in New Issue
Block a user