Add JSNPObject::getConstructData
authorandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 29 Jul 2010 19:31:06 +0000 (19:31 +0000)
committerandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 29 Jul 2010 19:31:06 +0000 (19:31 +0000)
commitfd85070c700570a6934c77fef93b0bdbae7fa255
tree739ce4b50797f6b124e65cbb7b821e0bd238f367
parentab70d41a248cce780d55bec3b26b4be5f2ecc244
Add JSNPObject::getConstructData
https://bugs.webkit.org/show_bug.cgi?id=43165

Reviewed by Sam Weinig.

* WebProcess/Plugins/JSNPObject.cpp:
(WebKit::JSNPObject::callMethod):
Add a null check for m_npObject.

(WebKit::JSNPObject::callConstructor):
Call NPClass::construct.

(WebKit::JSNPObject::getConstructData):
Set up the construct data.

(WebKit::JSNPObject::propertyGetter):
convertNPVariantToJSValue now takes a JSGlobalObject as well.

* WebProcess/Plugins/NPJSObject.cpp:
(WebKit::NPJSObject::invoke):
(WebKit::NPJSObject::invokeDefault):
(WebKit::NPJSObject::construct):
convertNPVariantToJSValue now takes a JSGlobalObject as well.

* WebProcess/Plugins/NPJSObject.h:
Make isNPJSObject and toNPJSObject public.

* WebProcess/Plugins/NPRuntimeObjectMap.cpp:
(WebKit::NPRuntimeObjectMap::convertNPVariantToJSValue):
Convert NPObjects correctly.

(WebKit::NPRuntimeObjectMap::globalObject):
Get the globalObject from the frame.

(WebKit::NPRuntimeObjectMap::globalExec):
Call globalObject.

* WebProcess/Plugins/NPRuntimeObjectMap.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@64300 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebKit2/ChangeLog
WebKit2/WebProcess/Plugins/JSNPObject.cpp
WebKit2/WebProcess/Plugins/JSNPObject.h
WebKit2/WebProcess/Plugins/NPJSObject.cpp
WebKit2/WebProcess/Plugins/NPJSObject.h
WebKit2/WebProcess/Plugins/NPRuntimeObjectMap.cpp
WebKit2/WebProcess/Plugins/NPRuntimeObjectMap.h