X-Git-Url: https://git.saurik.com/apple/javascriptcore.git/blobdiff_plain/14957cd040308e3eeec43d26bae5d76da13fcd85..refs/heads/master:/runtime/StrictEvalActivation.cpp?ds=inline diff --git a/runtime/StrictEvalActivation.cpp b/runtime/StrictEvalActivation.cpp index e666dee..4260e10 100644 --- a/runtime/StrictEvalActivation.cpp +++ b/runtime/StrictEvalActivation.cpp @@ -26,26 +26,34 @@ #include "config.h" #include "StrictEvalActivation.h" +#include "JSGlobalObject.h" +#include "JSCInlines.h" + namespace JSC { -StrictEvalActivation::StrictEvalActivation(ExecState* exec) - : JSNonFinalObject(exec->globalData(), exec->globalData().strictEvalActivationStructure.get()) +STATIC_ASSERT_IS_TRIVIALLY_DESTRUCTIBLE(StrictEvalActivation); + +const ClassInfo StrictEvalActivation::s_info = { "Object", &Base::s_info, 0, CREATE_METHOD_TABLE(StrictEvalActivation) }; + +StrictEvalActivation::StrictEvalActivation(ExecState* exec, JSScope* currentScope) + : Base( + exec->vm(), + exec->lexicalGlobalObject()->strictEvalActivationStructure(), + currentScope + ) { } -bool StrictEvalActivation::deleteProperty(ExecState*, const Identifier&) +bool StrictEvalActivation::deleteProperty(JSCell*, ExecState*, PropertyName) { return false; } -JSObject* StrictEvalActivation::toThisObject(ExecState* exec) const +JSValue StrictEvalActivation::toThis(JSCell*, ExecState* exec, ECMAMode ecmaMode) { + if (ecmaMode == StrictMode) + return jsUndefined(); return exec->globalThisValue(); } -JSValue StrictEvalActivation::toStrictThisObject(ExecState*) const -{ - return jsNull(); -} - }