JSJavaScriptCallFrame.h [plain text]
#pragma once
#include "JSDestructibleObject.h"
#include "JavaScriptCallFrame.h"
namespace Inspector {
class JSJavaScriptCallFrame final : public JSC::JSDestructibleObject {
public:
typedef JSC::JSDestructibleObject Base;
static constexpr unsigned StructureFlags = Base::StructureFlags;
DECLARE_INFO;
static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
{
return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
}
static JSJavaScriptCallFrame* create(JSC::VM& vm, JSC::Structure* structure, Ref<JavaScriptCallFrame>&& impl)
{
JSJavaScriptCallFrame* instance = new (NotNull, JSC::allocateCell<JSJavaScriptCallFrame>(vm.heap)) JSJavaScriptCallFrame(vm, structure, WTFMove(impl));
instance->finishCreation(vm);
return instance;
}
static JSC::JSObject* createPrototype(JSC::VM&, JSC::JSGlobalObject*);
static void destroy(JSC::JSCell*);
JavaScriptCallFrame& impl() const { return *m_impl; }
void releaseImpl();
JSC::JSValue evaluateWithScopeExtension(JSC::JSGlobalObject*, JSC::CallFrame*);
JSC::JSValue scopeDescriptions(JSC::JSGlobalObject*);
JSC::JSValue caller(JSC::JSGlobalObject*) const;
JSC::JSValue sourceID(JSC::JSGlobalObject*) const;
JSC::JSValue line(JSC::JSGlobalObject*) const;
JSC::JSValue column(JSC::JSGlobalObject*) const;
JSC::JSValue functionName(JSC::JSGlobalObject*) const;
JSC::JSValue scopeChain(JSC::JSGlobalObject*) const;
JSC::JSValue thisObject(JSC::JSGlobalObject*) const;
JSC::JSValue type(JSC::JSGlobalObject*) const;
JSC::JSValue isTailDeleted(JSC::JSGlobalObject*) const;
static constexpr unsigned short GLOBAL_SCOPE = 0;
static constexpr unsigned short WITH_SCOPE = 1;
static constexpr unsigned short CLOSURE_SCOPE = 2;
static constexpr unsigned short CATCH_SCOPE = 3;
static constexpr unsigned short FUNCTION_NAME_SCOPE = 4;
static constexpr unsigned short GLOBAL_LEXICAL_ENVIRONMENT_SCOPE = 5;
static constexpr unsigned short NESTED_LEXICAL_SCOPE = 6;
protected:
void finishCreation(JSC::VM&);
private:
JSJavaScriptCallFrame(JSC::VM&, JSC::Structure*, Ref<JavaScriptCallFrame>&&);
~JSJavaScriptCallFrame();
JavaScriptCallFrame* m_impl;
};
JSC::JSValue toJS(JSC::JSGlobalObject*, JSC::JSGlobalObject*, JavaScriptCallFrame*);
}