diff options
Diffstat (limited to 'src/3rdparty/webkit/JavaScriptCore')
-rw-r--r-- | src/3rdparty/webkit/JavaScriptCore/interpreter/Interpreter.cpp | 16 | ||||
-rw-r--r-- | src/3rdparty/webkit/JavaScriptCore/runtime/JSObject.cpp | 5 |
2 files changed, 19 insertions, 2 deletions
diff --git a/src/3rdparty/webkit/JavaScriptCore/interpreter/Interpreter.cpp b/src/3rdparty/webkit/JavaScriptCore/interpreter/Interpreter.cpp index d9c5cda..d006b53 100644 --- a/src/3rdparty/webkit/JavaScriptCore/interpreter/Interpreter.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/interpreter/Interpreter.cpp @@ -69,6 +69,10 @@ #include "AssemblerBuffer.h" #endif +#ifdef QT_BUILD_SCRIPT_LIB +#include "bridge/qscriptobject_p.h" +#endif + using namespace std; namespace JSC { @@ -3468,8 +3472,12 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi structure = asObject(prototype)->inheritorID(); else structure = callDataScopeChain->globalObject()->emptyObjectStructure(); +#ifdef QT_BUILD_SCRIPT_LIB + // ### world-class hack + QScriptObject* newObject = new (globalData) QScriptObject(structure); +#else JSObject* newObject = new (globalData) JSObject(structure); - +#endif callFrame[thisRegister] = JSValue(newObject); // "this" value CallFrame* previousCallFrame = callFrame; @@ -3502,8 +3510,12 @@ JSValue Interpreter::privateExecute(ExecutionFlag flag, RegisterFile* registerFi structure = asObject(prototype)->inheritorID(); else structure = scopeChain->globalObject()->emptyObjectStructure(); +#ifdef QT_BUILD_SCRIPT_LIB + // ### world-class hack + QScriptObject* newObject = new (globalData) QScriptObject(structure); +#else JSObject* newObject = new (globalData) JSObject(structure); - +#endif callFrame[thisRegister] = JSValue(newObject); // "this" value CallFrame* newCallFrame = CallFrame::create(callFrame->registers() + registerOffset); diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/JSObject.cpp b/src/3rdparty/webkit/JavaScriptCore/runtime/JSObject.cpp index 415c25d..a54c322 100644 --- a/src/3rdparty/webkit/JavaScriptCore/runtime/JSObject.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/runtime/JSObject.cpp @@ -524,7 +524,12 @@ NEVER_INLINE void JSObject::fillGetterPropertySlot(PropertySlot& slot, JSValue* Structure* JSObject::createInheritorID() { +#ifdef QT_BUILD_SCRIPT_LIB + // ### QtScript needs the hasOwnProperty() calls etc. for QScriptObject + m_inheritorID = Structure::create(this, TypeInfo(ObjectType, ImplementsHasInstance)); +#else m_inheritorID = JSObject::createStructure(this); +#endif return m_inheritorID.get(); } |