Commit 8488c964 authored by darin's avatar darin

- fixed a null-dereference I ran into while trying to reproduce bug 3107351

        * kjs/function.h: Change ActivationImp constructor to take context parameter.
        * kjs/function.cpp: (ActivationImp::ActivationImp): Take context parameter,
	not execution state parameter.

        * kjs/internal.cpp: (ContextImp::ContextImp): Initialize activation object
	from context, not execution state, because the new context is not yet in the
	execution state.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2799 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 660071d4
2002-11-21 Darin Adler <darin@apple.com>
- fixed a null-dereference I ran into while trying to reproduce bug 3107351
* kjs/function.h: Change ActivationImp constructor to take context parameter.
* kjs/function.cpp: (ActivationImp::ActivationImp): Take context parameter,
not execution state parameter.
* kjs/internal.cpp: (ContextImp::ContextImp): Initialize activation object
from context, not execution state, because the new context is not yet in the
execution state.
2002-11-20 Darin Adler <darin@apple.com>
- added a feature for Richard to use in his back/forward cache
......
2002-11-21 Darin Adler <darin@apple.com>
- fixed a null-dereference I ran into while trying to reproduce bug 3107351
* kjs/function.h: Change ActivationImp constructor to take context parameter.
* kjs/function.cpp: (ActivationImp::ActivationImp): Take context parameter,
not execution state parameter.
* kjs/internal.cpp: (ContextImp::ContextImp): Initialize activation object
from context, not execution state, because the new context is not yet in the
execution state.
2002-11-20 Darin Adler <darin@apple.com>
- added a feature for Richard to use in his back/forward cache
......
2002-11-21 Darin Adler <darin@apple.com>
- fixed a null-dereference I ran into while trying to reproduce bug 3107351
* kjs/function.h: Change ActivationImp constructor to take context parameter.
* kjs/function.cpp: (ActivationImp::ActivationImp): Take context parameter,
not execution state parameter.
* kjs/internal.cpp: (ContextImp::ContextImp): Initialize activation object
from context, not execution state, because the new context is not yet in the
execution state.
2002-11-20 Darin Adler <darin@apple.com>
- added a feature for Richard to use in his back/forward cache
......
......@@ -331,8 +331,8 @@ ArgumentsImp::ArgumentsImp(ExecState *exec, FunctionImp *func, const List &args)
const ClassInfo ActivationImp::info = {"Activation", 0, 0, 0};
// ECMA 10.1.6
ActivationImp::ActivationImp(ExecState *exec)
: _context(exec->context().imp()), _argumentsObject(0)
ActivationImp::ActivationImp(ContextImp *context)
: _context(context), _argumentsObject(0)
{
// FIXME: Do we need to support enumerating the arguments property?
}
......
......@@ -100,7 +100,7 @@ namespace KJS {
class ActivationImp : public ObjectImp {
public:
ActivationImp(ExecState *exec);
ActivationImp(ContextImp *);
virtual Value get(ExecState *exec, const Identifier &propertyName) const;
virtual void put(ExecState *exec, const Identifier &propertyName, const Value &value, int attr = None);
......
......@@ -365,7 +365,7 @@ ContextImp::ContextImp(Object &glob, ExecState *exec, Object &thisV, CodeType ty
// create and initialize activation object (ECMA 10.1.6)
if (type == FunctionCode || type == AnonymousCode ) {
activation = Object(new ActivationImp(exec));
activation = Object(new ActivationImp(this));
variable = activation;
} else {
activation = Object();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment