summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/runtime/JSWithScope.h
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
committerLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
commit1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch)
tree46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/JavaScriptCore/runtime/JSWithScope.h
parent32761a6cee1d0dee366b885b7b9c777e67885688 (diff)
downloadWebKitGtk-tarball-master.tar.gz
Diffstat (limited to 'Source/JavaScriptCore/runtime/JSWithScope.h')
-rw-r--r--Source/JavaScriptCore/runtime/JSWithScope.h49
1 files changed, 5 insertions, 44 deletions
diff --git a/Source/JavaScriptCore/runtime/JSWithScope.h b/Source/JavaScriptCore/runtime/JSWithScope.h
index 9b7e1826d..39e09e3c3 100644
--- a/Source/JavaScriptCore/runtime/JSWithScope.h
+++ b/Source/JavaScriptCore/runtime/JSWithScope.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2012 Apple Inc. All Rights Reserved.
+ * Copyright (C) 2012, 2016 Apple Inc. All Rights Reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -23,8 +23,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef JSWithScope_h
-#define JSWithScope_h
+#pragma once
#include "JSGlobalObject.h"
@@ -34,58 +33,20 @@ class JSWithScope : public JSScope {
public:
typedef JSScope Base;
- static JSWithScope* create(ExecState* exec, JSObject* object)
- {
- JSWithScope* withScope = new (NotNull, allocateCell<JSWithScope>(*exec->heap())) JSWithScope(exec, object);
- withScope->finishCreation(exec->vm());
- return withScope;
- }
-
- static JSWithScope* create(ExecState* exec, JSObject* object, JSScope* next)
- {
- JSWithScope* withScope = new (NotNull, allocateCell<JSWithScope>(*exec->heap())) JSWithScope(exec, object, next);
- withScope->finishCreation(exec->vm());
- return withScope;
- }
+ JS_EXPORT_PRIVATE static JSWithScope* create(VM&, JSGlobalObject*, JSObject*, JSScope* next);
JSObject* object() { return m_object.get(); }
static void visitChildren(JSCell*, SlotVisitor&);
- static Structure* createStructure(VM& vm, JSGlobalObject* globalObject, JSValue proto)
- {
- return Structure::create(vm, globalObject, proto, TypeInfo(WithScopeType, StructureFlags), info());
- }
+ static Structure* createStructure(VM&, JSGlobalObject*, JSValue proto);
DECLARE_EXPORT_INFO;
-protected:
- static const unsigned StructureFlags = OverridesVisitChildren | Base::StructureFlags;
-
private:
- JSWithScope(ExecState* exec, JSObject* object)
- : Base(
- exec->vm(),
- exec->lexicalGlobalObject()->withScopeStructure(),
- exec->scope()
- )
- , m_object(exec->vm(), this, object)
- {
- }
-
- JSWithScope(ExecState* exec, JSObject* object, JSScope* next)
- : Base(
- exec->vm(),
- exec->lexicalGlobalObject()->withScopeStructure(),
- next
- )
- , m_object(exec->vm(), this, object)
- {
- }
+ JSWithScope(VM&, Structure*, JSObject*, JSScope* next);
WriteBarrier<JSObject> m_object;
};
} // namespace JSC
-
-#endif // JSWithScope_h