summaryrefslogtreecommitdiff
path: root/Source/WebKit2/WebProcess/Plugins/Netscape/NPJSObject.cpp
diff options
context:
space:
mode:
authorKonstantin Tokarev <annulen@yandex.ru>2016-08-25 19:20:41 +0300
committerKonstantin Tokarev <annulen@yandex.ru>2017-02-02 12:30:55 +0000
commit6882a04fb36642862b11efe514251d32070c3d65 (patch)
treeb7959826000b061fd5ccc7512035c7478742f7b0 /Source/WebKit2/WebProcess/Plugins/Netscape/NPJSObject.cpp
parentab6df191029eeeb0b0f16f127d553265659f739e (diff)
downloadqtwebkit-6882a04fb36642862b11efe514251d32070c3d65.tar.gz
Imported QtWebKit TP3 (git b57bc6801f1876c3220d5a4bfea33d620d477443)
Change-Id: I3b1d8a2808782c9f34d50240000e20cb38d3680f Reviewed-by: Konstantin Tokarev <annulen@yandex.ru>
Diffstat (limited to 'Source/WebKit2/WebProcess/Plugins/Netscape/NPJSObject.cpp')
-rw-r--r--Source/WebKit2/WebProcess/Plugins/Netscape/NPJSObject.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/Source/WebKit2/WebProcess/Plugins/Netscape/NPJSObject.cpp b/Source/WebKit2/WebProcess/Plugins/Netscape/NPJSObject.cpp
index aa49fe39f..ffc7793db 100644
--- a/Source/WebKit2/WebProcess/Plugins/Netscape/NPJSObject.cpp
+++ b/Source/WebKit2/WebProcess/Plugins/Netscape/NPJSObject.cpp
@@ -31,12 +31,11 @@
#include "JSNPObject.h"
#include "NPRuntimeObjectMap.h"
#include "NPRuntimeUtilities.h"
-#include <JavaScriptCore/JSCJSValueInlines.h>
+#include <JavaScriptCore/JSCInlines.h>
#include <JavaScriptCore/JSCellInlines.h>
#include <JavaScriptCore/JSLock.h>
#include <JavaScriptCore/JSObject.h>
#include <JavaScriptCore/StrongInlines.h>
-#include <JavaScriptCore/StructureInlines.h>
#include <WebCore/Frame.h>
#include <WebCore/IdentifierRep.h>
#include <wtf/text/WTFString.h>
@@ -49,7 +48,7 @@ namespace WebKit {
NPJSObject* NPJSObject::create(VM& vm, NPRuntimeObjectMap* objectMap, JSObject* jsObject)
{
// We should never have a JSNPObject inside an NPJSObject.
- ASSERT(!jsObject->inherits(&JSNPObject::s_info));
+ ASSERT(!jsObject->inherits(JSNPObject::info()));
NPJSObject* npJSObject = toNPJSObject(createNPObject(0, npClass()));
npJSObject->initialize(vm, objectMap, jsObject);
@@ -88,7 +87,7 @@ static Identifier identifierFromIdentifierRep(ExecState* exec, IdentifierRep* id
const char* string = identifierRep->string();
int length = strlen(string);
- return Identifier(exec, String::fromUTF8WithLatin1Fallback(string, length).impl());
+ return Identifier::fromString(exec, String::fromUTF8WithLatin1Fallback(string, length));
}
bool NPJSObject::hasMethod(NPIdentifier methodName)
@@ -192,7 +191,7 @@ bool NPJSObject::setProperty(NPIdentifier propertyName, const NPVariant* value)
JSValue jsValue = m_objectMap->convertNPVariantToJSValue(exec, m_objectMap->globalObject(), *value);
if (identifierRep->isString()) {
- PutPropertySlot slot;
+ PutPropertySlot slot(m_jsObject.get());
m_jsObject->methodTable()->put(m_jsObject.get(), exec, identifierFromIdentifierRep(exec, identifierRep), jsValue, slot);
} else
m_jsObject->methodTable()->putByIndex(m_jsObject.get(), exec, identifierRep->number(), jsValue, false);
@@ -240,8 +239,8 @@ bool NPJSObject::enumerate(NPIdentifier** identifiers, uint32_t* identifierCount
JSLockHolder lock(exec);
- PropertyNameArray propertyNames(exec);
- m_jsObject->methodTable()->getPropertyNames(m_jsObject.get(), exec, propertyNames, ExcludeDontEnumProperties);
+ PropertyNameArray propertyNames(exec, PropertyNameMode::Strings);
+ m_jsObject->methodTable()->getPropertyNames(m_jsObject.get(), exec, propertyNames, EnumerationMode());
NPIdentifier* nameIdentifiers = npnMemNewArray<NPIdentifier>(propertyNames.size());
@@ -293,7 +292,7 @@ bool NPJSObject::invoke(ExecState* exec, JSGlobalObject* globalObject, JSValue f
for (uint32_t i = 0; i < argumentCount; ++i)
argumentList.append(m_objectMap->convertNPVariantToJSValue(exec, globalObject, arguments[i]));
- JSValue value = JSC::call(exec, function, callType, callData, m_jsObject->methodTable()->toThisObject(m_jsObject.get(), exec), argumentList);
+ JSValue value = JSC::call(exec, function, callType, callData, m_jsObject.get(), argumentList);
// Convert and return the result of the function call.
m_objectMap->convertJSValueToNPVariant(exec, value, *result);